Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 138858 - apache-2.0.55 (2.0.58) segfault w/ USE=mpm-peruser
Summary: apache-2.0.55 (2.0.58) segfault w/ USE=mpm-peruser
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
: 132016 141005 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-07-02 07:11 UTC by Papp Zoltan
Modified: 2007-06-15 15:45 UTC (History)
3 users (show)

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


Attachments
ssl request worked fine since three day (ssl_request_log,542 bytes, text/plain)
2006-07-02 07:24 UTC, Papp Zoltan
Details
error logged in this file (error_log,70.74 KB, text/plain)
2006-07-02 07:31 UTC, Papp Zoltan
Details
emerged packages since Jun 28, 2006 14:59:47 (emerge_cut.log,52.93 KB, text/plain)
2006-07-02 07:36 UTC, Papp Zoltan
Details
mod_ssl.conf is default (40_mod_ssl.conf,2.91 KB, text/plain)
2006-07-02 07:41 UTC, Papp Zoltan
Details
and it's unchanged, too (41_mod_ssl.default-vhost.conf,7.96 KB, text/plain)
2006-07-02 07:45 UTC, Papp Zoltan
Details
conf.d/apache2 (apache2,2.09 KB, text/plain)
2006-07-02 07:50 UTC, Papp Zoltan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Papp Zoltan 2006-07-02 07:11:36 UTC
emerged: apache2(httpd-2.0.55)
SSL worked fine.
After world refresh, error log contains the fallowing:
[Sun Jul 02 16:07:06 2006] [notice] child pid 8329 exit signal Segmentation fault (11)

emerge -pv apache

[ebuild   R   ] net-www/apache-2.0.58  USE="apache2 doc ldap mpm-peruser ssl threads -debug -mpm-leader -mpm-prefork -mpm-threadpool -mpm-worker -no-suexec -static-modules" 0 kB

I attach the config and emerge log file and emerge info. Please help me.
Comment 1 Papp Zoltan 2006-07-02 07:24:28 UTC
Created attachment 90684 [details]
ssl request worked fine since three day

sorry, I'm sick, I can't browse my log and find the bug... but it is since 2 day present, and I'd like work with it.
The config file of httpd.conf differ only the fallowing from origin:
AddType text/html      php5
AddHandler php5-script php5
AddHandler php-script  php5
AddDefaultCharset UTF-8
Comment 2 Papp Zoltan 2006-07-02 07:31:52 UTC
Created attachment 90686 [details]
error logged in this file

bug present since
[Sun Jul 02 08:54:26 2006]
Comment 3 Papp Zoltan 2006-07-02 07:36:58 UTC
Created attachment 90688 [details]
emerged packages since Jun 28, 2006 14:59:47

mybe some bugos merged packabe occure...
Comment 4 Papp Zoltan 2006-07-02 07:41:57 UTC
Created attachment 90689 [details]
mod_ssl.conf is default

I think it's unchanged
Comment 5 Papp Zoltan 2006-07-02 07:45:14 UTC
Created attachment 90690 [details]
and it's unchanged, too

sorry for too mutch files...
Comment 6 Papp Zoltan 2006-07-02 07:50:53 UTC
Created attachment 90691 [details]
conf.d/apache2

only added three params:
-D PHP5 -D SSL -D SSL_DEFAULT_VHOST

sorry, I've no idea, where is the bug... but segfault present, and I haven't enough energy.
Comment 7 Papp Zoltan 2006-07-02 07:56:35 UTC
Portage 2.1-r1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-gentoo-r9 i686)
=================================================================
System uname: 2.6.16-gentoo-r9 i686 Intel(R) Pentium(R) 4 Mobile CPU 1.40GHz
Gentoo Base System version 1.6.15
ccache version 2.3 [enabled]
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-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-O3 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="hu_HU.UTF-8"
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"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X a52 aac aalib acl alsa apache2 apm arts avi berkdb bitmap-fonts bzip2 cdr cli crypt cups curl dga directfb dlloader dri dts dv dvd dvdread eds emboss encode esd ffmpeg foomaticdb fortran gdbm gif gpm gstreamer gtk gtk2 imagemagick imlib ipv6 isdnlog java jpeg kde lame libg++ libwww lirc mad mikmod mjpeg mmx mmxext motif mp3 mpeg nas ncurses network nls nptl ogg opengl oss pam pcre pdflib perl png pppd python qt qt3 qt4 quicktime readline reflection scanner sdl session slang spell spl sse sse2 ssl symlink tcpd theora threads tiff truetype truetype-fonts type1-fonts udev unicode urandom usb v4l v4l2 vorbis xml xmms xorg xprint xv xvid yv12 zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU video_cards_radeon"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 8 Tim Yamin (RETIRED) gentoo-dev 2006-07-03 11:55:24 UTC
Not a security bug; remove flag.
Comment 9 grischa 2006-07-17 06:45:48 UTC
Hi, i`m not an expert in debugging, but it looks like the segmentation fault is related to /usr/lib64/apache2/modules/mod_ssl.so.

Is it a bug? Or do we have a wrong conf?

cheers,
grischa

Here`s what my (amateur) gdb-session says:
(how can i do it better?)
==========================================
 gdb `which apache2`
