Bug #16104 Updated: Apache2 segfault on startup in TSRM/TSRM.c:310

2002-04-19 Thread david+cert

 ID:   16104
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: Linux
 PHP Version:  4.0CVS-2002-03-1
 New Comment:

This was back on ~2.0.33.  I haven't had the heart to try it recently.


Previous Comments:


[2002-04-19 11:14:06] [EMAIL PROTECTED]

What version of Apache is this? Current CVS is known to
work with Apache 2.0.35 (GA) and the 4.2.0 branch of PHP
(in CVS). Please try again and report your success/failure
here.



[2002-03-15 15:23:44] [EMAIL PROTECTED]

./configure \
 --with-apxs2=/usr/local/apache2/bin/apxs \
 --enable-debug

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=0xb6e4) at main.c:603

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

Anybody have helpful suggestions here? This is fully repeatable.





-- 
Edit this bug report at http://bugs.php.net/?id=16104edit=1




Bug #16104: Apache2 segfault on startup in TSRM/TSRM.c:310

2002-03-15 Thread david+cert

From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.0CVS-2002-03-15
PHP Bug Type: Apache2 related
Bug description:  Apache2 segfault on startup in TSRM/TSRM.c:310

./configure \
 --with-apxs2=/usr/local/apache2/bin/apxs \
 --enable-debug

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=0xb6e4) at main.c:603

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

Anybody have helpful suggestions here? This is fully repeatable.

-- 
Edit bug report at http://bugs.php.net/?id=16104edit=1
-- 
Fixed in CVS:http://bugs.php.net/fix.php?id=16104r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=16104r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=16104r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16104r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16104r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16104r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16104r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16104r=submittedtwice