Bug 90788 - systemd-nspawn: return key does not work in some programs
Summary: systemd-nspawn: return key does not work in some programs
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-30 18:48 UTC by Tobias Hunger
Modified: 2016-06-07 12:09 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Tobias Hunger 2015-05-30 18:48:27 UTC
I have a container with a user set up to run the fish shell.

"machinectl login container" does give me a login prompt and starts fish. Unfortunately the return key does not do anything in that setup, but Ctrl-J does work to trigger commands.

Changing the shell to bash helps somewhat: That shell recognizes the return key as expected. Starting fish from bash does end up with a broken return key again. A bash started from fish does work.

Other programs are effected as well: Sudo won't accept the return key in the password prompt, git has similar problems whenever asking something and I am sure other programs display similar problems. Ctrl-J works in all places I ran into.

When I use "nsenter <container-leader-PID> --mount --uts --ipc --net" fish as well as sudo and git work as expected.

Any ideas?

This is stty -a from outside the container:

speed 38400 baud; rows 46; columns 114; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?;
eol2 = M-^?; swtch = <undef>; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl
-ixon -ixoff -iuclc ixany imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop
-echoprt echoctl echoke

This is stty -a inside the nspawn-container:

speed 38400 baud; rows 46; columns 114; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl
-ixon -ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon -iexten echo echoe echok -echonl -noflsh -xcase -tostop
-echoprt -echoctl echoke

The difference is AFAICT:
eol, eol2, -icrnl -ixany -imaxbel iutf8 -iexten -echoctl

stty -F /dev/ptmx is identical inside and outside of the container --
but I am not sure whether that is what you were asking in the second
part of your reply.

I tried running "stty eol ^J -F /dev/pts/0" inside the container and
got a SIGSEGV. It works outside the container.
Comment 1 Tobias Hunger 2015-05-31 09:45:47 UTC
Running "cat" on the tty reported in ps for the shell does get me all the keystrokes, but nothing for the return key.

Maybe that gets lost on the way to the shell somehow?
Comment 2 Lennart Poettering 2016-06-07 10:51:07 UTC
Is this still an issue? the TTY code is very different these days in nspawn, hence I presume this is fixed.

if this is still an issue, please file a new bug with reproduce on systemd github, thanks.
Comment 3 Tobias Hunger 2016-06-07 12:09:15 UTC
Yes, this is fixed in the meantime.

Sorry, I forgot about having made this report:-/ I's kind of hard to keep track of all the bug trackers I have reported things into.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.