GNU gdb 6.4
Copyright 2005 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 "x86_64-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) set args -D SSL -D SSL_DEFAULT_VHOST -D DAV -D SVN -D JK -D PHP4 -X -k start
(gdb) b main
Breakpoint 1 at 0x42bdb0
(gdb) r
Starting program: /usr/sbin/apache2 -D SSL -D SSL_DEFAULT_VHOST -D DAV -D SVN -D JK -D PHP4 -X -k start
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 2919)]
[Switching to Thread 16384 (LWP 2919)]

Breakpoint 1, 0x000000000042bdb0 in main ()
(gdb) n
Single stepping until exit from function main,
which has no line number information.

Program received signal SIGSEGV, Segmentation fault.
0x00002b5afd960218 in ssl_hook_pre_connection () from /usr/lib64/apache2/modules/mod_ssl.so
(gdb)

#0  0x00002b5afd960218 in ssl_hook_pre_connection () from /usr/lib64/apache2/modules/mod_ssl.so
#1  0x0000000000430e71 in ap_run_pre_connection ()
#2  0x0000000000431084 in ap_process_connection ()
#3  0x000000000042571f in child_main ()
#4  0x0000000000425954 in make_child ()
#5  0x0000000000425a2e in startup_children ()
#6  0x000000000042610b in ap_mpm_run ()
#7  0x000000000042c3b0 in main ()

is it ok to hook on "ssl_hook_pre_connection"?:
=========================================
(gdb) b ssl_hook_pre_connection
Function "ssl_hook_pre_connection" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (ssl_hook_pre_connection) pending.
(gdb) r
Starting program: /usr/sbin/apache2 -D SSL -D SSL_DEFAULT_VHOST -D DAV -D SVN -D JK -D PHP4 -X -k start
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 2941)]
Breakpoint 2 at 0x2b0dfbf6b200
Pending breakpoint "ssl_hook_pre_connection" resolved
(98)Address already in use: make_sock: could not bind to address [::]:443
no listening sockets available, shutting down
Unable to open logs
warning: Temporarily disabling breakpoints for unloaded shared library "/usr/lib64/apache2/modules/mod_ssl.so"







here my emerge info:
==============================================================
emerge --info
Portage 2.1-r1 (default-linux/amd64/2005.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-gentoo-r13 x86_64)
=================================================================
System uname: 2.6.16-gentoo-r13 x86_64 AMD Opteron(tm) Processor 242
Gentoo Base System version 1.6.15
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.3.5-r2, 2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
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="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=opteron -pipe -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=opteron -pipe -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo/"
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"
PORTDIR_OVERLAY="/usr/portage/local/overlays/local /usr/portage/local/overlays/Ebuild"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 alsa apache2 avi bash-completion berkdb bitmap-fonts bzip2 cli crypt cups dlloader eds emboss encode foomaticdb fortran gif gpm gstreamer imlib ipv6 isdnlog jpeg lzw lzw-tiff mp3 mpeg mysql ncurses nls opengl pam pcre pdflib perl png pppd python qt3 qt4 readline reflection sdl session spell spl ssl tcpd tiff truetype-fonts type1-fonts unicode usb xorg xpm xv zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_mga video_cards_vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 10 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-07-19 09:34:19 UTC
*** Bug 141005 has been marked as a duplicate of this bug. ***
Comment 11 grischa 2006-07-20 06:52:08 UTC
With openssl-0.9.8b the error seems to be gone...mod_ssl works fine now.

(unmask/emerge dev-libs/openssl-0.9.8b & emerge apache again)
Comment 12 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-08-16 13:46:52 UTC
*** Bug 132016 has been marked as a duplicate of this bug. ***
Comment 13 Markus Tacker 2006-08-17 02:11:51 UTC
I've emerged openssl-0.9.8b and remerged apache-2.0.59 but the error persists.

