You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by "Beau E. Cox" <be...@beaucox.com> on 2004/04/24 00:21:17 UTC

Segfaults

Hi

I have two 'identical' boxes, one test, one production,
running:

 Linux 2.6.6-rc1
 gcc 3.3.3
 glibc 2.3.2
 perl 5.8.4 (new last night)
 Apache 2.1 cvs
 mod_perl 2 cvs
 libapreq2 cvs
 Embperl cvs

The test server works flawlessly. The production server
segfault(11)s at the end (all output is properly received
by the browser) of requests to Embperl pages (not the first
request to a page and then randomly after that). I constructed
a simple simple page for testing that segfaults:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Embperl test</title>
</head>
<body>
<h1>Embperl test</h1>
<p>2 + 2 = [+ 4 +].</p>
</body> </html>

I have re-installed EVERYTHING on both servers (including perl
and all CPAN modules). Segfaults still on production only. I have
screwed up in some way.

Now I want to look at a core dump, but I can't find one. So ?s:

1) are core dumps automatically generated by seqfaults? If not,
how do I have Apache generate them?

2) where are they put?

This ol' man is going to sleep and try again tonight. If you can
point me to some answers, that would be great.

Have a nice weekend everyone.

Aloha => Beau;


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


Re: Segfaults RESOLVED!!! WOW!!! HAPPYCAMPER!!! ;) ;)

Posted by "Beau E. Cox" <be...@beaucox.com>.
On Wednesday 28 April 2004 06:51 pm, Gerald Richter wrote:
> Beau E. Cox wrote:
> > Gerald -
> >
> > Have you received my emails detailing my segfault problem?
>
> Yes, but I was out of office yesterday the whole and today I will also
> visit a customer for most of the day, so I guess I will not find time
> before tomorrow to look deeper into your problems. Sorry!
>
> Gerald
>
> P.S. It looks to me like there is some issuse with the loading of the
> module. Is there any difference in your httpd.conf concering module
> loading? (LoadModule, AddModule, ClearModuleList...)
>
> Could you please compare the output of httpd -V  and httpd -l of your two
> systems?

Gerald -

OK. LoadModules, etc. OK, but I did NOT have a 'use Embperl ;' in
my startup perl script (and no PerlRequire Embperl) in my production
configuration.

I looks like the system then delays the 'use Embperl' processing
until a request requiring Embperl comes in and then epinit is called
with structures long gone -> segfault.

Aloha => Beau;


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


Re: Segfaults

Posted by "Beau E. Cox" <be...@beaucox.com>.
On Wednesday 28 April 2004 06:51 pm, Gerald Richter wrote:
> Beau E. Cox wrote:
> > Gerald -
> >
> > Have you received my emails detailing my segfault problem?
>
> Yes, but I was out of office yesterday the whole and today I will also
> visit a customer for most of the day, so I guess I will not find time
> before tomorrow to look deeper into your problems. Sorry!
>
> Gerald
>
> P.S. It looks to me like there is some issuse with the loading of the
> module. Is there any difference in your httpd.conf concering module
> loading? (LoadModule, AddModule, ClearModuleList...)
>
> Could you please compare the output of httpd -V  and httpd -l of your two
> systems?

Gerald -

I didn't mean to bug you, I understand you are busy; as long as
you are getting my reports I'm happy. Now I will proceed along your
lines and report back tonight.

By the way, it seems that epinit is being called on the second
request (the one with the segfault) - something is fishy with my
startup I think. I will check the loads, etc. as you suggest and
also compare my startup scripts.

Aloha => Beau;


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


Re: Segfaults

Posted by Gerald Richter <ri...@ecos.de>.
Beau E. Cox wrote:
> Gerald -
>
> Have you received my emails detailing my segfault problem?
>
Yes, but I was out of office yesterday the whole and today I will also visit
a customer for most of the day, so I guess I will not find time before
tomorrow to look deeper into your problems. Sorry!

Gerald

P.S. It looks to me like there is some issuse with the loading of the
module. Is there any difference in your httpd.conf concering module loading?
(LoadModule, AddModule, ClearModuleList...)

