You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by George Sanderson <ge...@xorgate.com> on 2000/08/10 00:36:37 UTC

Apache 1.3.12/mod_perl 1.24/Perl 5.6.0 crash

I have Apache 1.3.12 using mod_perl 1.24 as a DSO, built with Perl 5.6.0
using Apache::AutoIndex 0.08 which is running on Linux 2.2.14.
Everything works fine, until, I `apachectl stop`, then add the following to
the httpd.conf:

PerlModule Apache::AutoIndex

When I do  `bin/httpd -X` Linux does a core dump.
Since I compiled in DEBUG the 'gdb bin/httpd core` reports a segmentation
fault with:

Program received signal SIGSEGV, Segmentation fault.
0x8054b09 in ap_remove_module ()
(gdb) bt
Program received signal SIGSEGV, Segmentation fault.
0x8054b09 in ap_remove_module ()
(gdb) bt
#0  0x8054b09 in ap_remove_module ()
#1  0x8054bdf in ap_remove_loaded_module ()
#2  0x804f2cc in unload_module ()
#3  0x805126e in run_cleanups ()
#4  0x804f910 in ap_clear_pool ()
#5  0x8060683 in standalone_main ()
#6  0x8060f23 in main ()
#7  0x2ab304a5 in __libc_start_main () from /lib/libc.so.6
#8  0x815b0000 in ?? ()
Cannot access memory at address 0xe853.
==============================================================
I don't understand why Apache/mod_perl has to remove a module when it
should be installing it.  Maybe its just a confusing naming convention or
something?

Note: that I believe I was careful to clean out old versions before the makes.

I did have to 'not use' "large file support" for the Perl 5.6.0 build in
order to get mod_perl to launch.

Please help!   ... and thankyou for any input.  (You all do great work!)



Re: Apache 1.3.12/mod_perl 1.24/Perl 5.6.0 crash

Posted by George Sanderson <ge...@xorgate.com>.
At 10:49 PM 8/10/00 +0200, you wrote:
>On Thu, Aug 10, 2000 at 07:39:24AM -0500, George Sanderson wrote:
>> At 12:22 PM 8/10/00 +0200, you wrote:
>> >
>> >with almost the same conf as your, I had a core dump even with httpd
>> >-t. I did a strace, and I noticed this is due to an inexistant module :
>> >Tie::*hash or something similar. A quick search on CPAN give me the
>> >package to install. After that, no more segfault ...
>> >
>> I did a strace and the last entries were:
>> 
>> munmap(0x2ae2c000, 9736)                = 0
>> --- SIGSEGV (Segmentation fault) ---
>> +++ killed by SIGSEGV +++
>> 
>> Could this be a lack of memory?
>
>dunno...
>if you haven't answer on the list, perhaps a more verbose strace trace
>could help...
>
>
>Good luck,

