After struggling for two days, I've managed to install Apache2.2.9 + ModPerl2.0.4.
Three crucial things were needed:
   1. build mod_perl as a DSO and not static
   2. build apache --with-included-apr
   3. build libapreq2  --with-apr-config --with-apu-config

I've started apache and tried to access a dynamic webpage (content via PerlHandler) but got a SegFault. I then recompiled mod_perl with MP_DEBUG=1 and used http://perl.apache.org/docs/2.0/devel/debug/c.html as a reference.

and here is the gdb backtrace:
#0 0xb7cbdf94 in Perl_sv_clear () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #1 0xb7cbe615 in Perl_sv_free () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #2 0xb7cb1a4f in Perl_av_undef () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #3 0xb7cbe2e3 in Perl_sv_clear () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #4 0xb7cbe615 in Perl_sv_free () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #5 0xb7c8da95 in Perl_pad_undef () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #6 0xb7c7f9fc in Perl_cv_undef () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #7 0xb7cbe275 in Perl_sv_clear () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #8 0xb7cbe615 in Perl_sv_free () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #9 0xb7cc8e03 in Perl_sv_setsv_flags () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #10 0xb7cb8750 in Perl_pp_sassign () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #11 0xb7cb290f in Perl_runops_standard () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #12 0xb7c52ffe in Perl_magicname () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #13 0xb7c57806 in Perl_call_sv () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #14 0xb7d78911 in modperl_callback () from /usr/local/httpd_perl/modules/mod_perl.so #15 0xb7d79279 in modperl_callback_run_handlers () from /usr/local/httpd_perl/modules/mod_perl.so #16 0xb7d797f5 in modperl_callback_per_srv () from /usr/local/httpd_perl/modules/mod_perl.so #17 0xb7d983f1 in modperl_post_read_request_handler () from /usr/local/httpd_perl/modules/mod_perl.so
#18 0x0806995b in ap_run_post_read_request (r=0x8adfdc0) at protocol.c:1669
#19 0x0806bc24 in ap_read_request (conn=0x8ad27a8) at protocol.c:1011
#20 0x0808d785 in ap_process_http_connection (c=0x8ad27a8) at http_core.c:183
#21 0x0807d909 in ap_run_process_connection (c=0x8ad27a8) at connection.c:43
#22 0x080a1915 in child_main (child_num_arg=<value optimized out>) at prefork.c:650
#23 0x080a1bd7 in make_child (s=0x8a6e4d8, slot=2) at prefork.c:746
#24 0x080a1c94 in startup_children (number_to_start=3) at prefork.c:764
#25 0x080a2719 in ap_mpm_run (_pconf=0x80c80a8, plog=0x81061a0, s=0x8a6e4d8) at prefork.c:985
#26 0x08064485 in main (argc=135028896, argv=0x8ad05c8) at main.c:730


Operating System: CentOS 5.2
Perl 5.8.8
Apache 2.2.9
ModPerl 2.0.4
libapreq2.08


The perlhandler is simple enough, I found that if I comment the following code from my handler and restart apache, it will run ok.
my @param_names = $r->param;
  foreach (@param_names) {
      $form->{$_} = $r->param($_);
}
in the code above $r = Apache2::Request->new(shift);

At the same time, I also have another dynamic website (PerlHandler) that runs ok.

Reply via email to