openssh-3.8.1p1, with pthreads enabled, hung in pthread_join.

Senthil Kumar senthilkumar_sen at hotpop.com
Thu Mar 17 19:49:06 EST 2005


Hi All,

I am also facing the same situation here but only when Privilegeseparation 
is disabled.

Smith wrote:
>If i attempt this with privilege separation turned on the lowered privilege 
>process will exit and become a zombie, as the original process never exits.

This is not happening to me.

Darren wrote:
>Maybe pthread_cancel doesn't interrupt the read() syscall?

I think the problem lies in the target threads cancelability state. This may 
make the requests pending.

Any ideas?

Thanks,
Senthil kumar.


----- Original Message ----- 
From: "Darren Tucker" <dtucker at zip.com.au>
To: "Nick Lane-Smith" <nickls at apple.com>
Cc: <openssh-unix-dev at mindrot.org>
Sent: Wednesday, March 16, 2005 8:25 AM
Subject: Re: openssh-3.8.1p1, with pthreads enabled, hung in pthread_join.


> First, if you're building with USE_POSIX_THREADS then that's an 
> unsupported configuration.
>
> Nick Lane-Smith wrote:
>> I connect to my OpenSSH 3.8.1p1 server and when the password dialog shoes 
>> up I wait a min or so, long enough for the "Timeout before authentication 
>> for %s" alarm to trigger. If at that point I enter my password ssh will 
>> just sit there:
>>
>> debug2: input_userauth_info_req
>> debug2: input_userauth_info_req: num_prompts 1
>> Password:
>> debug3: packet_send2: adding 32 (len 18 padlen 14 extra_pad 64)
>>
>> And the sshd will be in this state:
>>
>> Attaching to program: `/private/tmp/OpenSSH.roots/OpenSSH~obj/sshd', 
>> process 26589.
>> Reading symbols for shared libraries ...................... done
>> 0x9002cf88 in semaphore_wait_trap ()
>> (gdb) bt
>> #0  0x9002cf88 in semaphore_wait_trap ()
>> #1  0x9006153c in pthread_join ()
>> #2  0x00028a50 in sshpam_thread_cleanup () at 
>> /tmp/OpenSSH.roots/OpenSSH/openssh/auth-pam.c:417
>
> That line is immediately preceded by:
>
> pthread_cancel(ctxt->pam_thread);
>
> Maybe pthread_cancel doesn't interrupt the read() syscall?  I don't know 
> anything about your thread implementation.
>
>> Shouldn't the sshpam/read thread have an alarm set so if the 
>> authentication times out it will exit cleanly?
>
> It shouldn't be necessary (and it's a potential source of races).
>
> -- 
> 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.
>
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev at mindrot.org
> http://www.mindrot.org/mailman/listinfo/openssh-unix-dev 





More information about the openssh-unix-dev mailing list