perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Beau E. Cox" <b...@beaucox.com>
Subject Re: Segfaults
Date Wed, 28 Apr 2004 06:52:28 GMT
On Monday 26 April 2004 06:04 pm, Gerald Richter wrote:
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread 16384 (LWP 5447)]
> > 0x40575711 in S_hv_fetch_common (my_perl=0x84bc198, hv=0x88dade8,
>
> keysv=0x0,
>
> >     key=0x4070dbc6 "EMBPERL_ALLOW", klen=13, flags=0, action=8, val=0x0,
> > hash=138139023)
> >     at hv.c:631
> > 631             if (HeHASH(entry) != hash)              /* strings can't
>
> be
>
> > equal */
> > (gdb) bt
>
> I crashs when it tries to access the environment.
>
> Could you please try to run httpd with the option -D EMBPERL_APDEBUG
>
> This will output a lot of stuff at the screen, which continues in the error
> log. Please send me the screen output and the httpd error log.
>

Gerald -

I'm at a wall. My production server is still segfaulting while the
test server on the same machine is not. I cannot figure out what to
try next. I am having a hard time coming up with what could possibly
be different from the two servers. They are running the same versions
of everthing. Please, if you can, advise me what I could try next.

Below is the console log of gdb with a BT and the error_log of the
failure. Note, the seqfault occured on the _second_ request for my
test page. My configuration is:

Linux 2.6.6-rc2
gcc 3.3.3
glibc 2.3.2
perl 5.8.3 (debug) - note: I backed down to 5.8.3
Apache 2.1 cvs (debug)
mod_perl 2 cvs (debug)
libapre1 2.03dev cvs (debug)
Embperl cvs (debug)

--- console log and BT ---

GNU gdb 6.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db 
library "/lib/libthread_db.so.1".

(gdb) r
Starting program: /usr/apache2.1-db3/sbin/httpd -f /usr/debug/httpd.conf -X 
-DAPACHE_2.1 -DPRODUCTION -DEMBPERL_APDEBUG
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 2442)]
Detaching after fork from child process 2445.
Detaching after fork from child process 2446.
Detaching after fork from child process 2447.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 2442)]
0x40573b7a in S_hv_fetch_common (my_perl=0x8963f78, hv=0x83695cc, keysv=0x0, 
    key=0x40709846 "EMBPERL_ALLOW", klen=13, flags=0, action=8, val=0x0, 
hash=138139023)
    at hv.c:631
631		if (HeHASH(entry) != hash)		/* strings can't be equal */
(gdb) bt
#0  0x40573b7a in S_hv_fetch_common (my_perl=0x8963f78, hv=0x83695cc, 
keysv=0x0, 
    key=0x40709846 "EMBPERL_ALLOW", klen=13, flags=0, action=8, val=0x0, 
hash=138139023)
    at hv.c:631
#1  0x405731bf in Perl_hv_fetch (my_perl=0x8963f78, hv=0x83695cc, 
key=0x40709846 "EMBPERL_ALLOW", 
    klen_i32=13, lval=0) at hv.c:323
#2  0x4069f62c in EMBPERL2_GetHashValueStr (my_perl=0x8963f78, 
pHash=0x83695cc, 
    sKey=0x40709846 "EMBPERL_ALLOW", sDefault=0x0) at eputil.c:760
#3  0x406ae9d8 in embperl_GetCGIReqConfig (pApp=0x8b2fb64, pPool=0x8b31b4c, 
pConfig=0x8b31b8c, 
    bUseEnv=1 '\001', bUseRedirectEnv=0 '\0', bSetDefault=0 '\0') at 
epcfg.h:36
#4  0x406d1837 in embperl_GetApacheReqConfig (pApp=0x8b2fb64, pPool=0x8b31b4c, 
pDirCfg=0x8a4a130, 
    pConfig=0x8b31b8c) at mod_embperl.c:879