Could you please compare the output of httpd -V  and httpd -l of your two
systems?

---------------------------------------------------------------------------
Gerald Richter            ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl

Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de          Voice:   +49 6133 939-122
WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
---------------------------------------------------------------------------
Besuchen Sie uns auf der KOMCOM 2004 in Mannheim
25. bis 27. Mai 2004  Stand K11a   www.komcom.de

ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
---------------------------------------------------------------------------


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


Re: Segfaults

Posted by "Beau E. Cox" <be...@beaucox.com>.
Gerald -

Have you received my emails detailing my segfault problem?

Aloha => Beau;


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


Re: Segfaults

Posted by "Beau E. Cox" <be...@beaucox.com>.
Gerald -

More on my production-only segfault...

I put the following code into eputil.c (the Embperl routine
closest to the segfault):

--- /home/install/httpd/2.1-db/src/embperl/embperl/eputil.c	2004-03-07 
09:44:14.000000000 -1000
+++ ../embperl/eputil.c	2004-04-28 05:43:01.118170288 -1000
@@ -745,6 +745,29 @@
     return nDefault ;
     }
 
+static void dumper_dump( unsigned char *buf, int offset, int len )
+{
+  int i;
+  fprintf( stderr, "%04x:", offset );
+  for( i = 0; i < len; i++ ) {
+    if( i % 4 == 0 ) fprintf( stderr, " " ); 
+    fprintf( stderr, "%02x", buf[offset+i] );
+  }
+  fprintf( stderr, " |" );
+  for( i = 0; i < len; i++ ) {
+    if( i % 4 == 0 ) fprintf( stderr, " " ); 
+    fprintf( stderr, "%c", ( buf[offset+i] >= '0' && buf[offset+i] <= 'z' ) ? 
buf[offset+i] : '.' );
+  }
+  fprintf( stderr, "\n" );
+}
+
+static void dumper( char *title, unsigned char *buf, int len )
+{
+  int i;
+  fprintf( stderr, "%s\n", title );
+  for( i = 0; i < len; i += 16 )
+    dumper_dump( buf, i, (len - i >= 16) ? 16 : len - i );
+}
 
 char * GetHashValueStr (/*in*/  pTHX_
                         /*in*/  HV *           pHash,
@@ -754,13 +777,37 @@
     {
     SV **   ppSV ;
     STRLEN  l ;
+    STRLEN len;
+    char * buf;
+    char check;
+    bool exists;
 
     /*EPENTRY (GetHashValueInt) ;*/
 
+    fprintf( stderr, "GetHashValueStr pHash '%p' sKey '%s' sDefault '%s'\n",
+             pHash, sKey, sDefault );
+    if( pHash == NULL )
+      fprintf( stderr, "pHash is NULL\n" );
+    else {
+      fprintf( stderr, "checking pointer to pHash\n" );
+      check = *( char * )pHash;
+      fprintf( stderr, "OK\n" );
+      dumper( "first 128 bytes of pHash", ( unsigned char * )pHash, 128 );
+      fprintf( stderr, "checking if key exists\n" );
+      exists = hv_exists( pHash, ( char * )sKey, strlen( sKey ) );
+      fprintf( stderr, "%s\n", ( exists ) ? "yes" : "no" );
+    }
+
     ppSV = hv_fetch(pHash, (char *)sKey, strlen (sKey), 0) ;  
-    if (ppSV != NULL)
+    if (ppSV != NULL) {
+      buf = SvPV( *ppSV, len );
+      fprintf( stderr, "ppSV: len = '%d', content = '%s'\n",
+               len, buf );
         return SvPV (*ppSV, l) ;
-        
+    }
+    
+    fprintf( stderr, "ppSV is NULL\n" );
+
     return sDefault ;
     }

What I am trying to do is see the parameters into and out of where the
seqfault occurs in GetHashValueStr.

Near the top if the error_log, a hash at 0x83695cc is sucessfully
accessed:

[Wed Apr 28 05:43:45 2004] [warn] EmbperlDebug: get_appname Embperl[7540/0]\n
[Wed Apr 28 05:43:45 2004] [warn] EmbperlDebug: Get MAILHOST (type=char *) 
beaucox.com\n
[Wed Apr 28 05:43:45 2004] [warn] EmbperlDebug: Get MAIL_ERRORS_TO (type=char 
*) webmaster@beaucox.com\n
GetHashValueStr pHash '0x83695cc' sKey 'EMBPERL_SESSION_ARGS' sDefault 
'(null)'
checking pointer to pHash
OK
first 128 bytes of pHash
0000: 90ab7808 01000000 0bc00020 90a83608 | ..x. .... .... ..6.
0010: 01000000 0d600000 00000000 01000000 | .... .`.. .... ....
0020: 00000000 00000000 01000000 00000000 | .... .... .... ....
0030: f8015208 01000000 07c00404 18574608 | ..R. .... .... .WF.
0040: 01000000 0c000000 20a83608 01000000 | .... .... ..6. ....
0050: 0d600000 a0c72b08 01000000 04000404 | .`.. .... .... ....
0060: c8564608 01000000 0c000404 00000000 | .VF. .... .... ....
0070: 01000000 00050000 089d3008 01000000 | .... .... ..0. ....
checking if key exists
no
ppSV is NULL

Now just before the segfault, that same hash at 0x83695cc is accessed
again. But look at the first word of the hash: it looks as if the hash
is no longer valid or has been released. Note, most of the other words
in that memory match the earlier dump:

[Wed Apr 28 05:43:47 2004] [warn] EmbperlDebug: GetApacheConfig for dir\n
[Wed Apr 28 05:43:47 2004] [warn] EmbperlDebug: get_appname 
my_embtest_app[7540/0]\n
GetHashValueStr pHash '0x83695cc' sKey 'EMBPERL_ALLOW' sDefault '(null)'
checking pointer to pHash
OK
first 128 bytes of pHash
0000: 000f5208 01000000 07c00404 90a83608 | ..R. .... .... ..6.
0010: 01000000 0d600000 00000000 01000000 | .... .`.. .... ....
0020: 00000000 00000000 01000000 00000000 | .... .... .... ....
0030: 18025208 01000000 07c00404 18574608 | ..R. .... .... .WF.
0040: 01000000 0c000000 20a83608 01000000 | .... .... ..6. ....
0050: 0d600000 a0c72b08 01000000 04000404 | .`.. .... .... ....
0060: c8564608 01000000 0c000404 00000000 | .VF. .... .... ....
0070: 01000000 00050000 58025208 01000000 | .... .... X.R. ....
checking if key exists

The segfault happens in my hv_exists() call prob. because the hash
is no more.

I don't know enough abount perl internals to make much sense if this,
but maybe something will ring a bell for you.

Aloha => Beau;



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


Re: Segfaults

Posted by "Beau E. Cox" <be...@beaucox.com>.
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


Re: Segfaults

Posted by "Beau E. Cox" <be...@beaucox.com>.
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,

Using the same configuration, here is your -DEMBPERL_APDEBUG trace
starting with the console log and continuing in the log:

--- console ---

root@cathy:/usr/debug# $APACHE_DAEMON -DAPACHE_2.1 -DPRODUCTION 
-DEMBPERL_APDEBUG
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: create_server_config 
[26574/0]\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: create_dir_config 
Embperl[26574/0]\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: create_dir_config 
Embperl[26574/0]\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: create_server_config 
[26574/0]\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: Set APPNAME (type=char *;STR) 
= embperlapp\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: Set OBJECT_BASE (type=char 
*;STR) = base.epl\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: Set MAILHOST (type=char *;STR) 
= beaucox.com\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: Set MAIL_ERRORS_TO (type=char 
*;STR) = webmaster@beaucox.com\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: create_dir_config 
Embperl[26574/0]\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: create_server_config 
[26574/0]\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: Set APPNAME (type=char *;STR) 
= my_resume_app\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: Set OBJECT_BASE (type=char 
*;STR) = document-base.epl\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: Set OBJECT_ADDPATH (type=AV *) 
= /srv/www/htdocs/resume/objects (save for later conversion to Perl data)\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: create_dir_config 
Embperl[26574/0]\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: create_server_config 
[26574/0]\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: Set APPNAME (type=char *;STR) 
= my_embtest_app\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: merge_dir/server_config 
Embperl + Embperl\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: merge_dir/server_config 
Embperl + Embperl\n
[Mon Apr 26 21:25:15 2004] [warn] EmbperlDebug: merge_dir/server_config 
Embperl + Embperl\n
root@cathy:/usr/debug#

--- log ---

[Mon Apr 26 21:25:16 2004] [warn] EmbperlDebug: ApacheInit [26574/0]\n
[Mon Apr 26 21:25:16 2004] [warn] EmbperlDebug: create_server_config 
[26574/0]\n
[Mon Apr 26 21:25:16 2004] [warn] EmbperlDebug: create_dir_config 
Embperl[26574/0]\n
[Mon Apr 26 21:25:17 2004] [warn] EmbperlDebug: ApacheInit [26576/0]\n
[Mon Apr 26 21:25:17 2004] [notice] Digest: generating secret for digest 
authentication ...
[Mon Apr 26 21:25:17 2004] [notice] Digest: done
[Mon Apr 26 21:25:17 2004] [warn] pid file /var/run/httpd.pid overwritten -- 
Unclean shutdown of previous Apache run?
[Mon Apr 26 21:25:17 2004] [notice] Embperl/2.0b11 Apache/2.1.0-dev (Unix) 
mod_perl/1.99_14-dev Perl/v5.8.4 mod_ssl/2.1.0-dev OpenSSL/0.9.7d DAV/2 
configured -- resuming normal operations
[Mon Apr 26 21:25:38 2004] [warn] EmbperlDebug: merge_dir/server_config 
Embperl + my_embtest_app\n
[Mon Apr 26 21:25:38 2004] [warn] EmbperlDebug: Merge APPNAME (type=char *) => 
my_embtest_app\n
[Mon Apr 26 21:25:38 2004] [warn] EmbperlDebug: Merge MAILHOST (type=char *) 
stays beaucox.com\n
[Mon Apr 26 21:25:38 2004] [warn] EmbperlDebug: Merge MAIL_ERRORS_TO 
(type=char *) stays webmaster@beaucox.com\n
[Mon Apr 26 21:25:38 2004] [warn] EmbperlDebug: Perl part initialization start 
[26579/0]\n
[Mon Apr 26 21:25:38 2004] [warn] EmbperlDebug: GetApacheConfig for server\n
[Mon Apr 26 21:25:38 2004] [warn] EmbperlDebug: get_appname Embperl[26579/0]\n
[Mon Apr 26 21:25:38 2004] [warn] EmbperlDebug: Get MAILHOST (type=char *) 
beaucox.com\n
[Mon Apr 26 21:25:38 2004] [warn] EmbperlDebug: Get MAIL_ERRORS_TO (type=char 
*) webmaster@beaucox.com\n
[Mon Apr 26 21:25:38 2004] [warn] EmbperlDebug: GetApacheConfig for dir\n
[Mon Apr 26 21:25:38 2004] [warn] EmbperlDebug: get_appname 
my_embtest_app[26579/0]\n
[Mon Apr 26 21:25:38 2004] [warn] EmbperlDebug: Get APPNAME (type=char *) 
my_embtest_app\n
[Mon Apr 26 21:25:38 2004] [warn] EmbperlDebug: Get MAILHOST (type=char *) 
beaucox.com\n
[Mon Apr 26 21:25:38 2004] [warn] EmbperlDebug: Get MAIL_ERRORS_TO (type=char 
*) webmaster@beaucox.com\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: merge_dir/server_config 
Embperl + my_embtest_app\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: Merge APPNAME (type=char *) => 
my_embtest_app\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: Merge MAILHOST (type=char *) 
stays beaucox.com\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: Merge MAIL_ERRORS_TO 
(type=char *) stays webmaster@beaucox.com\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: GetApacheConfig for dir\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: get_appname 
my_embtest_app[26579/0]\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: merge_dir/server_config 
Embperl + my_embtest_app\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: Merge APPNAME (type=char *) => 
my_embtest_app\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: Merge MAILHOST (type=char *) 
stays beaucox.com\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: Merge MAIL_ERRORS_TO 
(type=char *) stays webmaster@beaucox.com\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: Perl part initialization start 
[26581/0]\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: GetApacheConfig for server\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: get_appname Embperl[26581/0]\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: Get MAILHOST (type=char *) 
beaucox.com\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: Get MAIL_ERRORS_TO (type=char 
*) webmaster@beaucox.com\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: GetApacheConfig for dir\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: get_appname 
my_embtest_app[26581/0]\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: Get APPNAME (type=char *) 
my_embtest_app\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: Get MAILHOST (type=char *) 
beaucox.com\n
[Mon Apr 26 21:25:40 2004] [warn] EmbperlDebug: Get MAIL_ERRORS_TO (type=char 
*) webmaster@beaucox.com\n
[Mon Apr 26 21:25:40 2004] [notice] child pid 26579 exit signal Segmentation 
fault (11)

The BT looks the same.

Aloha => Beau;


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


Re: Segfaults

Posted by Gerald Richter <ri...@ecos.de>.
>
> 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


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


Re: Segfaults

Posted by "Beau E. Cox" <be...@beaucox.com>.
Hi Gerald -

My segfaults happen in production even with perl back to
5.8.3. I must be a configuration problem. Here is what
I' getting:

-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:

  segfaults on embperl pages. Content is transfered to the
  browser. Using Embperl cvs.

1a. Test page

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Embperl test</title>
</head>
<body>
<h1>Embperl test</h1>
<p>2 + 2 = [+ 4 +].</p>
</body> </html>

1b. httpd.conf

[...]
LoadModule embperl_module \
        /usr/perl/db-apache2.1/lib/site_perl/5.8.4/i686-linux-thread-multi/auto/Embperl/Embperl.so
[...]
<VirtualHost xxx.xxx.xxx.xxx:80>
  ServerName xxxxx.xxxxx.com
  DocumentRoot "/srv/www/htdocs/embtest"
  <Directory "/srv/www/htdocs/embtest">
    Embperl_AppName my_embtest_app
    <FilesMatch "\.html$">
       SetHandler perl-script
       PerlHandler Embperl
       Options ExecCGI
    </FilesMatch>
  </Directory>
</VirtualHost>

2. Used Components and their Configuration:

*** mod_perl version 1.9914

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_APXS        => /usr/apache2.1/sbin/apxs
  MP_COMPAT_1X   => 1
  MP_DEBUG       => 1
  MP_GENERATE_XS => 1
  MP_LIBNAME     => mod_perl
  MP_TRACE       => 1
  MP_USE_DSO     => 1
  MP_USE_STATIC  => 1


*** /usr/apache2.1/sbin/httpd -V
Server version: Apache/2.1.0-dev
Server built:   Apr 24 2004 23:26:12
Server's Module Magic Number: 20030821:3
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/usr/apache2.1"
 -D SUEXEC_BIN="/usr/apache2.1/bin/suexec"
 -D DEFAULT_PIDLOG="/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/var/run/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/httpd/mime.types"
 -D SERVER_CONFIG_FILE="/etc/httpd/httpd.conf"


*** /usr/perl/db-apache2.1/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
    osname=linux, osvers=2.6.6-rc2, archname=i686-linux-thread-multi
    uname='linux cathy.beaucox.com 2.6.6-rc2 #1 sat apr 24 13:43:16 hst 2004 
i686 unknown unknown gnulinux '
    config_args='-Dprefix=/usr/perl/db-apache2.1 -d -e -Dusethreads 
-Duseshrplib -Doptimize='-g''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
-DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64',
    optimize='-g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING 
-fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='3.3.3', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.3.2'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E 
-Wl,-rpath,/usr/perl/db-apache2.1/lib/5.8.4/i686-linux-thread-multi/CORE'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES 
PERL_IMPLICIT_CONTEXT
  Built under linux
  Compiled at Apr 24 2004 22:45:51
  %ENV:
    PERL_LWP_USE_HTTP_10="1"
  @INC:
    /usr/perl/db-apache2.1/lib/5.8.4/i686-linux-thread-multi
    /usr/perl/db-apache2.1/lib/5.8.4
    /usr/perl/db-apache2.1/lib/site_perl/5.8.4/i686-linux-thread-multi
    /usr/perl/db-apache2.1/lib/site_perl/5.8.4
    /usr/perl/db-apache2.1/lib/site_perl
    .

*** Packages of interest status:

Apache::Request: 2.03-dev
CGI            : 3.05
LWP            : 5.79
mod_perl       : 1.9914


3. This is the core dump trace: (if you get a core dump):

Starting program: /usr/apache2.1/sbin/httpd -X -DPRODUCTION -DAPACHE_2.1
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 5447)]
Detaching after fork from child process 5450.
Detaching after fork from child process 5451.
Detaching after fork from child process 5452.

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
#0  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
#1  0x40574d53 in Perl_hv_fetch (my_perl=0x84bc198, hv=0x88dade8, 
key=0x4070dbc6 "EMBPERL_ALLOW",
    klen_i32=13, lval=0) at hv.c:323
