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=0xbffff6e4) at main.c:603
(gdb) p *thread_resources
$2 = {storage = 0x50435245, count = 33, thread_id = 135231232, next =
0x20000010}
Anybody have helpful suggestions here? This is fully repeatable.
--
Edit bug report at http://bugs.php.net/?id=16104&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16104&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16104&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16104&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16104&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16104&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16104&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16104&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16104&r=submittedtwice