Comment 21 for bug 6871

Revision history for this message
In , Darren Tucker (dtucker) wrote : Re: Bug#252676: sshd failure

Darren Tucker wrote:
> Colin Watson wrote:
> [snip bug details]
>
>> We're also seeing these symptoms on a server at work, although they're
>> highly intermittent and very difficult to track down.
>
> I will look at this tomorrow.

I was able to sometimes reproduce this on Debian by connecting to the
server PreferredAuthentications=keyboard-interactive then *immediately*
cancelling the authentication with ctrl-C.

After some digging I think I have found the cause: waitpid will return
zero if the process has not exited and none of the conditions listed
under "ERRORS" in the man page have been met. Attached is a patch to
test for this too (which it should have done in the first place, sigh).

I have not been able to reproduce the problem with this patch.

(Interestingly, I was not able to reproduce it on Redhat by doing the
same thing. I'm not sure why, but Debian is running on faster, dual CPU
box so it could be a timing issue.)

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
     Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.