[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
Mon Oct 17 19:04:09 AEDT 2016
https://bugzilla.mindrot.org/show_bug.cgi?id=2619
--- Comment #6 from Jakub Jelen <jjelen at redhat.com> ---
I verified that the process with the last patch does not hang anymore
in our use case.
According to your strace, if I understand it well, it looks like the
SIGTTOU signal is re-send and default handler stops the process (looks
like hang). This looks like ... well ... defined behavior, though not
what we expect from ssh.
AFAIK, we should just not resend the SIGTTOU as we already ignore it on
the line 161 (probably together with the other stopping signals).
Something like this did solve the problem for me too. But insight from
somebody more experienced would we helpful.
diff --git a/openbsd-compat/readpassphrase.c
b/openbsd-compat/readpassphrase.c
index c99b4e2..fade1aa 100644
--- a/openbsd-compat/readpassphrase.c
+++ b/openbsd-compat/readpassphrase.c
@@ -179,13 +179,14 @@ restart:
*/
for (i = 0; i < _NSIG; i++) {
if (signo[i]) {
- kill(getpid(), i);
switch (i) {
case SIGTSTP:
case SIGTTIN:
case SIGTTOU:
need_restart = 1;
+ continue;
}
+ kill(getpid(), i);
}
}
if (need_restart)
--
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