#2  0x406a3644 in EMBPERL2_GetHashValueStr (my_perl=0x84bc198, 
pHash=0x88dade8,
    sKey=0x4070dbc6 "EMBPERL_ALLOW", sDefault=0x0) at eputil.c:760
#3  0x406b2bf4 in embperl_GetCGIReqConfig (pApp=0x8b98ad4, pPool=0x8b9aabc, 
pConfig=0x8b9aafc,
    bUseEnv=1 '\001', bUseRedirectEnv=0 '\0', bSetDefault=0 '\0') at 
epcfg.h:36
#4  0x406d5ae7 in embperl_GetApacheReqConfig (pApp=0x8b98ad4, pPool=0x8b9aabc, 
pDirCfg=0x8ab1f28,
    pConfig=0x8b9aafc) at mod_embperl.c:879
#5  0x406ae9c7 in embperl_SetupRequest (my_perl=0x84bc198, 
pApacheReqSV=0x8c52558,
    pApp=0x8b98ad4, pApacheCfg=0x8ab1f28, pPerlParam=0x0, ppReq=0xbfffeea4) at 
epinit.c:1394
#6  0x406b0e43 in embperl_InitRequest (my_perl=0x84bc198, 
pApacheReqSV=0x8c52558, pPerlParam=0x0,
    ppReq=0xbfffef0c) at epinit.c:2121
