FAQ
NOTE: I posted have posted this question on Stackoverflow and have not yet
received an answer.
*********************************************

My mod_perl appears to cause a segmentation fault in my Apache. 'httpd -X'
simply gives 'Segmentation Fault' and my server does not start.

I am using Apache 2.2.22, mod_perl 2.0.5, CentOS 5.7 x86_64. I built
mod_perl and Apache together from source with the following command:

perl5.12.4 Makefile.PL MP_USE_STATIC=1
MP_AP_PREFIX=/usr/local/src/httpd-2.2.22
MP_AP_CONFIGURE="--with-mpm=prefork --enable-rewrite"

What I have tried so far:

Point httpd.conf to my Catalyst application. Result: Apache dies with
'Segmentation fault'.
Point httpd.conf to a simple application created with catalyst.pl.
Apache dies with 'Segmentation fault'.
Point httpd.conf to a static site. Result: Apache starts fine and
serves the website.

I tried the following:

gdb -c /usr/local/apache2/bin/httpd

Program received signal SIGSEGV, Segmentation fault.

0x00002aaab0db0270 in ?? ()

(gdb) bt

#0 0x00002aaab0db0270 in ?? ()

#1 0x00000000004c9d24 in Perl_newUNOP ()

#2 0x00000000004fb6a6 in Perl_yyparse ()

#3 0x0000000000557c57 in S_doeval ()

#4 0x0000000000559546 in Perl_pp_require ()

#5 0x0000000000528bae in Perl_runops_standard ()

#6 0x00000000004d5d2f in Perl_eval_sv ()

#7 0x0000000000478425 in modperl_require_module ()

#8 0x0000000000472283 in modperl_boot ()

#9 0x00000000005529cc in Perl_leave_scope ()

#10 0x00000000004d87eb in S_parse_body ()

#11 0x00000000004d927c in perl_parse ()

#12 0x0000000000471d2a in modperl_startup ()

#13 0x0000000000471cbc in modperl_startup ()

#14 0x000000000047202e in modperl_init ()

#15 0x000000000047215f in modperl_hook_init ()

#16 0x00000000004737bb in modperl_cmd_perldo ()

#17 0x000000000046432b in invoke_cmd (cmd=0x5b9880,
parms=0x7fffffffe770, mconfig=0x844728, args=0x89b7d8 "use lib qw(
/usr/local/apache2/virtualhosts/api.nwwi.nl /httpdocs/lib/ );\n") at
config.c:757

#18 0x0000000000465865 in ap_walk_config_sub (current=0x89b828,
parms=0x7fffffffe770, section_vector=0x830c18) at config.c:1163

#19 0x0000000000465914 in ap_walk_config (current=0x89b828,
parms=0x7fffffffe770, section_vector=0x830c18) at config.c:1196

#20 0x0000000000466cb9 in ap_process_config_tree (s=0x82de10,
conftree=0x86fcb0, p=0x822138, ptemp=0x82a178) at config.c:1765

#21 0x0000000000449512 in main (argc=2, argv=0x7fffffffe9e8) at
main.c:723

I have no idea how to read and interpret this. Can somebody help and point
me in a direction to further troubleshoot this?

Search Discussions

  • Dave Hodgkinson at Feb 17, 2012 at 2:30 pm

    On 17 Feb 2012, at 14:03, Mauritz Hansen wrote:

    #17 0x000000000046432b in invoke_cmd (cmd=0x5b9880,
    parms=0x7fffffffe770, mconfig=0x844728, args=0x89b7d8 "use lib qw(
    /usr/local/apache2/virtualhosts/api.nwwi.nl /httpdocs/lib/ );\n") at
    config.c:757
    This appears to be what it's trying to do. Take that directive
    out and see what happens?
  • Mauritz Hansen at Feb 20, 2012 at 2:25 pm
    Hi Dave,

    Thanks for this pointer. Got it fixed in the end by changing a part of my
    Apache configuration from

    PerlSwitches -I/srv/www/example.com/application/lib/
    <Perl>
    use lib qw( /srv/www/example.com/application/lib/ );
    </Perl>
    PerlModule application

    to

    <Perl>
    use lib qw( /srv/www/example.com/application/lib/ );
    </Perl>


    On 17 Feb 2012, at 14:03, Mauritz Hansen wrote:

    #17 0x000000000046432b in invoke_cmd (cmd=0x5b9880,
    parms=0x7fffffffe770, mconfig=0x844728, args=0x89b7d8 "use lib qw(
    /usr/local/apache2/virtualhosts/api.nwwi.nl /httpdocs/lib/ );\n") at
    config.c:757
    This appears to be what it's trying to do. Take that directive
    out and see what happens?


  • Dave Hodgkinson at Feb 20, 2012 at 3:10 pm
    So duplicating a path in -I and "use lib" casues a dump?

    Smells like a bug to me.

    On 20 Feb 2012, at 14:25, Mauritz Hansen wrote:

    Hi Dave,

    Thanks for this pointer. Got it fixed in the end by changing a part of my
    Apache configuration from

    PerlSwitches -I/srv/www/example.com/application/lib/
    <Perl>
    use lib qw( /srv/www/example.com/application/lib/ );
    </Perl>
    PerlModule application

    to

    <Perl>
    use lib qw( /srv/www/example.com/application/lib/ );
    </Perl>


    On 17 Feb 2012, at 14:03, Mauritz Hansen wrote:

    #17 0x000000000046432b in invoke_cmd (cmd=0x5b9880,
    parms=0x7fffffffe770, mconfig=0x844728, args=0x89b7d8 "use lib qw(
    /usr/local/apache2/virtualhosts/api.nwwi.nl /httpdocs/lib/ );\n") at
    config.c:757
    This appears to be what it's trying to do. Take that directive
    out and see what happens?


  • Andrew Merton at Feb 17, 2012 at 8:28 pm
    It may be nothing, but I spent 2 months (off and on) with a crashing
    mod_perl/Apache to discover that in my case it was the DateTime that was
    the cause.

    Hans (on the list) confirmed this and said "The latest DateTime and
    DateTime-TimeZone modules that work with mod_perl are DateTime 0.70 and
    DateTime-TimeZone 1.34."

    The root cause appears to be the Params::Classify module which loads
    Classify.dll - it is Classify.dll that is the problem. SInce P::C has a
    pure Perl implementation as well as the dll, I simplex moved the dll, and
    everything started working consistently. Hans reverted to the earlier
    DateTime, which worked for him.

    It may be totally unrelated to your problem, but I had many
    varying symptoms depending on configuration etc, and some of the errors
    gave no hint as to the problem being in Classify.dll.

    HTH :)


    My mod_perl appears to cause a segmentation fault in my Apache. 'httpd -X'
    simply gives 'Segmentation Fault' and my server does not start.

    I am using Apache 2.2.22, mod_perl 2.0.5, CentOS 5.7 x86_64. I built
    mod_perl and Apache together from source with the following command:

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmodperl @
categoriesmodperl, perl
postedFeb 17, '12 at 2:04p
activeFeb 20, '12 at 3:10p
posts5
users3
websiteperl.apache.org

People

Translate

site design / logo © 2018 Grokbase