Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 132016 - apache-2.0.58-r1 +ssl dies on getsockname
Summary: apache-2.0.58-r1 +ssl dies on getsockname
Status: RESOLVED DUPLICATE of bug 138858
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-02 06:15 UTC by Markus Tacker
Modified: 2006-08-16 13:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Tacker 2006-05-02 06:15:34 UTC
On HTTPS-Connection it dies.

# strace /usr/sbin/apache2 -D SSL -D SSL_DEFAULT_VHOST -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -k start -X

gives

[...]
poll(
<here it waits until i start a request>
[{fd=4, events=POLLIN}, {fd=3, events=POLLIN, revents=POLLIN}], 2, -1) = 1
accept(3, {sa_family=AF_INET, sin_port=htons(49648), sin_addr=inet_addr("192.168.0.102")}, [16]) = 17
semop(2261025, 0xb7cb5f32, 1) = 0
getsockname(17, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("192.168.0.161")}, [16]) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++


Without SSL it works.

Configured with
[ebuild R ] net-www/apache-2.0.55-r2 +apache2 -debug -doc +ldap -mpm-leader -mpm-peruser +mpm-prefork -mpm-threadpool -mpm-worker -no-suexec (-selinux) +ssl -static-modules -threads

Portage 2203-svn (default-linux/x86/2005.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.15-gentoo-r1 i686)
=================================================================
System uname: 2.6.15-gentoo-r1 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.14
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [disabled]
dev-lang/python:     2.4.2
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distlocks fixpackages sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.mirror.solnet.ch http://gentoo.mirror.intouch.nl/gentoo/ http://mirror.ovh.net/gentoo-distfiles/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ ftp://gentoo.inode.at/source/ http://ftp.du.se/pub/os/gentoo"
LC_ALL="de_DE.UTF-8"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://otrs.aiti-group.de/gentoo-portage"
USE="x86 apache2 apm avi berkdb bitmap-fonts bzip2 cli crypt curl dri emboss encode expat foomaticdb fortran gdbm gif gpm gstreamer gtk2 imagemagick imlib ipv6 isdnlog jpeg ldap libg++ libwww mad mikmod mmx motif mp3 mysql ncurses nls ogg oggvorbis pam pcre pdflib perl php png pppd python quicktime readline recode reflection session spl sqlite sse ssl tcpd truetype-fonts type1-fonts udev unicode usb vhosts vorbis xml2 xmms xorg zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Markus Tacker 2006-05-02 06:28:01 UTC
Sorry, the discription is misleading.
Requesting a page via HTTP_S_ works. Via plain HTTP it segfaults.
Comment 2 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-05-02 21:52:27 UTC
Does this happen on a specific page, or on every page?
If every page: What (if any) changes have you made to the configuration? Please attach any relevant configuration (i.e. files you have changed)

If a single page: Please attach the file that it's segfaulting on.

Also, a gdb backtrace might be useful as well.
Comment 3 Markus Tacker 2006-05-03 02:37:34 UTC
(In reply to comment #2)
> Does this happen on a specific page, or on every page?

Every page I access via http.

> Also, a gdb backtrace might be useful as well.

How do I get one? 

Comment 4 Markus Tacker 2006-07-24 02:09:18 UTC
I can confirm this on another machine. Meanwhile on 2.0.58-r1.

Again, how do I get a gdb backtrace?

# emerge --info
Portage 2.1-r1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-gentoo-r13 i686)
=================================================================
System uname: 2.6.16-gentoo-r13 i686 Celeron (Coppermine)
Gentoo Base System version 1.6.15
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [disabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distlocks fixpackages metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://gentoo.intergenia.de"
LC_ALL="de_DE.UTF-8"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 alsa apache2 apm arts avi bitmap-fonts cli crypt dlloader dri eds emboss encode esd foomaticdb fortran gif gpm gstreamer gtk2 imlib ipv6 isdnlog libg++ libwww mad mikmod mmx motif mp3 mpeg ncurses nls nptl nptlonly ogg oss pam pcre pdflib perl pppd python qt4 quicktime readline reflection session spell spl sse ssl tcpd udev unicode vorbis xml xmms xorg xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 5 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-07-24 18:23:39 UTC
http://httpd.apache.org/dev/debugging.html
Comment 6 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-07-24 18:28:42 UTC
actually, looking closer at those instructions for getting a backtrace, there's a few minor differences for Gentoo. Instead of 'gdb httpd' do 'gdb /usr/sbin/apache2'. The run line needs to be a bit different: run -X -D DEFAULT_VHOST -D PHP4 (etc etc, the stuff from APACHE2_OPTS). 
Comment 7 Markus Tacker 2006-07-24 23:46:02 UTC
Ok, thanks. I compiled apache with "debug" use flag, but I get no symbols.

gdb /usr/sbin/apache2
This GDB was configured as "i686-pc-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run -D SSL -D SSL_DEFAULT_VHOST -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -k start -X
Starting program: /usr/sbin/apache2 -D SSL -D SSL_DEFAULT_VHOST -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -k start -X
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1212572848 (LWP 22010)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212572848 (LWP 22010)]
0xb7b09353 in ssl_engine_disable () from /usr/lib/apache2/modules/mod_ssl.so
(gdb) where
#0  0xb7b09353 in ssl_engine_disable () from /usr/lib/apache2/modules/mod_ssl.so
#1  0x081ac7a8 in ?? ()
#2  0xb7b27ce0 in ?? () from /usr/lib/apache2/modules/mod_ssl.so
#3  0x00000008 in ?? ()
#4  0xb7b700f8 in ?? () from /usr/lib/apache2/modules/mod_logio.so
#5  0xb7b700f8 in ?? () from /usr/lib/apache2/modules/mod_logio.so
#6  0x081ac760 in ?? ()
#7  0xb7b6ff2a in ?? () from /usr/lib/apache2/modules/mod_logio.so
#8  0xb7b6fced in ?? () from /usr/lib/apache2/modules/mod_logio.so
#9  0xb7b6ff2a in ?? () from /usr/lib/apache2/modules/mod_logio.so
#10 0x00000000 in ?? ()
Comment 8 Markus Tacker 2006-07-25 01:51:05 UTC
This is the backtrace from the other machine

