[Bug 2619] infinite loop, 100% cpu use in ssh if ^Z is pressed at password prompt

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Sat Oct 15 03:26:11 AEDT 2016


https://bugzilla.mindrot.org/show_bug.cgi?id=2619

--- Comment #4 from Darren Tucker <dtucker at zip.com.au> ---
Created attachment 2879
  --> https://bugzilla.mindrot.org/attachment.cgi?id=2879&action=edit
readpassphrase: mask off signals while we resend them.

The new problem is that during the "resend all the signals we got to
ourselves" part, the kill syscall hangs.

The relevant part of IEEE Std 1003.1-2008 spec for kill(2) is:

"""
If the value of pid causes sig to be generated for the sending process,
and if sig is not blocked for the calling thread and if no other thread
has sig unblocked or is waiting in a sigwait() function for sig, either
sig or at least one pending unblocked signal shall be delivered to the
sending thread before kill() returns.
"""

if we avoid this by blocking the signals we're re-sending while we send
them this should work around that problem (and seems to in my limited
testing).

jjelen: if you can confirm this solves the problem for you then I'll
look at upstreaming it.

-- 
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.


More information about the openssh-bugs mailing list