#5  0x406aa7ea in embperl_SetupRequest (my_perl=0x8963f78, 
pApacheReqSV=0x83263e8, 
    pApp=0x8b2fb64, pApacheCfg=0x8a4a130, pPerlParam=0x0, ppReq=0xbfffea54) at 
epinit.c:1394
#6  0x406acc2a in embperl_InitRequest (my_perl=0x8963f78, 
pApacheReqSV=0x83263e8, pPerlParam=0x0, 
    ppReq=0xbfffeabc) at epinit.c:2121
#7  0x406ad100 in embperl_InitRequestComponent (my_perl=0x8963f78, 
pApacheReqSV=0x83263e8, 
    pPerlParam=0x0, ppReq=0xbfffeabc) at epinit.c:2189
#8  0x4069be47 in embperl_ExecuteRequest (my_perl=0x8963f78, 
pApacheReqSV=0x83263e8, 
    pPerlParam=0x0) at epmain.c:1417
#9  0x4068f498 in XS_Embperl__Req_ExecuteRequest (my_perl=0x8963f78, 
cv=0x8ab4fe0)
    at Embperl.xs:85
#10 0x40586480 in Perl_pp_entersub (my_perl=0x8963f78) at pp_hot.c:2840
#11 0x40560418 in Perl_runops_debug (my_perl=0x8963f78) at dump.c:1438
#12 0x404ffd05 in S_call_body (my_perl=0x8963f78, myop=0xbfffed30, is_eval=0) 
at perl.c:2221
#13 0x404ff82b in Perl_call_sv (my_perl=0x8963f78, sv=0x8a9c860, flags=4) at 
perl.c:2139
#14 0x404b2cbe in modperl_callback (my_perl=0x8963f78, handler=0x8a4cb30, 
p=0x8a488f0, 
    r=0x8a48928, s=0x8163b58, args=0x868d774) at modperl_callback.c:99
#15 0x404b3593 in modperl_callback_run_handlers (idx=6, type=4, r=0x8a48928, 
c=0x0, s=0x8163b58, 
    pconf=0x0, plog=0x0, ptemp=0x0, run_mode=MP_HOOK_RUN_FIRST) at 
modperl_callback.c:262
#16 0x404b3868 in modperl_callback_per_dir (idx=6, r=0x8a48928, 
run_mode=MP_HOOK_RUN_FIRST)
    at modperl_callback.c:350
#17 0x404abb0c in modperl_response_handler_run (r=0x8a48928, finish=0) at 
mod_perl.c:865
#18 0x404abead in modperl_response_handler_cgi (r=0x8a48928) at mod_perl.c:960
#19 0x080a2953 in ap_run_handler (r=0x8a48928) at config.c:151
#20 0x080a30e1 in ap_invoke_handler (r=0x8a48928) at config.c:363
#21 0x0808e773 in ap_process_request (r=0x8a48928) at http_request.c:246
#22 0x080884ca in ap_process_http_connection (c=0x8a3ca90) at http_core.c:253
#23 0x080b04c4 in ap_run_process_connection (c=0x8a3ca90) at connection.c:42
#24 0x080b08be in ap_process_connection (c=0x8a3ca90, csd=0x8a3c8f8) at 
connection.c:175
#25 0x080a0ebf in child_main (child_num_arg=0) at prefork.c:625
#26 0x080a0fa2 in make_child (s=0x8131478, slot=0) at prefork.c:665
#27 0x080a156d in ap_mpm_run (_pconf=0x80f40f0, plog=0x812c1d0, s=0x8131478) 
at prefork.c:941
#28 0x080a91eb in main (argc=7, argv=0xbffff1f4) at main.c:679
(gdb) kill
Kill the program being debugged? (y or n) (gdb) q

--- error_log ---