# gdb /usr/sbin/apache2
(gdb) run -D SSL -D SSL_DEFAULT_VHOST -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -k start -X
Starting program: /usr/sbin/apache2 -D SSL -D SSL_DEFAULT_VHOST -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -k start -X
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1212201296 (LWP 32714)]



Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212201296 (LWP 32714)]
0xb7b62353 in ssl_engine_disable () from /usr/lib/apache2/modules/mod_ssl.so
(gdb) where
#0  0xb7b62353 in ssl_engine_disable () from /usr/lib/apache2/modules/mod_ssl.so
#1  0x0819f760 in ?? ()
#2  0xb7b80ce0 in ?? () from /usr/lib/apache2/modules/mod_ssl.so
#3  0x00000008 in ?? ()
#4  0xb7bc90f8 in ?? () from /usr/lib/apache2/modules/mod_logio.so
#5  0xb7bc90f8 in ?? () from /usr/lib/apache2/modules/mod_logio.so
#6  0x0819f718 in ?? ()
#7  0xb7bc8f2a in ?? () from /usr/lib/apache2/modules/mod_logio.so
#8  0xb7bc8ced in ?? () from /usr/lib/apache2/modules/mod_logio.so
#9  0xb7bc8f2a in ?? () from /usr/lib/apache2/modules/mod_logio.so
#10 0x00000000 in ?? ()
Comment 9 Luca Longinotti (RETIRED) gentoo-dev 2006-07-25 11:13:41 UTC
Without debugging symbols a backtrace is useless, as it's not possible to know what crashes. :) To obtain debugging symbols you also need to add -ggdb to the CFLAGS, a very good general documentation on backtraces on Gentoo can be found at: http://www.gentoo.org/proj/en/qa/backtraces.xml
Best regards, CHTEKK.
Comment 10 Markus Tacker 2006-07-26 00:38:47 UTC
Thanks alot. Here we go:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213179056 (LWP 25642)]
0xb7a75353 in ssl_hook_pre_connection (c=0x81ac760, csd=0x81ac688)
    at mod_ssl.c:274
274     mod_ssl.c: File or directory not found.
        in mod_ssl.c
(gdb) 
(gdb) 
(gdb) where
#0  0xb7a75353 in ssl_hook_pre_connection (c=0x81ac760, csd=0x81ac688)
    at mod_ssl.c:274
#1  0x080737c9 in ap_run_pre_connection (c=0x81ac760, csd=0x81ac688)
    at connection.c:44
#2  0x08073a07 in ap_process_connection (c=0x81ac760, csd=0x81ac688)
    at connection.c:170
#3  0x08067170 in child_main (child_num_arg=0) at prefork.c:610
#4  0x0806736c in make_child (s=0x80a4e88, slot=0) at prefork.c:650
#5  0x08067470 in startup_children (number_to_start=5) at prefork.c:722
#6  0x08067c7b in ap_mpm_run (_pconf=0xbf85a110, plog=0x80cf158, s=0xbf85a114)
    at prefork.c:941
#7  0x0806ea30 in main (argc=12, argv=0xbf85a2b4) at main.c:623
Comment 11 Markus Tacker 2006-07-26 03:46:03 UTC
This is the traceback from the other machine.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212471632 (LWP 3901)]
0xb7b22353 in ssl_hook_pre_connection (c=0x81a9750, csd=0x81a9678) at mod_ssl.c:274
274     mod_ssl.c: Datei oder Verzeichnis nicht gefunden.
        in mod_ssl.c
(gdb) 
(gdb) 
(gdb) where
#0  0xb7b22353 in ssl_hook_pre_connection (c=0x81a9750, csd=0x81a9678) at mod_ssl.c:274
#1  0x080737a9 in ap_run_pre_connection (c=0x81a9750, csd=0x81a9678) at connection.c:44
#2  0x080739e7 in ap_process_connection (c=0x81a9750, csd=0x81a9678) at connection.c:170
#3  0x08067150 in child_main (child_num_arg=0) at prefork.c:610
#4  0x0806734c in make_child (s=0x80a4e88, slot=0) at prefork.c:650
#5  0x08067450 in startup_children (number_to_start=5) at prefork.c:722
#6  0x08067c5b in ap_mpm_run (_pconf=0xbfd64e20, plog=0x80cf158, s=0xbfd64e24) at prefork.c:941
#7  0x0806ea10 in main (argc=12, argv=0xbfd64fc4) at main.c:623
Comment 12 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-08-16 13:46:52 UTC
Please see if upgrading/rebuilding openssl and then mod_ssl fixes the issues for you.

*** This bug has been marked as a duplicate of 138858 ***