Static build segfaults on x86_64

Darren Tucker dtucker at zip.com.au
Wed Dec 30 14:33:06 EST 2009


Bostjan Skufca wrote:
> Thanks for the tip on building with only static instance of OpenSSL.
> 
> No core dumps were produced, and so far I was unable to get the daemon
> working with gdb attached to it.
> I compiled it statically as before and with --disable-strip. In
> standalone (no gdb) it produces the same results.
> Then the commands I execute are these:
> 
> (start the daemon)
> # /usr/local/ssh/sbin/sshd
> 
> (attach the gdb to process)
> # gdb /usr/local/ssh/sbin/sshd PID
> 
> Then I try to connect but the client just hangs waiting for a response
> from server. If I attach to sshd process with 'strace' it works just
> fine. Therefore I am unable to get to the point where I can exit the
> first child, wait for the server crash and get a backtrace. Any
> additional hints?

gdb probably got confused when the server forked.  Assuming my 
understanding of your description is correct, I suggest trying in the 
following order:

start sshd.  Note pid.
connect with client
attach gdb to pid previously noted.
disconnect client.

alternatively you could try what you did before with "set follow-fork 
parent" in gdb before connecting with the ssh client.

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