#7  0x406b1319 in embperl_InitRequestComponent (my_perl=0x84bc198, 
pApacheReqSV=0x8c52558,
    pPerlParam=0x0, ppReq=0xbfffef0c) at epinit.c:2189
#8  0x4069fe5d in embperl_ExecuteRequest (my_perl=0x84bc198, 
pApacheReqSV=0x8c52558,
    pPerlParam=0x0) at epmain.c:1417
#9  0x40693498 in XS_Embperl__Req_ExecuteRequest (my_perl=0x84bc198, 
cv=0x8ab83a0)
    at Embperl.xs:85
#10 0x405883ad in Perl_pp_entersub (my_perl=0x84bc198) at pp_hot.c:2854
#11 0x40561e72 in Perl_runops_debug (my_perl=0x84bc198) at dump.c:1442
#12 0x40500dd6 in S_call_body (my_perl=0x84bc198, myop=0xbffff180, is_eval=0) 
at perl.c:2285
#13 0x405008fc in Perl_call_sv (my_perl=0x84bc198, sv=0x8ad0084, flags=4) at 
perl.c:2203
#14 0x404b30c1 in modperl_callback (my_perl=0x84bc198, handler=0x8ab6148, 
p=0x8ab06a0,
    r=0x8ab06d8, s=0x81a1c70, args=0x8c5254c) at modperl_callback.c:99
