After upgrading to apache-2.0.54-r31 from -r15 and moving my custom configuration file, I could no longer access files below directories which included a DirectoryIndex directive (either in a <Directory> section or in a .htaccess file). Each time I tried to access such a file I received a message in the error_log: "child pid XXXXX exit signal Segmentation fault (11)". (I am using prefork.c) I was able to overcome this problem only by adding "DirectoryIndex index.html" in the main configuration section. This was not the behavior of apache-2.0.54-r15, and is not the behavior described in the Apache documentation. Reproducible: Always Steps to Reproduce: 1. Remove the DirectoryIndex directive from line 492 of the Gentoo supplied /etc/apache2/httpd.conf. 2. Add '-D USERDIR' to APACHE2_OPTS in /etc/conf.d/apache2. 3. Reload apache. 4. Create a .htaccess file in the user's public_html directory which includes the line "DirectoryIndex index.html". 5. Try to access that directory. Actual Results: No web page or directory delivered. Segmentation fault reported in error_log. Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r1, 2.6.12-gentoo-r10 i686) ================================================================= System uname: 2.6.12-gentoo-r10 i686 Intel(R) Celeron(TM) CPU 1400MHz Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5-r2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium3 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /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/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks fixpackages sandbox sfperms strict" GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo/ ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://128.213.5.34/gentoo/" LANG="en_US.ISO-8859-1" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="x86 X X509 aavm acl alsa apache2 apm arts avi bash-completion berkdb bitmap-fonts cdr crypt cscope cups curl directfb doc eds emboss encode esd evms2 extensions fam fbcon flac foomaticdb fortran gd gdbm gif gmp gnome gphoto2 gpm gstreamer gtk gtk2 hardenedphp icq imagemagick imlib innodb ipv6 java javascript jikes jpeg jpeg2k junit kde kerberos ldap libg++ libwww mad mailwrapper mikmod motif mozcalendar mozdevelop mozilla mozsvg mozxmlterm mp3 mpeg mysql mysqli ncurses nls nptl nptlonly nsplugin ogg oggvorbis opengl oss pam pcre pdflib perl pic png ppds python qt quicktime readline samba sasl sdl slang spell sse ssl svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts unicode usb userlocales vorbis wmf xml xml2 xmms xprint xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Confirmed/reproduced on my own system, debugging now.
ok, I'm pretty sure the patch we apply to create AddDirectoryIndex and RemoveDirectoryIndex is causing this, but I am not sure exactly why. I've believe I've narrowed it down to an apr_array_append line. Someone suggested that -fomit-frame-pointers may be the issue, but the bug is still reproducable for my with that not in my CFLAGS, and I don't see them in the reporter's CFLAGS. I suspect this is triggered if AddDirectoryIndex is called before any DirectoryIndex is called. Maybe a check to make AddDirectoryIndex just call DirectoryIndex if there is none yet. I will need to look into this more, unfortunetly, I am short on time until Tuesday. Thanks for the report!!!
> > I suspect this is triggered if AddDirectoryIndex is called before any > DirectoryIndex is called. Maybe a check to make AddDirectoryIndex just call > DirectoryIndex if there is none yet. The segfault always happens if DirectoryIndex is called in a subcontext if global DirectoryIndex is undefined or set to nothing.
*** Bug 117788 has been marked as a duplicate of this bug. ***
I can reproduce this problem using version 1.3.33-r13 & 1.3.34-r10 of apache. 1.3.32-r1 is unaffected. If the DirectoryIndex directive is used in any <Directory> or <Location> section I get the "Segmentation fault (11)" error message in the error log. Downgrading to 1.3.32 fixes the problem.
*** Bug 111843 has been marked as a duplicate of this bug. ***
I've rewritten the patch, and this should be fixed starting with 2.0.55-r2. I will work on backporting the rewritten patch to 1.3 this weekend.
apache-1.3.34-r12 is now in the tree with the fixed patch.
> I've rewritten the patch, and this should be fixed starting with 2.0.55-r2. Sorry for being 'nasty' but I have just installed 2.0.55-r2 (instead of r1) and the problem is not solved for me... :( I will switch to 2.2.0 because I am running short of time and cannot investigate any further the issue. :(
Hello again, > I've rewritten the patch, and this should be fixed starting with 2.0.55-r2. I think my previous message was a bit misleading. As a matter of fact, I can get .html files from apache. It's PHP who does not work and I don't really understand why. If I use this VERY advanced test.php file: more /var/www/localhost/htdocs/test.php <?php phpinfo(); ?> I get, tail /var/log/apache2/error_log : [Fri Apr 07 12:55:59 2006] [notice] child pid 24683 exit signal Segmentation fault (11) [Fri Apr 07 12:55:59 2006] [notice] child pid 24684 exit signal Segmentation fault (11) Any comment welcome...
Hello, This will be my last comment for the day. I found the source of my problem. Sorry for the noise. I basically had "-D PHP4 -D PHP5' in the /etc/conf.f/apache2 file when it should be either '-D PHP4' or '-D PHP5'. Having both caused a segmentation fault. I suppose Apache could not choose which one was supposed to be used... Daniel > As a matter of fact, I can get .html files from apache. It's PHP who does not > work and I don't really understand why. > If I use this VERY advanced test.php file: > more /var/www/localhost/htdocs/test.php > <?php > phpinfo(); > ?> > > I get, > tail /var/log/apache2/error_log : > [Fri Apr 07 12:55:59 2006] [notice] child pid 24683 exit signal Segmentation > fault (11) > [Fri Apr 07 12:55:59 2006] [notice] child pid 24684 exit signal Segmentation > fault (11) > > Any comment welcome... >