bugzilla-daemon at bugzilla.mindrot.org
2019-Sep-16 17:40 UTC
[Bug 3071] New: unhandled EINTR while connecting causes ssh to exit prematurely
https://bugzilla.mindrot.org/show_bug.cgi?id=3071 Bug ID: 3071 Summary: unhandled EINTR while connecting causes ssh to exit prematurely Product: Portable OpenSSH Version: 8.0p1 Hardware: amd64 OS: Linux Status: NEW Severity: trivial Priority: P5 Component: ssh Assignee: unassigned-bugs at mindrot.org Reporter: mavery at akamai.com Created attachment 3329 --> https://bugzilla.mindrot.org/attachment.cgi?id=3329&action=edit misc.c path We've observed some machines always returning one EINTR during a connection where a ConectTimeout is specified on the command line. ssh exits prematurely as the errno == EINTR is processed as hard error instead of being filtered out and retried in the select loop. It looks to be correlated to migrating to Ubuntu 18.04.4 but the change is trivial enough I didn't dig much further into why it's happening. patch (attached) is trivial. web diff of the patch: https://github.com/matthewaveryusa/openssh-portable/commit/127093f0a177bc4f5316453f777582f113fe18d9#diff-d93946eccdb07e73380c55caff5625f9 -Matt -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2020-May-29 05:16 UTC
[Bug 3071] unhandled EINTR while connecting causes ssh to exit prematurely
https://bugzilla.mindrot.org/show_bug.cgi?id=3071 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3329|0 |1 is obsolete| | CC| |djm at mindrot.org, | |dtucker at dtucker.net Attachment #3401| |ok?(dtucker at dtucker.net) Flags| | --- Comment #1 from Damien Miller <djm at mindrot.org> --- Created attachment 3401 --> https://bugzilla.mindrot.org/attachment.cgi?id=3401&action=edit handle EINTR in connect_timeout() and waitfd() I think the timeout_connect() case in the previous patch is slightly wrong. The connect() call did not succeed and needs to be retried. Darren, is this even necessary with your recent signal changes? -- 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 mindrot.org
2020-May-29 05:37 UTC
[Bug 3071] unhandled EINTR while connecting causes ssh to exit prematurely
https://bugzilla.mindrot.org/show_bug.cgi?id=3071 --- Comment #2 from Darren Tucker <dtucker at dtucker.net> --- (In reply to Damien Miller from comment #1)> Darren, is this even necessary with your recent signal changes?I think it'll now work correctly anything that sets SA_RESTART but we don't do that on every platform for reasons, so this diff is probably needed for their benefit. -- 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.
bugzilla-daemon at mindrot.org
2020-May-29 05:41 UTC
[Bug 3071] unhandled EINTR while connecting causes ssh to exit prematurely
https://bugzilla.mindrot.org/show_bug.cgi?id=3071 Darren Tucker <dtucker at dtucker.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3401|ok?(dtucker at dtucker.net) |ok+ Flags| | --- Comment #3 from Darren Tucker <dtucker at dtucker.net> --- Comment on attachment 3401 --> https://bugzilla.mindrot.org/attachment.cgi?id=3401 handle EINTR in connect_timeout() and waitfd()>+ } else if (errno == EINTR) >+ continue;maybe also EAGAIN? -- 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.
bugzilla-daemon at mindrot.org
2020-Jun-19 05:12 UTC
[Bug 3071] unhandled EINTR while connecting causes ssh to exit prematurely
https://bugzilla.mindrot.org/show_bug.cgi?id=3071 Darren Tucker <dtucker at dtucker.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |3162 Referenced Bugs: https://bugzilla.mindrot.org/show_bug.cgi?id=3162 [Bug 3162] Tracking bug for 8.4 release -- 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.
bugzilla-daemon at mindrot.org
2020-Jun-26 05:18 UTC
[Bug 3071] unhandled EINTR while connecting causes ssh to exit prematurely
https://bugzilla.mindrot.org/show_bug.cgi?id=3071 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #4 from Damien Miller <djm at mindrot.org> --- This has been committed and will be in OpenSSH 8.4, due in a few months - thanks -- 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 mindrot.org
2020-Oct-02 04:55 UTC
[Bug 3071] unhandled EINTR while connecting causes ssh to exit prematurely
https://bugzilla.mindrot.org/show_bug.cgi?id=3071 Darren Tucker <dtucker at dtucker.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #5 from Darren Tucker <dtucker at dtucker.net> --- Mass close of all bugs fixed in 8.4 release. -- 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.
Seemingly Similar Threads
- Call for testing: OpenSSH 8.4
- [PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.
- [PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.
- CESA-2017:3071 Moderate CentOS 6 ntp Security Update
- CEBA-2019:3071 CentOS 7 libguestfs BugFix Update