#15 0x404b39b7 in modperl_callback_run_handlers (idx=6, type=4, r=0x8ab06d8, 
c=0x0, s=0x81a1c70,
    pconf=0x0, plog=0x0, ptemp=0x0, run_mode=MP_HOOK_RUN_FIRST) at 
modperl_callback.c:262
#16 0x404b3c8f in modperl_callback_per_dir (idx=6, r=0x8ab06d8, 
run_mode=MP_HOOK_RUN_FIRST)
    at modperl_callback.c:350
#17 0x404abb81 in modperl_response_handler_run (r=0x8ab06d8, finish=0) at 
mod_perl.c:865
---Type <return> to continue, or q <return> to quit---
#18 0x404abf22 in modperl_response_handler_cgi (r=0x8ab06d8) at mod_perl.c:960
#19 0x080a297f in ap_run_handler (r=0x8ab06d8) at config.c:151
#20 0x080a310d in ap_invoke_handler (r=0x8ab06d8) at config.c:363
#21 0x0808e7b3 in ap_process_request (r=0x8ab06d8) at http_request.c:246
#22 0x0808850a in ap_process_http_connection (c=0x8aa3db8) at http_core.c:253
#23 0x080b0504 in ap_run_process_connection (c=0x8aa3db8) at connection.c:42
#24 0x080b08fe in ap_process_connection (c=0x8aa3db8, csd=0x8aa3c20) at 
connection.c:175
#25 0x080a0eeb in child_main (child_num_arg=0) at prefork.c:625
#26 0x080a0fce in make_child (s=0x8131478, slot=0) at prefork.c:665
#27 0x080a1599 in ap_mpm_run (_pconf=0x80f40f0, plog=0x812c1d0, s=0x8131478) 
at prefork.c:941
#28 0x080a9229 in main (argc=4, argv=0xbffff644) at main.c:665
(gdb)

