
bostjan at a2o
Dec 28, 2009, 5:51 PM
Post #1 of 4
(1700 views)
Permalink
|
|
Static build segfaults on x86_64
|
|
Hello everyone, I would like to ask you for advice on how to approach (or solve) this particular problem. I use Slackware Linux and compile Openssh from source. I prefer to compile it statically so it doesn't get messed up if I update openssl libraries. Up until now this approach was working OK for me. Lately I have been challenged with Slackware64 installations and I have come across a problem with Openssh version (5.3p1, but result is the same with 5.2p1). What happens is that sshd daemon keeps accepting connections as long as no one disconnects. On the first DISconnection the server daemon dies with segfault message, of which a strace output I have included below. This only happens on 64-bit platform, on 32-bit it is still working hanky-dory. Non-static build works ok on both platforms. Sum: 32-bit shared: OK 32-bit static: OK 64-bit shared: OK 64-bit static: SEGFAULT on first client disconnect How should I start solving this problem? I am proficient in PHP and other Untyped languages but I am only moderately familiar with C programming. Thank you for your responses, Bostjan Skufca --------------[ Segfault output from strace ]------------------------------- # strace -p 21976 Process 21976 attached - interrupt to quit select(6, [3], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be restarted) --- SIGCHLD (Child exited) @ 0 (0) --- wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 255}], WNOHANG, NULL) = 21984 wait4(-1, 0x7fffc6243994, WNOHANG, NULL) = -1 ECHILD (No child processes) rt_sigaction(SIGCHLD, NULL, {0x400be0, [], SA_RESTORER, 0xf0000000fc0c748}, 8) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) --- Process 21976 detached ----------------------------------------------------------------------------------- --------------[ Environment description ]------------------------------- - kernel: 2.6.32.2 (64 bit) - OS: Slackware64-13 - gcc: from distro (whole toolchain actually) - libs: glibc is from distro - libs: openssl is customly compiled 0.9.8l (./config --prefix=$PDESTDIR_OPENSSL shared) - openssh: 5.3p1 configured like this: ./configure --prefix=$PDESTDIR \ --sysconfdir=/etc/ssh \ --with-ssl-dir=$PDESTDIR_OPENSSL \ --with-ldflags=-static \ --with-privsep-path=/var/empty \ --with-default-path=... Using "LDFLAGS=-static" produces the same results. ------------------------------------------------------------------------------------ _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev [at] mindrot https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
|