[...](gdb) run -X -f /usr/local/apache/conf/httpd.conf -k start -DSSL -X Stas wrote:
Thanks for the trace with args, Jie, but it gives no new info.
Program received signal SIGSEGV, Segmentation fault. [Switching to LWP 12] 0xfea9bbbc in modperl_env_request_tie (my_perl=0x1026fe0, r=0x17a8c78) at modperl_env.c:355 355 EnvMgObj = (char *)r;
which expands to:
SvMAGIC((SV*)((((XPVGV*)(my_perl->Ienvgv->sv_any))->xgv_gp)->gv_hv))->mg_ptr = (char *)r;
so it's possible that my_perl->Ienvgv (which is PL_envgv) is corrupted, or any of the following members:
What do you get:
gdb> print my_perl->Ienvgv gdb> print *my_perl->Ienvgv
Program received signal SIGSEGV, Segmentation fault. [Switching to LWP 12] 0xfea9bbbc in modperl_env_request_tie (my_perl=0x157b098, r=0x16911a0) at modperl_env.c:355 355 EnvMgObj = (char *)r; (gdb) bt #0 0xfea9bbbc in modperl_env_request_tie (my_perl=0x157b098, r=0x16911a0) at modperl_env.c:355 #1 0xfea7edf8 in modperl_response_handler_cgi (r=0x16911a0) at mod_perl.c:934 #2 0xe4864 in ap_run_handler (r=0x16911a0) at config.c:151 #3 0xe5488 in ap_invoke_handler (r=0x16911a0) at config.c:358 #4 0x9190c in ap_process_request (r=0x16911a0) at http_request.c:246 #5 0x88b74 in ap_process_http_connection (c=0x1683260) at http_core.c:250 #6 0xfa390 in ap_run_process_connection (c=0x1683260) at connection.c:42 #7 0xfa96c in ap_process_connection (c=0x1683260, csd=0x1683170) at connection.c:175 #8 0xdef48 in process_socket (p=0x1683138, sock=0x1683170, my_child_num=0, my_thread_num=9, bucket_alloc=0x1687148) at worker.c:530 #9 0xdfacc in worker_thread (thd=0x1e30c8, dummy=0x146a868) at worker.c:844 #10 0xff050868 in dummy_worker (opaque=0x1e30c8) at thread.c:88 (gdb) print my_perl->Ienvgv $1 = (GV *) 0x0
That was enough ;) PL_envgv is uninitialized. It sounds like a bug in the cloning code. I bet if you try with prefork, you won't have this problem.
The following patch tries to workaround it, I don't know how good it is. But even if it happens to work, this is a wrong place to do it and I'll need a short script/handler that I can reproduce the problem with, so I can come up with a good fix in the right place and fix the core perl if there is bug there. It'd help us a lot if you could possibly setup and submit a bug reporting package using the minimal script/config as explained here:
http://perl.apache.org/docs/2.0/user/help/help.html#Problem_Description
Thanks.
Index: src/modules/perl/mod_perl.c =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v retrieving revision 1.212 diff -u -r1.212 mod_perl.c --- src/modules/perl/mod_perl.c 2 Apr 2004 02:17:45 -0000 1.212 +++ src/modules/perl/mod_perl.c 14 Apr 2004 04:19:14 -0000 @@ -955,6 +955,15 @@ h_stdin = modperl_io_override_stdin(aTHX_ r); h_stdout = modperl_io_override_stdout(aTHX_ r);
+ if (!PL_envgv) { + HV *hv; + gv_fetchpv("ENV",TRUE, SVt_PVHV); + GvMULTI_on(PL_envgv); + hv = GvHVn(PL_envgv); + hv_magic(hv, Nullgv, PERL_MAGIC_env); + } + + #define EnvMgObj SvMAGIC((SV*)ENVHV)->mg_ptr modperl_env_request_tie(aTHX_ r);
retval = modperl_response_handler_run(r, FALSE);
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]