This report was generated by t/REPORT on Sun Apr 25 10:01:45 2004 GMT.

-------------8<---------- End Bug Report --------------8<----------


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


Re: Segfaults

Posted by "Beau E. Cox" <be...@beaucox.com>.
On Saturday 24 April 2004 02:00 am, Gerald Richter wrote:
> Perrin Harkins wrote:
> > On Fri, 2004-04-23 at 18:21, Beau E. Cox wrote:
> >> 1) are core dumps automatically generated by seqfaults? If not,
> >> how do I have Apache generate them?
> >
> > Sounds like you're looking for this:
>
> http://perl.apache.org/docs/2.0/user/help/help.html#Resolving_Segmentation_
>Faults
>
>
> To build Embperl with debug symbols, do a
>
> perl Makefile.PL debug
> make install
>
> Instead of searching for the core file, you can also run the httpd under
> gdb:
>
> gdb /usr/sbin/httpd
> set args -X -f /etc/path/to/httpd.conf
> r
> -> request the file
> -> sigsegv
> BT
>

Thank you Gerald and Perrin -

I think my core dumps are being written to /dev/null ;)
Everthihg I tried to produce them failed (ulimit, permissions,
etc.).

But I did get a backtrace via Gerald's instructions. Before
dumping it on you am trying to get back to a stable system.

