New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lxc-attach not a tty, so tmux/byobu is broken #554

Closed
linas opened this Issue Jun 8, 2015 · 7 comments

Comments

4 participants
@linas

linas commented Jun 8, 2015

If you lxc-attach -n some-container, then tmux and byobu don't work. The reason for this becomes clear: tmux -v reports:

server started, pid 760
socket path /tmp/tmux-1002/default
new client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 14 from client 7
got 6 from client 7
fatal: tty_init: ttyname failed

This can be confirmed with the tty command which reports: not a tty

There is a simple work-around: say script /dev/null and then tty reports /dev/pts/1 and tmux works.

@linas

This comment has been minimized.

Show comment
Hide comment
@linas

linas Jun 8, 2015

Sorry: I should add: this is for the apt-get lxc on ubuntu 14.04 runing ubunutu 14.04 amd64 so it is the completely stock LTS version, and NOT the current github version, which maybe is fixed. Also: FYI: the docker folks have more or less exactly this same bug; they have a bug open in their github to cover this. They seem to be unable to wrap their minds around why anyone would want to do this, despite maybe a dozen "me too" posts.

linas commented Jun 8, 2015

Sorry: I should add: this is for the apt-get lxc on ubuntu 14.04 runing ubunutu 14.04 amd64 so it is the completely stock LTS version, and NOT the current github version, which maybe is fixed. Also: FYI: the docker folks have more or less exactly this same bug; they have a bug open in their github to cover this. They seem to be unable to wrap their minds around why anyone would want to do this, despite maybe a dozen "me too" posts.

@ericsnowcurrently

This comment has been minimized.

Show comment
Hide comment
@ericsnowcurrently

ericsnowcurrently commented Aug 9, 2016

@brauner

This comment has been minimized.

Show comment
Hide comment
@brauner

brauner Aug 9, 2016

Member

This is a known bug in glibc and @hallyn has send a fix to glibc (https://sourceware.org/ml/libc-alpha/2016-08/msg00307.html). It just needs to be applied.

Member

brauner commented Aug 9, 2016

This is a known bug in glibc and @hallyn has send a fix to glibc (https://sourceware.org/ml/libc-alpha/2016-08/msg00307.html). It just needs to be applied.

@linas

This comment has been minimized.

Show comment
Hide comment
@linas

linas Aug 10, 2016

Wow! Awesome! Thank you @hallyn ! (I'm saying "awesome" because this is an interesting patch, not what I might have guessed.)

linas commented Aug 10, 2016

Wow! Awesome! Thank you @hallyn ! (I'm saying "awesome" because this is an interesting patch, not what I might have guessed.)

@linas

This comment has been minimized.

Show comment
Hide comment
@linas

linas Aug 10, 2016

I guess the normal protocol is to leave this open until glibc applies the patch, and then wait till it rolls out, test it, and then close this bug, which could take many months (!?). Unfortunately, the patch just missed the glibc 2.24 release by a week. I wonder what the chances are that debian/ubuntu might pick up the patch in their stable branches; I have no clue how that decision would get made.

linas commented Aug 10, 2016

I guess the normal protocol is to leave this open until glibc applies the patch, and then wait till it rolls out, test it, and then close this bug, which could take many months (!?). Unfortunately, the patch just missed the glibc 2.24 release by a week. I wonder what the chances are that debian/ubuntu might pick up the patch in their stable branches; I have no clue how that decision would get made.

@kfix

This comment has been minimized.

Show comment
Hide comment
@kfix

kfix Mar 30, 2017

the glibc fix seems to have been upstreamed recently: http://patchwork.ozlabs.org/patch/720749/
No idea when they will next cut a release that will be seen in Ubuntu.

kfix commented Mar 30, 2017

the glibc fix seems to have been upstreamed recently: http://patchwork.ozlabs.org/patch/720749/
No idea when they will next cut a release that will be seen in Ubuntu.

@brauner

This comment has been minimized.

Show comment
Hide comment
@brauner

brauner Apr 25, 2017

Member

This is the same issue that we've tracked in lxc/lxd#936 .

Once the distros pick-up on those you're good to go.

Member

brauner commented Apr 25, 2017

This is the same issue that we've tracked in lxc/lxd#936 .

Once the distros pick-up on those you're good to go.

@brauner brauner closed this Apr 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment