openssh-3.8.1p1, with pthreads enabled, hung in pthread_join.
Darren Tucker
dtucker at zip.com.au
Wed Mar 16 13:55:12 EST 2005
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.
More information about the openssh-unix-dev
mailing list