Thanks (I'd rather be lucky than good!-)
Recap:
I have Apache 1.3.12 using mod_perl 1.24 as a DSO, built with Perl 5.6.0
using Apache::AutoIndex 0.08 which is running on Linux 2.2.14. 
Everything works fine, until, I `apachectl stop`, then add the following to
the httpd.conf:
PerlModule Apache::AutoIndex
When I do `bin/httpd -X` Linux does a core dump.

I added more memory the computer but the program still crashes at the same
point.

Here's more of a more verbose strace ouput during the core dump. 
Any clues?
========================================
open("/usr/local/apache/logs/error_log.test", O_WRONLY|O_APPEND|O_CREAT,
0666) = 4
fcntl(4, F_DUPFD, 15)                   = 15
close(4)                                = 0
fcntl(15, F_GETFL)                      = 0x401 (flags O_WRONLY|O_APPEND)
fstat(15, {st_mode=S_IFREG|0644, st_size=13212, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2aac0000
_llseek(15, 0, [0], SEEK_CUR)           = 0
dup2(15, 2)                             = 2
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
open("/usr/local/apache/conf/apache-mime.types", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=7374, ...}) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=7374, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2aac8000
read(4, "# This is the default mime.types"..., 4096) = 4096
read(4, "m.EXT\napplication/vnd.osa.netdep"..., 4096) = 3278
brk(0x8480000)                          = 0x8480000
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x2aac8000, 4096)                = 0
open("/usr/local/apache/logs/access_log.test", O_WRONLY|O_APPEND|O_CREAT,
0644) = 4
fcntl(4, F_DUPFD, 15)                   = 16
close(4)                                = 0
getpid()                                = 1404
time(NULL)                              = 965956118
close(16)                               = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
munmap(0x2ad9d000, 14288)               = 0
munmap(0x2ae0a000, 16308)               = 0
munmap(0x2ae0e000, 13712)               = 0
munmap(0x2ae12000, 22668)               = 0
munmap(0x2ada1000, 9064)                = 0
munmap(0x2ae18000, 46408)               = 0
munmap(0x2ae24000, 29000)               = 0
munmap(0x2ae2c000, 9736)                = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
[========================================
I also did a PERL_TRACE of mod_perl.  The end of which was:
========================================
  5:           _compile();
   entering CGI::_compile
    665:            my($func) = $AUTOLOAD;

    666:            my($pack,$func_name);
    667:            {
    668:                local($1,$2); # this fixes an obscure variable
suicide problem.
    668:                local($1,$2); # this fixes an obscure variable
suicide problem.
    669:                $func=~/(.+)::([^:]+)$/;
    670:                ($pack,$func_name) = ($1,$2);
    671:                $pack=~s/::SUPER$//;    # fix another obscure problem
    673:                    unless defined(${"$pack\:\:AUTOLOADED_ROUTINES"});
    672:                $pack = ${"$pack\:\:AutoloadClass"} ||
$CGI::DefaultClass
    675:                my($sub) = \%{"$pack\:\:SUBS"};
    675:                my($sub) = \%{"$pack\:\:SUBS"};
    676:                unless (%$sub) {
    682:               my($code) = $sub->{$func_name};
    684:               $code = "sub $AUTOLOAD { }" if (!$code and
$func_name eq 'DESTROY');
    685:               if (!$code) {
    695:               die "Undefined subroutine $AUTOLOAD\n" unless $code;
    696:               eval "package $pack; $code";
    697:               if ($@) {
    702:            CORE::delete($sub->{$func_name});  #free storage
    703:            return "$pack\:\:$func_name";
   exited CGI::_compile
   2:       foreach (@_) {
  exited CGI::AUTOLOAD for CGI::_compile_all
 exited CGI::_setup_symbols
exited CGI::compile
46:     1;
3:
entering Config::DESTROY
exited Config::DESTROY
entering IO::Handle::DESTROY
exited IO::Handle::DESTROY
Carp::(/usr/local/lib/perl5/5.6.0/Carp.pm:97):
97:         { local $@; require Carp::Heavy; }  # XXX fix require to not
clear $@?
Carp::(/usr/local/lib/perl5/5.6.0/Carp.pm:97):
97:         { local $@; require Carp::Heavy; }  # XXX fix require to not
clear $@?
Carp::(/usr/local/lib/perl5/5.6.0/Carp.pm:97):
97:         { local $@; require Carp::Heavy; }  # XXX fix require to not
clear $@?
Carp::(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:253):
253:    1;
Carp::(/usr/local/lib/perl5/5.6.0/Carp.pm:98):
98:         goto &longmess_heavy;
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:30):
30:         return @_ if ref $_[0];
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:31):
31:         my $error = join '', @_;
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:32):
32:         my $mess = "";
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:33):
33:         my $i = 1 + $CarpLevel;
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:34):
34:         my ($pack,$file,$line,$sub,$hargs,$eval,$require);
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:35):
35:         my (@a);
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:39):
39:         while (do { { package DB; @a = caller($i++) } } ) {
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:39):
39:         while (do { { package DB; @a = caller($i++) } } ) {
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:125):
125:        my $msg = \($mess || $error);
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:126):
126:        $$msg =~ tr/\0//d;
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.0/Carp/Heavy.pm:127):
127:        $$msg;
========================================
Any help would be appreciated.