You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Greg Baumgartel <gb...@qmail.qwest.net> on 2002/10/07 19:08:57 UTC

[users@httpd] Child Segmentation Fault closing .htaccess

Hello,

I've been having a problem where child Apache httpd processes die with a 
segfault when closing the .htaccess file.  When the .htaccess file is 
non-existant, or empty, or doesn't actually direct it to do any 
authentication, the server behaves normally.  This happens under both 
1.3.26 and 1.3.27.  I am on Solaris 8, gcc 3.2.  Seems to happen with both 
SSL and non-SSL connections.  It also happens with different kinds of 
authentication - both Basic and mod_securid auths cause it to segfault.  A 
search of the web/newsgroups and the Apache bug DB didn't seem to have 
anything like this.

Anyone seen anything like this?  Or have a fix?

Here is the compile command used to build it:

make distclean
OPTIM=-O2 \
SSL_BASE=../openssl-0.9.6g \
RSA_BASE=../rsaref-2.0/local \
EAPI_MM=../mm-1.1.3 \
./configure \
         --prefix=/usr/local/apache \
         --enable-module=so \
         --enable-module=access --enable-shared=access \
         --enable-module=actions --enable-shared=actions \
         --enable-module=alias --enable-shared=alias \
         --enable-module=asis --enable-shared=asis \
         --enable-module=auth --enable-shared=auth \
         --enable-module=autoindex --enable-shared=autoindex \
         --enable-module=cgi --enable-shared=cgi \
         --enable-module=dir --enable-shared=dir \
         --enable-module=env --enable-shared=env \
         --enable-module=imap --enable-shared=imap \
         --enable-module=include --enable-shared=include \
         --enable-module=info --enable-shared=info \
         --enable-module=log_config --enable-shared=log_config \
         --enable-module=mime --enable-shared=mime \
         --enable-module=mime_magic --enable-shared=mime_magic \
         --enable-module=negotiation --enable-shared=negotiation \
         --enable-module=rewrite --enable-shared=rewrite \
         --enable-module=setenvif --enable-shared=setenvif \
         --enable-module=status --enable-shared=status \
         --enable-module=userdir --enable-shared=userdir \
         --enable-module=usertrack --enable-shared=usertrack \
         --enable-module=ssl --enable-shared=ssl \
         --activate-module=src/modules/perl/libperl.a \
         --disable-rule=SSL_COMPAT
make -j 3


I did have to fix mod_negotiation to use the GCC 3.2 libgcc file after 
doing this, but that seems to have worked fine.

This is the truss output from one of the child httpd processes that dies 
when it closes the .htaccess:


