[Catalyst] Catalyst modperl - child process segmentation fault

Terence Monteiro terence at deeproot.co.in
Mon Dec 8 09:01:18 GMT 2008


Terence Monteiro wrote:
> I'm running my Catalyst application on apache2 using modperl with mysql
> database accessed by DBIx::SearchBuilder. I'm getting the message in the
> apache2 error logs:
> 
> child pid 1140 exit signal Segmentation fault (11), possible core dump in /tmp
> 
> Following are the package versions:
> 
> apache2                             2.2.9-10
> apache2-dbg                         2.2.9-11
> apache2-mpm-prefork                 2.2.9-11
> apache2-utils                       2.2.3-4+etch6
> apache2.2-common                    2.2.9-11
> libapache2-mod-auth-pam             1.1.1-6.1
> libapache2-mod-auth-sys-group       1.1.1-6.1
> libapache2-mod-fastcgi              2.4.6-1
> libapache2-mod-perl2                2.0.4-4
> libapache2-mod-php5                 5.2.0-8+etch10
> libapache2-reload-perl              0.10-2
> 
> Catalyst and Perl module versions are:
> 
> Catalyst                5.7014
> DBIx::SearchBuilder     1.54
> mysql-server-5.0        5.0.32-7etch5
> 
> I did a backtrace, which I posted to the modperl mailing list. One reply
> said that the cause may be initializing a DB handle at startup and using it
> in the child process. What needs to be done differently to ensure this does
> not happen? I am initializing the database connection in a Controller. Is
> there any problem in this, though it may not be the best design. Will
> putting the database initialization code in the Model help? I have included
> the backtrace for your information. Have I missed anything?
> 
> #0  0xb6038590 in mysql_ping () from /usr/lib/libmysqlclient.so.15
> #1  0xb61e9d93 in XS_DBD__mysql__db_ping () from
> /usr/lib/perl5/auto/DBD/mysql/mysql.so
> #2  0xb6e03088 in XS_DBI_dispatch () from /usr/lib/perl5/auto/DBI/DBI.so
> #3  0xb7686975 in Perl_pp_entersub () from /usr/lib/libperl.so.5.10
> #4  0xb7684d91 in Perl_runops_standard () from /usr/lib/libperl.so.5.10
> #5  0xb767ed08 in Perl_call_sv () from /usr/lib/libperl.so.5.10
> #6  0xb774ebfc in modperl_callback () from /usr/lib/apache2/modules/mod_perl.so
> #7  0xb774f2d3 in modperl_callback_run_handlers () from
> /usr/lib/apache2/modules/mod_perl.so
> #8  0xb774f9ca in modperl_callback_per_dir () from
> /usr/lib/apache2/modules/mod_perl.so
> #9  0xb77486ef in modperl_response_init () from
> /usr/lib/apache2/modules/mod_perl.so
> #10 0xb77488a3 in modperl_response_handler_cgi () from
> /usr/lib/apache2/modules/mod_perl.so
> #11 0x0807a179 in ap_run_handler (r=0xa42b298) at
> /tmp/buildd/apache2-2.2.9/server/config.c:159
> #12 0x0807d591 in ap_invoke_handler (r=0xa42b298) at
> /tmp/buildd/apache2-2.2.9/server/config.c:373
> #13 0x0808aff6 in ap_process_request (r=0xa42b298) at
> /tmp/buildd/apache2-2.2.9/modules/http/http_request.c:258
> #14 0x08088128 in ap_process_http_connection (c=0x927c208) at
> /tmp/buildd/apache2-2.2.9/modules/http/http_core.c:190
> #15 0x080815a9 in ap_run_process_connection (c=0x927c208) at
> /tmp/buildd/apache2-2.2.9/server/connection.c:43
> #16 0x0808fc0c in child_main (child_num_arg=<value optimized out>) at
> /tmp/buildd/apache2-2.2.9/server/mpm/prefork/prefork.c:672
> #17 0x0808ff63 in make_child (s=0x80ab908, slot=0) at
> /tmp/buildd/apache2-2.2.9/server/mpm/prefork/prefork.c:769
> #18 0x08090d68 in ap_mpm_run (_pconf=0x80a70c8, plog=0x80d9190,
> s=0x80ab908) at /tmp/buildd/apache2-2.2.9/server/mpm/prefork/prefork.c:904
> #19 0x08066f10 in main (argc=Cannot access memory at address 0x0
> ) at /tmp/buildd/apache2-2.2.9/server/main.c:732
> 

I don't face the problem when I run apache as a single process (MaxClients
= 1).

-- 
Thanks and Regards,
Terence Monteiro.

DeepRoot Linux,
http://www.deeproot.in
Ph: +91 (80) 4089 0000
Getting GNU/Linux to work for you. Faster. Better. Today. Every way




More information about the Catalyst mailing list