bugzilla-daemon at bugzilla.mindrot.org
2016-Sep-08 06:43 UTC
[Bug 2612] New: Sporadically need to press <ENTER> for multiplexed connection to finish
https://bugzilla.mindrot.org/show_bug.cgi?id=2612 Bug ID: 2612 Summary: Sporadically need to press <ENTER> for multiplexed connection to finish Product: Portable OpenSSH Version: 7.3p1 Hardware: amd64 OS: Linux Status: NEW Severity: minor Priority: P5 Component: ssh Assignee: unassigned-bugs at mindrot.org Reporter: omar.estrada at gmail.com Sometimes, when issuing a remote command via a multiplexed connection, it doesn't finish until I hit <ENTER>. Most of the times it terminates normally. This occurs approximately 1 out of 10 times. This affects the usage of multiplexed connections in scripts. Adding -vvv to the "slave" connection shows: debug3: mux_client_request_session: entering debug3: mux_client_request_alive: entering debug3: mux_client_request_alive: done pid = 5485 debug3: mux_client_request_session: session request sent debug1: mux_client_request_session: master session id: 3 <Have to hit ENTER here> debug3: mux_client_read_packet: read header failed: Broken pipe debug2: Received exit status from master 0 I checked out the code (commit 775f8a23f2353f5869003c57a213d14b28e0736e) and, after adding some additional log messages to mux.c, I notice the flow was blocking in mux_client_read(), in the call to poll(): 1428 static int 1429 mux_client_read(int fd, Buffer *b, u_int need) 1430 { ... 1450 case EAGAIN: 1451 (void)poll(&pfd, 1, -1); <<<<<<<<<<< 1452 /* FALLTHROUGH */ Steps to reproduce: 1. In a terminal, issue: ssh -M -S $TMPDIR/master <host> 2. In another terminal, issue: for i in `seq 30`; do ssh -vvv -o ControlPath=$TMPDIR/master <host> ls; done Expected behavior: the command finishes running without user interaction. Actual behavior: approx. 1 out of 10 times it's necessary to press <ENTER> (no other key works) to continue executing the command. WORKAROUND: Notice that redirecting STDIN to /dev/null works around the problem (e.g., for i in `seq 30`; do ssh -vvv -o ControlPath=$TMPDIR/master <host> ls < /dev/null; done -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2016-Oct-21 19:54 UTC
[Bug 2612] Sporadically need to press <ENTER> for multiplexed connection to finish
https://bugzilla.mindrot.org/show_bug.cgi?id=2612 Darren Tucker <dtucker at zip.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dtucker at zip.com.au --- Comment #1 from Darren Tucker <dtucker at zip.com.au> --- I can't reproduce this on either of: - Fedora 24 (i686, kernel 4.7.3-200.fc24.i686+PAE) - Ubuntu 16.04.1 (x86_64, kernel 4.4.0-43-generic) Could you describe your system some more (eg distro, kernel)? What shell are you using? -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2017-Aug-11 04:33 UTC
[Bug 2612] Sporadically need to press <ENTER> for multiplexed connection to finish
https://bugzilla.mindrot.org/show_bug.cgi?id=2612 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |djm at mindrot.org Status|NEW |RESOLVED Resolution|--- |WORKSFORME --- Comment #2 from Damien Miller <djm at mindrot.org> --- 9 months with no followup == no bug -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Apr-06 02:26 UTC
[Bug 2612] Sporadically need to press <ENTER> for multiplexed connection to finish
https://bugzilla.mindrot.org/show_bug.cgi?id=2612 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #3 from Damien Miller <djm at mindrot.org> --- Close all resolved bugs after release of OpenSSH 7.7. -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
Maybe Matching Threads
- ssh(1) multiplexing rewrite
- Does ssh need sendfd in pledge() call?
- [Portable OpenSSH] hang up during login after OpenSSH 7.3 upgrade
- Port forwarding using the client of a multiplexed connection.
- [PATCH] mux: update PROTOCOL.mux and fix error messages on client side