Hi folks,
I've been struggling with segmentation faults in our Apache for the
past few weeks. I've been eagerly trying out the latest mod_ssl releases
in the hopes that it will solve our problem, but to no avail so far.
I haven't been able to reliably make it occur on demand, but here's
what I do know about the situation - It occurs after apache has been
restarted ('apachectl restart') and has been idle for some time (usually
a few hours). The default non-ssl enabled virtualhost works just fine,
only accesses to the ssl virtualhost cause a segmentation fault.
Here's what I see in the apache error log:
[Tue Oct 26 10:12:00 1999] [notice] child pid 30579 exit signal Segmentation fault (11)
[Tue Oct 26 10:12:55 1999] [notice] child pid 29499 exit signal Segmentation fault (11)
... and on and on - once for each access to the ssl port
Here's some info on our configuration:
- apache 1.3.9
- mod_ssl 2.4.6
- php 3.0.12
- Jserv 1.0
- openssl 0.9.4
running on Debian/Linux 2.1 (slink) on an Intel box
Thinking it may have something to do with the SessionCache (as has been
reported on this list already) I have tried both the default mod_ssl choice of
the supplied SDBM lbrarary and also using the vendor DBM libs. Neither choice
makes any difference - it still seg-faults.
I've now resorted to compiling apache with all debug enabled (-g -ggdb3)
in the hopes of getting a stack-backtrace, but this has been futile, too:
GNU gdb 4.17.m68k.objc.threads.hwwp.fpu.gnat
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-pc-linux-gnu"...
(gdb) attach 32643
Attaching to program `/usr/sbin/apache', Pid 32643
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from /lib/libdb.so.2...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /lib/libnss_compat.so.1...done.
Reading symbols from /lib/libnss_files.so.1...done.
Reading symbols from /usr/lib/apache/1.3/mod_log_config.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_mime.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_negotiation.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_info.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_include.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_autoindex.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_dir.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_cgi.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_asis.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_imap.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_actions.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_userdir.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_alias.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_rewrite.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_access.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_auth.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_auth_anon.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_auth_dbm.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_expires.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_headers.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_usertrack.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_unique_id.so...done.
Reading symbols from /usr/lib/apache/1.3/mod_setenvif.so...done.
Reading symbols from /usr/lib/apache/1.3/libssl.so...done.
Reading symbols from /usr/lib/apache/1.3/libphp3.so...done.
Reading symbols from /usr/lib/libpq.so.1...done.
Reading symbols from /lib/libresolv.so.2...done.
Reading symbols from /usr/lib/apache/1.3/mod_jserv.so...done.
0x400d474e in ()
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x21fb in ?? ()
(gdb) where
#0 0x21fb in ?? ()
(gdb) bt
#0 0x21fb in ?? ()
(gdb) q
No matter what I do, I can't seem to get a backtrace out of it . It would
appear that maybe something is corrupting memory?
Note also that the backtrace is identical with SDBM vs. vendor DBM libraries
(dies at 0x21fb in both cases).
Since this wasn't getting me anywhere, I managed to get an strace of the
process, which still doesn't help too much:
27453 select(21, [18 19 20], NULL, NULL, NULL) = 1 (in [18])
27453 accept(18, {sin_family=AF_INET, sin_port=htons(25309),
sin_addr=inet_addr("192.168.2.1")}, [16]) = 4
27453 fcntl(28, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
27453 sigaction(SIGUSR1, {SIG_IGN}, {0x80605f0, [], SA_INTERRUPT}) = 0
27453 getsockname(4, {sin_family=AF_INET, sin_port=htons(3004),
sin_addr=inet_addr("192.168.2.12")}, [16]) = 0
27453 setsockopt(4, IPPROTO_TCP1, [1], 4) = 0
27453 time(NULL) = 940949214
27453 getpid() = 27453
27453 write(21, "[26/Oct/1999 10:46:54 27453] [in"..., 125) = 125
27453 time(NULL) = 940949214
27453 getpid() = 27453
27453 read(4, "\200+\1\3\0\0\22", 7) = 7
27453 read(4, "\0\0\0\20\2\0\200\4\0\200\0\0d\0"..., 38) = 38
27453 time(NULL) = 940949214
27453 getpid() = 27453
27453 time(NULL) = 940949214
27453 time(NULL) = 940949214
27453 write(4, "\26\3\0\0J\2\0\0F\3\0008\25\276\336"..., 1024) = 1024
27453 write(4, "\264\246\26w\373F\222\10H!QL\376"..., 26) = 26
27453 read(4, "\26\3\0\0D", 5) = 5
27453 read(4, "\20\0\0@\25o\337\357q\f$\271\355"..., 68) = 68
27453 --- SIGSEGV (Segmentation fault) ---
27453 chdir("/var/tmp") = 0
27453 sigaction(SIGSEGV, {SIG_DFL}, {SIG_DFL}) = 0
27453 getpid() = 27453
27453 kill(27453, SIGSEGV) = 0
27453 sigreturn() = ? (mask now [])
27453 --- SIGSEGV (Segmentation fault) ---
The line that starts 'write(21, ...' is the line that outputs this to the
ssl_engine_log file:
[26/Oct/1999 10:46:54 27453] [info] Connection to child 4 established (server
intranet.my.domain:3004, client 192.168.2.1)
Can anyone help me with this? Any additional information I can gather? Logs?
In the meantime, I've set SSLSessionCache to 'none' to see if that will
help things somewhat...
--
David Kerry ([EMAIL PROTECTED])
Stable Network Technologies Inc. (www.snti.com)
Toronto, Ontario, Canada
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]