I have already:

  rebuilt _everthing_

  moved my test server
to the _same_ machine as production (that means that all
non-specific libraries used by production and test will be
for sure the same, right?)

  dropped back to Apache 2.0 cvs (from 2.1)

  dropped back from Embperl cvs to latest beta

Results are the same: test soild, production segfaults.

I'll drop back to perl 5.8.3 and rebuild everthing (again)
tonight. If that doesn't work, I'll go to the BT.

Don't you hate it when a bug or misconfiguration isn't
consistent!!!

Aloha => Beau;




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


Re: Segfaults

Posted by "Beau E. Cox" <be...@beaucox.com>.
On Saturday 24 April 2004 02:00 am, Gerald Richter wrote:
> Perrin Harkins wrote:
> > On Fri, 2004-04-23 at 18:21, Beau E. Cox wrote:
> >> 1) are core dumps automatically generated by seqfaults? If not,
> >> how do I have Apache generate them?
> >
> > Sounds like you're looking for this:
>
> http://perl.apache.org/docs/2.0/user/help/help.html#Resolving_Segmentation_
>Faults
>
>
> To build Embperl with debug symbols, do a
>
> perl Makefile.PL debug
> make install
>
> Instead of searching for the core file, you can also run the httpd under
> gdb:
>
> gdb /usr/sbin/httpd
> set args -X -f /etc/path/to/httpd.conf
> r
> -> request the file
> -> sigsegv
> BT
>

