Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 106808 - 07_all_mod_dir_incremental.patch segfault
Summary: 07_all_mod_dir_incremental.patch segfault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Michael Stewart (vericgar) (RETIRED)
URL:
Whiteboard:
Keywords:
: 111843 117788 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-21 09:12 UTC by Rick Morra
Modified: 2006-04-07 04:10 UTC (History)
3 users (show)

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 Rick Morra 2005-09-21 09:12:14 UTC
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
Comment 1 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-09-21 18:59:59 UTC
Confirmed/reproduced on my own system, debugging now.
Comment 2 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-09-21 21:01:32 UTC
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!!!
Comment 3 Bernd Dorn 2005-10-18 02:16:30 UTC
> 
> 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.
  

Comment 4 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-01-04 17:41:06 UTC
*** Bug 117788 has been marked as a duplicate of this bug. ***
Comment 5 Steve 2006-01-07 10:04:51 UTC
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.
Comment 6 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-03-30 19:11:13 UTC
*** Bug 111843 has been marked as a duplicate of this bug. ***
Comment 7 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-03-31 18:58:54 UTC
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.
Comment 8 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2006-04-01 15:24:08 UTC
apache-1.3.34-r12 is now in the tree with the fixed patch.
Comment 9 Daniel Tourde 2006-04-07 02:23:00 UTC
> 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. :(
Comment 10 Daniel Tourde 2006-04-07 03:42:59 UTC
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...
Comment 11 Daniel Tourde 2006-04-07 04:10:18 UTC
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...
>