fcntl(27, F_SETLKW64, 0x001B30F0) (sleeping...)
signotifywait()                 (sleeping...)
lwp_sema_wait(0xFE30DE30)       (sleeping...)
fcntl(27, F_SETLKW64, 0x001B30F0)               = 0
poll(0xFFBEF608, 2, -1)                         = 1
accept(15, 0xFFBEF720, 0xFFBEF71C, 1)           = 29
fcntl(27, F_SETLKW64, 0x001B3120)               = 0
sigaction(SIGUSR1, 0xFFBEF560, 0xFFBEF660)      = 0
getsockname(29, 0xFFBEF730, 0xFFBEF71C, 1)      = 0
setsockopt(29, 6, 1, 0xFFBEF69C, 4, 1)          = 0
brk(0x002F5F08)                                 = 0
brk(0x002F7F08)                                 = 0
brk(0x002F7F08)                                 = 0
brk(0x002F9F08)                                 = 0
time()                                          = 1034008484
getpid()                                        = 2480 [2448]
write(10, " [ 0 7 / O c t / 2 0 0 2".., 125)    = 125
time()                                          = 1034008484
getpid()                                        = 2480 [2448]
time()                                          = 1034008484
time()                                          = 1034008484
time()                                          = 1034008484
time()                                          = 1034008484
getpid()                                        = 2480 [2448]
write(10, " [ 0 7 / O c t / 2 0 0 2".., 77)     = 77
getpid()                                        = 2480 [2448]
brk(0x002F9F08)                                 = 0
brk(0x002FBF08)                                 = 0
time()                                          = 1034008484
getpid()                                        = 2480 [2448]
brk(0x002FBF08)                                 = 0
brk(0x002FFF08)                                 = 0
brk(0x002FFF08)                                 = 0
brk(0x00309F08)                                 = 0
brk(0x00309F08)                                 = 0
brk(0x0030DF08)                                 = 0
read(29, "160301\0 ]01\0\0 Y0301", 11)          = 11
time()                                          = 1034008484
getpid()                                        = 2480 [2448]
read(29, "\0 113A4 xF8E689\n\r1A k".., 87)      = 87
time()                                          = 1034008484
fcntl(28, F_SETLKW64, 0xFED85BC8)               = 0
brk(0x0030DF08)                                 = 0
brk(0x0030FF08)                                 = 0
open64("/usr/local/apache/logs/ssl_scache.pag", O_RDONLY) = 30
open64("/usr/local/apache/logs/ssl_scache.pag", O_RDONLY) = 30
open64("/usr/local/apache/logs/ssl_scache.dir", O_RDONLY) = 31
fstat64(31, 0xFFBEEF98)                         = 0
llseek(30, 0, SEEK_SET)                         = 0
read(30, "\00203E003 H\0\0\0\0\0\0".., 1024)    = 1024
close(31)                                       = 0
close(30)                                       = 0
fcntl(28, F_SETLKW64, 0xFED85BF8)               = 0
time()                                          = 1034008484
time()                                          = 1034008484
time()                                          = 1034008484
time()                                          = 1034008484
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
write(29, "160301\0 J02\0\0 F0301 =".., 122)    = 122
write(29, "160301\0 J02\0\0 F0301 =".., 122)    = 122
read(29, "140301\001", 5)                       = 5
read(29, "01", 1)                               = 1
read(29, "160301\0  ", 5)                       = 5
read(29, "F9 [C5 xE3E3 581 dFCF5 8".., 32)      = 32
time()                                          = 1034008484
getpid()                                        = 2480 [2448]
write(10, " [ 0 7 / O c t / 2 0 0 2".., 123)    = 123
read(29, "17030101D5 { YD5 " ;D4 ]".., 34821)   = 474
sigaction(SIGUSR1, 0xFFBED468, 0xFFBED568)      = 0
time()                                          = 1034008484
time()                                          = 1034008484
getpid()                                        = 2480 [2448]
write(10, " [ 0 7 / O c t / 2 0 0 2".., 119)    = 119
stat64("/usr/local/apache/htdocs-secure", 0x002DEC70) = 0
open64("/usr/local/apache/htdocs-secure/.htaccess", O_RDONLY) = 30
fstat64(30, 0xFFBEF408)                         = 0
fstat64(30, 0xFFBED2D8)                         = 0
ioctl(30, TCGETA, 0xFFBED264)                   Err#25 ENOTTY
read(30, " A u t h N a m e\t " I P".., 8192)    = 75
read(30, 0x002FA21C, 8192)                      = 0
llseek(30, 0, SEEK_CUR)                         = 75
close(30)                                       = 0
     Incurred fault #6, FLTBOUNDS  %pc = 0xFEA1330C
       siginfo: SIGSEGV SEGV_MAPERR addr=0x00000078
     Received signal #11, SIGSEGV [caught]
       siginfo: SIGSEGV SEGV_MAPERR addr=0x00000078
sigaction(SIGSEGV, 0xFFBEEFE0, 0x00000000)      = 0
sigprocmask(SIG_SETMASK, 0xFF0EEFF0, 0x00000000) = 0
chdir("/usr/local/apache")                      = 0
sigaction(SIGSEGV, 0xFFBEEE60, 0xFFBEEF60)      = 0
getpid()                                        = 2480 [2448]
getpid()                                        = 2480 [2448]
kill(2480, SIGSEGV)                             = 0
signotifywait()                                 = 11
sigprocmask(SIG_SETMASK, 0xFF0FAD70, 0x00000000) = 0
sigprocmask(SIG_SETMASK, 0xFF0FAD70, 0xFFBEEFD0) = 0
lwp_sigredirect(1, SIGSEGV, 0xFFBEEF4C)         = 0
lwp_sigredirect(1, SIGSEGV, 0xFFBEEF4C)         Err#22 EINVAL
sigprocmask(SIG_SETMASK, 0xFFBEEFD0, 0x00000000) = 0
setcontext(0xFFBEEEC0)
     Received signal #11, SIGSEGV [default]
       siginfo: SIGSEGV pid=2480 uid=60001
         *** process killed ***


Thanks,

-- 
----------------------------------------------------------------------
Greg Baumgartel
Qwest Information Technologies
Lead SW Development Engineer                  gbaumgar@qmail.qwest.net


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Child Segmentation Fault closing .htaccess

Posted by Greg Baumgartel <gb...@qmail.qwest.net>.
William C (Bill) Jones wrote:
> On 10/7/02 1:38 PM, "Greg Baumgartel" <gb...@qmail.qwest.net> wrote:
> 
>>Your Perl is uselargefiles enabled, but Apache is not, suggestions:
>>   *) Rebuild mod_perl with Makefile.PL PERL_USELARGEFILES=0
>>   *) Rebuild Apache with CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
>>   *) Rebuild Perl with Configure -Uuselargefiles
>>   *) Let mod_perl build Apache (USE_DSO=1 instead of USE_APXS=1)
> 
> 

