There was some recent talk on the list about debugging apache.

I have current HEAD code for both httpd-2.0 and php42.  If I try to 
start apache with the php module, it silently crashes on startup.  So I 
pop it into gdb and here's what I get.

(gdb) r -X
Starting program: /src/cvs/httpd-2.0/httpd -X
[New Thread 1024 (LWP 9253)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 9253)]
0x4031dad5 in ts_resource_ex (id=1, th_id=0x0) at 
/src/cvs/php4/TSRM/TSRM.c:310
310                             
TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, 
thread_resources->count);

(gdb) l
305                             TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, 
"Fetching resource id %d for current thread %d", id, (long) 
thread_resources->thread_id));
306                             /* Read a specific resource from the 
thread's resources.
307                              * This is called outside of a mutex, so 
have to be aware about external
308                              * changes to the structure as we read it.
309                              */
310                             
TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, 
thread_resources->count);
311                     }
312                     thread_id = tsrm_thread_id();
313             } else {
314                     thread_id = *th_id;

(gdb) bt
#0  0x4031dad5 in ts_resource_ex (id=1, th_id=0x0)
    at /src/cvs/php4/TSRM/TSRM.c:310
#1  0x40321bfd in php_module_startup (sf=0x4044eba0)
    at /src/cvs/php4/main/main.c:856
#2  0x403746f4 in php_apache_server_startup (pconf=0x81014c0, 
plog=0x81395a0,
    ptemp=0x818ad58, s=0x818dfd8)
    at /src/cvs/php4/sapi/apache2filter/sapi_apache2.c:428
#3  0x0808e43f in ap_run_post_config (pconf=0x81014c0, plog=0x81395a0,
    ptemp=0x818ad58, s=0x818dfd8) at config.c:127
#4  0x08092715 in main (argc=2, argv=0xbffff6e4) at main.c:603

(gdb) p *thread_resources
$2 = {storage = 0x50435245, count = 33, thread_id = 135231232,
  next = 0x20000010}

Anybody have helpful suggestions here?  Should I post my compile 
options?  'tis fully repeatable.

Thank you,
David

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to