[Tue Apr 27 20:36:24 2004] [warn] EmbperlDebug: ApacheInit [2442/0]\n
[Tue Apr 27 20:36:26 2004] [warn] EmbperlDebug: create_server_config 
[2442/0]\n
[Tue Apr 27 20:36:26 2004] [warn] EmbperlDebug: create_dir_config 
Embperl[2442/0]\n
[Tue Apr 27 20:36:26 2004] [warn] EmbperlDebug: Set MAILHOST (type=char *;STR) 
= beaucox.com\n
[Tue Apr 27 20:36:26 2004] [warn] EmbperlDebug: Set MAIL_ERRORS_TO (type=char 
*;STR) = webmaster@beaucox.com\n
[Tue Apr 27 20:36:26 2004] [warn] EmbperlDebug: Set OPTIONS 
(type=unsigned;INT) = 262144\n
[Tue Apr 27 20:36:26 2004] [warn] EmbperlDebug: create_dir_config 
Embperl[2442/0]\n
[Tue Apr 27 20:36:26 2004] [warn] EmbperlDebug: create_server_config 
[2442/0]\n
[Tue Apr 27 20:36:26 2004] [warn] EmbperlDebug: Set APPNAME (type=char *;STR) 
= my_embtest_app\n
[Tue Apr 27 20:36:26 2004] [warn] EmbperlDebug: merge_dir/server_config 
Embperl + Embperl\n
[Tue Apr 27 20:36:28 2004] [warn] EmbperlDebug: ApacheInit [2442/0]\n
[Tue Apr 27 20:36:28 2004] [notice] Digest: generating secret for digest 
authentication ...
[Tue Apr 27 20:36:28 2004] [notice] Digest: done
[Tue Apr 27 20:36:28 2004] [warn] pid file /usr/debug/run/httpd.pid 
overwritten -- Unclean shutdown of previous Apache run?
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: merge_dir/server_config 
Embperl + my_embtest_app\n
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: Merge OPTIONS (type=unsigned) 
stays 262144\n
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: Merge APPNAME (type=char *) => 
my_embtest_app\n
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: Merge MAILHOST (type=char *) 
stays beaucox.com\n
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: Merge MAIL_ERRORS_TO 
(type=char *) stays webmaster@beaucox.com\n
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: Perl part initialization start 
[2442/0]\n
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: GetApacheConfig for server\n
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: get_appname Embperl[2442/0]\n
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: Get MAILHOST (type=char *) 
beaucox.com\n
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: Get MAIL_ERRORS_TO (type=char 
*) webmaster@beaucox.com\n
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: GetApacheConfig for dir\n
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: get_appname 
my_embtest_app[2442/0]\n
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: Get APPNAME (type=char *) 
my_embtest_app\n
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: Get MAILHOST (type=char *) 
beaucox.com\n
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: Get MAIL_ERRORS_TO (type=char 
*) webmaster@beaucox.com\n
[Tue Apr 27 20:36:30 2004] [warn] EmbperlDebug: Get OPTIONS (type=unsigned) 
262144 (0x40000)\n
[Tue Apr 27 20:36:38 2004] [warn] EmbperlDebug: merge_dir/server_config 
Embperl + my_embtest_app\n
[Tue Apr 27 20:36:38 2004] [warn] EmbperlDebug: Merge OPTIONS (type=unsigned) 
stays 262144\n
[Tue Apr 27 20:36:38 2004] [warn] EmbperlDebug: Merge APPNAME (type=char *) => 
my_embtest_app\n
[Tue Apr 27 20:36:38 2004] [warn] EmbperlDebug: Merge MAILHOST (type=char *) 
stays beaucox.com\n
[Tue Apr 27 20:36:38 2004] [warn] EmbperlDebug: Merge MAIL_ERRORS_TO 
(type=char *) stays webmaster@beaucox.com\n
[Tue Apr 27 20:36:38 2004] [warn] EmbperlDebug: GetApacheConfig for dir\n
[Tue Apr 27 20:36:38 2004] [warn] EmbperlDebug: get_appname 
my_embtest_app[2442/0]\n


Aloha => Beau;


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message