I've tried it a bit more.  I don't think it's mod_perl at all.  I took 
mod_perl out of the httpd.conf, didn't compile it into apache at all, and 
I'm still seeing the child segfaults.  It seems to be something dealing 
with the .htaccess files and auth modules....again, it only happens when 
there's an .htaccess that has an AuthType directive in it (both Basic and 
SecurID).

Thanks,

-- 
----------------------------------------------------------------------
Greg Baumgartel                                         (303) 226-9941
Qwest Information Technologies
Lead SW Development Engineer                  gbaumgar@qmail.qwest.net


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Child Segmentation Fault closing .htaccess

Posted by "William C (Bill) Jones" <wc...@fccj.edu>.
On 10/7/02 1:38 PM, "Greg Baumgartel" <gb...@qmail.qwest.net> wrote:
> Your Perl is uselargefiles enabled, but Apache is not, suggestions:
>    *) Rebuild mod_perl with Makefile.PL PERL_USELARGEFILES=0
>    *) Rebuild Apache with CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
>    *) Rebuild Perl with Configure -Uuselargefiles
>    *) Let mod_perl build Apache (USE_DSO=1 instead of USE_APXS=1)


I wonder why you are not getting that error?  Loading mod_perl internally
(IE, not as a DSO) has just about always caused the Seg 11 error...

-Bill-  ??
_Sx____________________
  ('>    iudicium ferat
  //\   Have Computer -
  v_/_    Will Hack...



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Child Segmentation Fault closing .htaccess

Posted by Greg Baumgartel <gb...@qmail.qwest.net>.
William C (Bill) Jones wrote:
> On 10/7/02 1:25 PM, "Greg Baumgartel" <gb...@qmail.qwest.net> wrote:
> 
> 
>>>>      --activate-module=src/modules/perl/libperl.a \
>>>
>>>
>>>Is Perl compiled with USELARGEFILES support ?
>>
> 
>>Yes, it is.  This has something to do with .htaccess stuff?  I can easily
>>recompile perl without it if it makes a difference.....
> 
> 
> 
> And when you built mod_perl it didn't warn you this was a problem?  I would
> try building mod_perl again BEFORE messing with Perl.  They can co-exist if
> done properly.
> 

I've re-build mod_perl (1.27) several times.  My basic recipe for this is:

perl Makefile.PL \
      APACHE_SRC=../apache_1.3.27/src \
      DO_HTTPD=1 \
      USE_APACI=1 \
      PREP_HTTPD=1 \
      EVERYTHING=1

make -j3

Didn't see any warnings about large file support.  Looking through 
Makefile.PL, though, I would expect this message if there were a problem:

Your Perl is uselargefiles enabled, but Apache is not, suggestions:
     *) Rebuild mod_perl with Makefile.PL PERL_USELARGEFILES=0
     *) Rebuild Apache with CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
     *) Rebuild Perl with Configure -Uuselargefiles
     *) Let mod_perl build Apache (USE_DSO=1 instead of USE_APXS=1)