Thank you Gerald and Perrin -

I think my core dumps are being written to /dev/null ;)
Everthihg I tried to produce them failed (ulimit, permissions,
etc.).

But I did get a backtrace via Gerald's instructions. Before
dumping it on you am trying to get back to a stable system.

I have already:

  rebuilt _everthing_

  moved my test server
to the _same_ machine as production (that means that all
non-specific libraries used by production and test will be
for sure the same, right?)

  dropped back to Apache 2.0 cvs (from 2.1)

  dropped back from Embperl cvs to latest beta

Results are the same: test soild, production segfaults.

I'll drop back to perl 5.8.3 and rebuild everthing (again)
tonight. If that doesn't work, I'll go to the BT.

Don't you hate it when a bug or misconfiguration isn't
consistent!!!

Aloha => Beau;




-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Segfaults

Posted by Gerald Richter <ri...@ecos.de>.
Perrin Harkins wrote:
> On Fri, 2004-04-23 at 18:21, Beau E. Cox wrote:
>> 1) are core dumps automatically generated by seqfaults? If not,
>> how do I have Apache generate them?
>
> Sounds like you're looking for this:
>
http://perl.apache.org/docs/2.0/user/help/help.html#Resolving_Segmentation_Faults
>

To build Embperl with debug symbols, do a

perl Makefile.PL debug
make install

Instead of searching for the core file, you can also run the httpd under
gdb:

gdb /usr/sbin/httpd
set args -X -f /etc/path/to/httpd.conf
r
-> request the file
-> sigsegv
BT

Gerald



---------------------------------------------------------------------------
Gerald Richter            ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl

Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de          Voice:   +49 6133 939-122
WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
---------------------------------------------------------------------------
Besuchen Sie uns auf der KOMCOM 2004 in Mannheim
25. bis 27. Mai 2004  Stand K11a   www.komcom.de

ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
---------------------------------------------------------------------------


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


Re: Segfaults

Posted by Gerald Richter <ri...@ecos.de>.
Perrin Harkins wrote:
> On Fri, 2004-04-23 at 18:21, Beau E. Cox wrote:
>> 1) are core dumps automatically generated by seqfaults? If not,
>> how do I have Apache generate them?
>
> Sounds like you're looking for this:
>
http://perl.apache.org/docs/2.0/user/help/help.html#Resolving_Segmentation_Faults
>

To build Embperl with debug symbols, do a

perl Makefile.PL debug
make install

Instead of searching for the core file, you can also run the httpd under
gdb:

gdb /usr/sbin/httpd
set args -X -f /etc/path/to/httpd.conf
r
-> request the file
-> sigsegv
BT

Gerald



---------------------------------------------------------------------------
Gerald Richter            ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl

Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de          Voice:   +49 6133 939-122
WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
---------------------------------------------------------------------------
Besuchen Sie uns auf der KOMCOM 2004 in Mannheim
25. bis 27. Mai 2004  Stand K11a   www.komcom.de

ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
---------------------------------------------------------------------------


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Segfaults

Posted by Perrin Harkins <pe...@elem.com>.
On Fri, 2004-04-23 at 18:21, Beau E. Cox wrote:
> 1) are core dumps automatically generated by seqfaults? If not,
> how do I have Apache generate them?

Sounds like you're looking for this:
http://perl.apache.org/docs/2.0/user/help/help.html#Resolving_Segmentation_Faults

- Perrin


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Segfaults

Posted by Perrin Harkins <pe...@elem.com>.
On Fri, 2004-04-23 at 18:21, Beau E. Cox wrote:
> 1) are core dumps automatically generated by seqfaults? If not,
> how do I have Apache generate them?

Sounds like you're looking for this:
http://perl.apache.org/docs/2.0/user/help/help.html#Resolving_Segmentation_Faults

- Perrin


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