I noticed you list XML::Simple.  It is a favorite module of mine, but it uses
XML::Parser which uses the expat XML parser.  It is seems that mod_perl has problems
with XML::Parser.  This problem is supposed to be fixed in Apache 1.3.22, but I still
had problems with strange segfaults and munched scalers when using XML::Parser.  I
recommend switching XML parsers to one that doesn't use expat.  I had good luck using
XML::LibXML, especially after making a Simple API :)

Matthew Gerlach




John Chia wrote:

> Hi,
>
> I have a very annoying problem with mod_perl segfaulting.  It must be
> some perl code, but I cannot isolate where.  Here are the symptoms, all
> running on 7.2:
>
> 1) does not happen with apache/mod_perl compiled and linked on RedHat 6.2
> 2) does not happen with apache/mod_perl statically linked on Redhat 7.2
> 3) does happen with apache from 6.2 and mod_perl (re)linked on 7.2
>
> I don't really want to go static, plus I'm a good guinea pig for this
> sort of thing!  Stack traces...
>
> ** gdb 'where' after segfaulting:
>
> #0  __pthread_mutex_lock (mutex=0x67617765) at mutex.c:99
> #1  0x401b0974 in __libc_free (mem=0x40515b18) at malloc.c:3152
> #2  0x404bdb08 in Perl_sv_clear () from /usr/lib/apache/libperl.so
> #3  0x404bdd3f in Perl_sv_free () from /usr/lib/apache/libperl.so
> #4  0x404b7bf4 in S_visit () from /usr/lib/apache/libperl.so
> #5  0x404b7c87 in Perl_sv_clean_all () from /usr/lib/apache/libperl.so
> #6  0x4046f08e in perl_destruct () from /usr/lib/apache/libperl.so
> #7  0x4044ee2b in perl_shutdown () from /usr/lib/apache/libperl.so
> #8  0x4044f2a5 in mp_dso_unload () from /usr/lib/apache/libperl.so
> #9  0x080525f9 in ap_run_cleanup () at eval.c:41
> #10 0x080510cb in ap_clear_pool () at eval.c:41
> #11 0x08060220 in ap_child_terminate () at eval.c:41
> #12 0x08060c03 in main () at eval.c:41
> #13 0x40150306 in __libc_start_main (main=0x8060780 <main>, argc=2,
>     ubp_av=0xbffffb54, init=0x804fb20 <_init>, fini=0x8089450 <_fini>,
>     rtld_fini=0x4000d2cc <_dl_fini>, stack_end=0xbffffb4c)
>     at ../sysdeps/generic/libc-start.c:129
>
> ** strace is not at all helpful..  reads mime.types, opens access_log
> and does some rt_sigprocmask stuff then SIGSEGV.
>
> ** Interactive debugger via Apache::DB .. (sorry bout the mess)
>
> DBI::CODE(0x884e440)(/usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm:349):
> 349:        return unless defined &DBI::trace_msg; # return unless
> bootstrap'd ok
> DBI::CODE(0x884e440)(/usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm:350):
> 350:        local ($!,$?);
> DBI::CODE(0x884e440)(/usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm:351):
> 351:        DBI->trace_msg("    -- DBI::END\n", 2);
> DBI::CODE(0x884e440)(/usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm:353):
> 353:        $DBI::PERL_ENDING = $DBI::PERL_ENDING = 1;  # avoid typo
> warning
> DBI::CODE(0x884e440)(/usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm:354):
> 354:        DBI->disconnect_all() if %DBI::installed_drh;
> AppConfig::State::AUTOLOAD(/usr/lib/perl5/site_perl/5.6.1/AppConfig/State.pm:449):
> 449:        my $self = shift;
> AppConfig::State::AUTOLOAD(/usr/lib/perl5/site_perl/5.6.1/AppConfig/State.pm:450):
> 450:        my ($variable, $attrib);
> AppConfig::State::AUTOLOAD(/usr/lib/perl5/site_perl/5.6.1/AppConfig/State.pm:454):
> 454:        ($variable = $AUTOLOAD) =~ s/.*:://;
> AppConfig::State::AUTOLOAD(/usr/lib/perl5/site_perl/5.6.1/AppConfig/State.pm:457):
> 457:        $variable eq 'DESTROY' && return;
> AppConfig::AUTOLOAD(/usr/lib/perl5/site_perl/5.6.1/AppConfig.pm:206):
> 206:        my $self = shift;
> AppConfig::AUTOLOAD(/usr/lib/perl5/site_perl/5.6.1/AppConfig.pm:207):
> 207:        my $method;
> AppConfig::AUTOLOAD(/usr/lib/perl5/site_perl/5.6.1/AppConfig.pm:211):
> 211:        ($method = $AUTOLOAD) =~ s/.*:://;
> AppConfig::AUTOLOAD(/usr/lib/perl5/site_perl/5.6.1/AppConfig.pm:214):
> 214:        $method eq 'DESTROY' && return;
> Segmentation fault
>
> ** Semi-complete module list:
> perl-HTML-Table-1.12a-3mtl
> perl-Log-Agent-0.2.8-3mtl
> perl-MLDBM-2.00-7mtl
> perl-URI-1.17-5mtl
> perl-Storable-1.0.13-3mtl
> perl-Filesys-Statvfs_Df-0.67-4mtl
> perl-Proc-ProcessTable-0.33-4mtl
> perl-IO-Interface-0.97-6mtl
> perl-DBD-Pg-1.01-5mtl
> perl-libnet-1.0704-8mtl
> perl-Apache-GTopLimit-0.01-3mtl
> perl-Crypt-SSLeay-0.31-5mtl
> perl-Net-IMAP-Simple-0.93-4mtl
> perl-App-Config-1.09-5mtl
> perl-FreezeThaw-0.41-6mtl
> perl-GTop-0.10-4mtl
> perl-POE-0.17-4mtl
> perl-Authen-Smb-0.91-3mtl
> perl-Convert-ASN1-0.07-1
> perl-IMAP-Admin-1.5.1-3mtl
> perl-Net-SNMP-3.5-1
> perl-HTML-Mason-1.04-6mtl
> perl-GDGraph-1.33-6mtl
> perl-XML-Writer-0.4-0
> perl-Time-HiRes-01.20-7mtl
> perl-Archive-Tar-0.22-6mtl
> perl-XML-Parser-2.30-7
> perl-Adaptor-0.2-1
> perl-GD-1.33-9mtl
> perl-Apache-DB-0.06-1mtl
> perl-ldap-0.25-5mtl
> perl-Params-Validate-0.07-4mtl
> perl-GDTextUtil-0.80-6mtl
> perl-HTML-Parser-3.25-5mtl
> perl-Net-DNS-0.12-6mtl
> perl-Net-Printer-0.20-1
> perl-MIME-Base64-2.12-7mtl
> perl-Net-Finger-1.05-5mtl
> perl-MLM-0.1-1
> perl-Sys-CpuLoad-0.01-7mtl
> perl-Digest-MD5-2.13-1
> perl-libapreq-0.33-4mtl
> perl-Apache-Session-1.54-4mtl
> perl-5.6.1-3mtl
> perl-XML-Simple-1.05-1mtl
> perl-NNTPClient-0.37-6mtl
> perl-DBI-1.20-5mtl
> perl-Compress-Zlib-1.14-5mtl
> perl-libwww-perl-5.60-9mtl
> perl-Authen-Challenge-Basic-0.1-1
> perl-AppConfig-1.52-7mtl
>
> Anything else I can provide?  TIA!
>
> --
> john chia <[EMAIL PROTECTED]>                                  starnix inc.
> tollfree: 1-87-pro-linux                        thornhill, ontario, canada
> http://www.starnix.com              professional linux services & products

Reply via email to