Suppose I can try the first suggestion....

Thanks,
-- 
----------------------------------------------------------------------
Greg Baumgartel                                         (303) 226-9941
Qwest Information Technologies
Lead SW Development Engineer                  gbaumgar@qmail.qwest.net


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Child Segmentation Fault closing .htaccess

Posted by "William C (Bill) Jones" <wc...@fccj.edu>.
> And when you built mod_perl it didn't warn you this was a problem?  I would
> try building mod_perl again BEFORE messing with Perl.  They can co-exist if
> done properly.
> 

Sorry - hit the Send button too fast :/

Try -

perl Makefile.PL \
USE_APXS=1 \
WITH_APXS=/usr/local/apache/bin/apxs \
EVERYTHING=1 \
USE_DSO=1


HTH;
-Bill-  :]
_Sx____________________
  ('>    iudicium ferat
  //\   Have Computer -
  v_/_    Will Hack...



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Child Segmentation Fault closing .htaccess

Posted by "William C (Bill) Jones" <wc...@fccj.edu>.
On 10/7/02 1:25 PM, "Greg Baumgartel" <gb...@qmail.qwest.net> wrote:

>>>       --activate-module=src/modules/perl/libperl.a \
>> 
>> 
>> Is Perl compiled with USELARGEFILES support ?

> Yes, it is.  This has something to do with .htaccess stuff?  I can easily
> recompile perl without it if it makes a difference.....


And when you built mod_perl it didn't warn you this was a problem?  I would
try building mod_perl again BEFORE messing with Perl.  They can co-exist if
done properly.

HTH;
-Bill-  :]
_Sx____________________
  ('>    iudicium ferat
  //\   Have Computer -
  v_/_    Will Hack...



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Child Segmentation Fault closing .htaccess

Posted by Greg Baumgartel <gb...@qmail.qwest.net>.
William C (Bill) Jones wrote:
> On 10/7/02 1:08 PM, "Greg Baumgartel" <gb...@qmail.qwest.net> wrote:
> 
> 
>>       --activate-module=src/modules/perl/libperl.a \
> 
> 
> Is Perl compiled with USELARGEFILES support ?
> 
> Try 
> 
>  perl -V |grep LARGE
> 

Yes, it is.  This has something to do with .htaccess stuff?  I can easily 
recompile perl without it if it makes a difference.....

I'm using Perl 5.8.0.

Thanks,
-- 
----------------------------------------------------------------------
Greg Baumgartel                                         (303) 226-9941
Qwest Information Technologies
Lead SW Development Engineer                  gbaumgar@qmail.qwest.net


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Child Segmentation Fault closing .htaccess

Posted by "William C (Bill) Jones" <wc...@fccj.edu>.
On 10/7/02 1:08 PM, "Greg Baumgartel" <gb...@qmail.qwest.net> wrote:

>        --activate-module=src/modules/perl/libperl.a \

Is Perl compiled with USELARGEFILES support ?

Try 

 perl -V |grep LARGE

HTH;
-Bill-  :]
_Sx____________________
  ('>    iudicium ferat
  //\   Have Computer -
  v_/_    Will Hack...



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org