ID: 16583 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Reproducible crash Operating System: PLD Linux PHP Version: 4.1.2 New Comment:
I also added patch from php cvs (after rc3): --- php4/sapi/apache2filter/sapi_apache2.c 11 Apr 2002 20:34:31 -0000 1.61.2.8 +++ php4/sapi/apache2filter/sapi_apache2.c 12 Apr 2002 22:26:28 -0000 1.61.2.9 (modifies safe_free() define) And now: #0 0x0039605d in pthread_mutex_lock () from /lib/libpthread.so.0 (gdb) where #0 0x0039605d in pthread_mutex_lock () from /lib/libpthread.so.0 #1 0x0062f646 in tsrm_mutex_lock (mutexp=0x0) at TSRM.c:492 #2 0x0062f2f8 in ts_resource_ex (id=0, th_id=0x0) at TSRM.c:318 #3 0x00568400 in _zend_bailout (filename=0x644f84 "zend_hash.c", lineno=98) at zend.c:522 #4 0x0056e0ba in _zend_is_inconsistent (ht=0x80dea70, file=0x644f84 "zend_hash.c", line=532) at zend_hash.c:98 #5 0x0056f919 in zend_hash_destroy (ht=0x80dea70) at zend_hash.c:532 #6 0x004fcfef in destroy_php_config () from /usr/lib/apache/libphp4.so #7 0x00168529 in apr_pool_cleanup_run () from /usr/lib/libapr.so.0 #8 0x00167d39 in apr_pool_clear () from /usr/lib/libapr.so.0 #9 0x0806e5af in main (argc=2, argv=0xbffffa34) at main.c:579 #10 0x003bc418 in __libc_start_main () from /lib/libc.so.6 (gdb) frame 2 #2 0x0062f2f8 in ts_resource_ex (id=0, th_id=0x0) at TSRM.c:318 318 tsrm_mutex_lock(tsmm_mutex); (gdb) (gdb) print tsmm_mutex $1 = (struct {...} *) 0x0 (gdb) l 313 } else { 314 thread_id = *th_id; 315 } 316 317 TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for thread %ld", id, (long) thread_id)); 318 tsrm_mutex_lock(tsmm_mutex); 319 320 hash_value = THREAD_HASH_OF(thread_id, tsrm_tls_table_size); 321 thread_resources = tsrm_tls_table[hash_value]; 322 Previous Comments: ------------------------------------------------------------------------ [2002-04-13 04:58:57] [EMAIL PROTECTED] I wanted to test apache 2.0.35 with php 4.2.0RC3 on my Linux (2.4 kernel, 2.5.5 glibc, gcc 3.1 20020408 prerelease) unfortunately it always crashes at start (backtrace below). Anyway if fix is know then please let me know - I want to test it. I also can provide more information if needed. httpd -X gdb /usr/sbin/httpd core ... #0 0x008332ce in ts_resource_ex (id=1, th_id=0x0) at TSRM.c:310 310 TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count); (gdb) where #0 0x008332ce in ts_resource_ex (id=1, th_id=0x0) at TSRM.c:310 #1 0x0077e56c in php_module_startup (sf=0x602020) at main.c:856 #2 0x00600cb5 in php_apache_server_startup (pconf=0x4d4010, plog=0x513010, ptemp=0xad7010, s=0x4d5d60) at sapi_apache2.c:433 #3 0x080681e5 in ap_run_post_config (pconf=0x4d4010, plog=0x513010, ptemp=0xad7010, s=0x4d5d60) at config.c:130 #4 0x0806e7a5 in main (argc=2, argv=0xbffff9f4) at main.c:611 #5 0x003c0418 in __libc_start_main () from /lib/libc.so.6 $1 = (struct _tsrm_tls_entry *) 0xadcff0 (gdb) print *thread_resources $2 = {storage = 0x1, count = 1885497708, thread_id = 1932420708, next = 0x312e6f} (gdb) print *thread_resources->storage Cannot access memory at address 0x1 (gdb) print thread_resources->storage $3 = (void **) 0x1 (gdb) print thread_resources->count $4 = 1885497708 (gdb) info threads * 1 process 5627 0x008332ce in ts_resource_ex (id=1, th_id=0x0) at TSRM.c:310 (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; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16583&edit=1