0xb7b473a3 in ssl_hook_pre_connection (c=0x81b28d0, csd=0x81b27f8) at mod_ssl.c:274
274     mod_ssl.c: Datei oder Verzeichnis nicht gefunden.
        in mod_ssl.c

#0  0xb7b473a3 in ssl_hook_pre_connection (c=0x81b28d0, csd=0x81b27f8) at mod_ssl.c:274
#1  0x080737a9 in ap_run_pre_connection (c=0x81b28d0, csd=0x81b27f8) at connection.c:44
#2  0x080739e7 in ap_process_connection (c=0x81b28d0, csd=0x81b27f8) 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=0xbffbb890, plog=0x80cf158, s=0xbffbb894)
    at prefork.c:941
#7  0x0806ea10 in main (argc=12, argv=0xbffbba34) at main.c:623
Comment 14 Markus Tacker 2006-08-17 02:32:40 UTC
After rebuilding apr, apr-util and apache I get a slightly different segfault.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213166768 (LWP 23659)]
0xb7a773a3 in ssl_hook_pre_connection () from /usr/lib/apache2/modules/mod_ssl.so

(gdb) 
(gdb) where
#0  0xb7a773a3 in ssl_hook_pre_connection () from /usr/lib/apache2/modules/mod_ssl.so
#1  0xb7adf0f8 in ?? () from /usr/lib/apache2/modules/mod_logio.so
#2  0x081ad8a8 in ?? ()
#3  0xb7adef2a in ?? () from /usr/lib/apache2/modules/mod_logio.so
#4  0xb7adeced in logio_pre_conn () from /usr/lib/apache2/modules/mod_logio.so
#5  0xb7adef2a in ?? () from /usr/lib/apache2/modules/mod_logio.so
#6  0x00000000 in ?? ()
(gdb) 
Comment 15 Markus Tacker 2006-09-26 02:19:36 UTC
Upgrading to (masked) apache-2.2 fixed this issue for me.
Comment 16 Papp Zoltan 2006-10-10 04:20:07 UTC
Apache 2.0.59
apr-0.9.12
apr-util-0.9.12
openssl 0.9.8d:

tail -f /var/log/apache2/error_log:

[Tue Oct 10 11:56:24 2006] [notice] child pid 10131 exit signal Segmentation fault (11)
[Tue Oct 10 12:14:15 2006] [notice] caught SIGTERM, shutting down
[Tue Oct 10 12:14:20 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Tue Oct 10 12:14:21 2006] [notice] Digest: generating secret for digest authentication ...
[Tue Oct 10 12:14:21 2006] [notice] Digest: done
[Tue Oct 10 12:14:25 2006] [notice] Apache configured -- resuming normal operations
[Tue Oct 10 12:15:03 2006] [notice] child pid 22561 exit signal Segmentation fault (11)

[ebuild   R   ] net-www/apache-2.0.59  USE="apache2 doc ldap mpm-peruser ssl threads -debug -mpm-itk -mpm-leader -mpm-prefork -mpm-threadpool -mpm-worker (-selinux) -static-modules
Comment 17 Papp Zoltan 2006-10-10 05:38:07 UTC
gdb `which apache2`
GNU gdb 6.4
Copyright 2005 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 "i686-pc-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) set args -D DEFAULT_VHOST -D PHP5 -D SSL -D SSL_DEFAULT_VHOST -X -k start
(gdb) b main
Breakpoint 1 at 0x80717b5
(gdb) r
Starting program: /usr/sbin/apache2 -D DEFAULT_VHOST -D PHP5 -D SSL -D SSL_DEFAULT_VHOST -X -k start
(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)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1213245776 (LWP 25662)]
[Switching to Thread -1213245776 (LWP 25662)]

Breakpoint 1, 0x080717b5 in main ()
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) n
Program not restarted.
(gdb) n
Single stepping until exit from function main,
which has no line number information.

Program received signal SIGSEGV, Segmentation fault.
0x08068b11 in cleanup_server_environments ()
(gdb) n
Single stepping until exit from function cleanup_server_environments,
which has no line number information.
Comment 18 Laitr Keiows 2007-06-05 08:42:48 UTC
Could you try this patch:
http://mastermind.ev6.net/code/peruser.patch

It helped me. Also read this:
http://www.telana.com/pipermail/peruser/2007-March/000746.html
Comment 19 Christian Heim (RETIRED) gentoo-dev 2007-06-15 15:45:02 UTC
Guess this is fixed with a recent version of apache ? (Like apache-2.2.4-r6 for example)