ID:               16583
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Apache2 related
 Operating System: PLD Linux
 PHP Version:      4.2.0RC4
 New Comment:

Hmmm.. you all have gcc3. Have any of you been able to
reproduce this with gcc2.95?


Previous Comments:
------------------------------------------------------------------------

[2002-04-17 17:30:42] [EMAIL PROTECTED]

Also not working. Ugly workaround with thread_resources = NULL; works
but that's not the way. Backtrace does not give anything because it's
pretty random, it hardly depends on system status while tracing.

------------------------------------------------------------------------

[2002-04-17 11:27:22] [EMAIL PROTECTED]

I have the same problem.  On startup it dumps core.  Here is my
backtrace:

(gdb) where
#0  0x40566ba9 in ts_resource_ex (id=1, th_id=0x0) at TSRM.c:310
#1  0x404c60ee in php_module_startup (sf=0x4061e920) at main.c:856
#2  0x404c3e70 in php_apache_server_startup (pconf=0x80fb9c8,
plog=0x8125a70, ptemp=0x819cb10, s=0x80fd718) at sapi_apache2.c:435
#3  0x806f4be in ap_run_post_config (pconf=0x80fb9c8, plog=0x8125a70,
ptemp=0x819cb10, s=0x80fd718) at config.c:127
#4  0x8073bd5 in main (argc=2, argv=0xbffff874) at main.c:611
#5  0x4027f74f in __libc_start_main () from /lib/libc.so.6


My environment: Slackware, 2.4.18, glibc 2.2.5, gcc 3.0.4.
PHP 4.2.0RC4

------------------------------------------------------------------------

[2002-04-16 08:24:10] [EMAIL PROTECTED]

RC4 doesn't work, too :-(

------------------------------------------------------------------------

[2002-04-13 09:12:21] [EMAIL PROTECTED]

After running httpd via ElectricFence I got different backtrace...
problaby there is some memory corruption(?).

#0  0x007f0e68 in ts_resource_ex (id=1, th_id=0x0) at TSRM.c:307
307                             TSRM_ERROR((TSRM_ERROR_LEVEL_INFO,
"Fetching resource id %d for current thread %d", id, (long)
thread_resources->thread_id));
(gdb) 
(gdb) bt
#0  0x007f0e68 in ts_resource_ex (id=1, th_id=0x0) at TSRM.c:307
#1  0x0075831e in php_module_startup (sf=0x55b020) at main.c:856
#2  0x00559ca3 in php_apache_server_startup (pconf=0x4d5010,
plog=0x514010, ptemp=0xa91010, s=0x4d6d60)
    at sapi_apache2.c:435
#3  0x080681e5 in ap_run_post_config (pconf=0x4d5010, plog=0x514010,
ptemp=0xa91010, s=0x4d6d60) at config.c:130
#4  0x0806e7a5 in main (argc=2, argv=0xbffff9c4) at main.c:611
#5  0x003c0418 in __libc_start_main () from /lib/libc.so.6
(gdb) frame 0
#0  0x007f0e68 in ts_resource_ex (id=1, th_id=0x0) at TSRM.c:307
307                             TSRM_ERROR((TSRM_ERROR_LEVEL_INFO,
"Fetching resource id %d for current thread %d", id, (long)
thread_resources->thread_id));
(gdb) print thread_resources  
$1 = (struct _tsrm_tls_entry *) 0xaa0000
(gdb) print *thread_resources
Cannot access memory at address 0xaa0000
(gdb) print tls_key
$2 = 1

For now I did:
    thread_resources = pthread_getspecific(tls_key);
+    thread_resources = NULL;
#elif defined(TSRM_ST)


and wget -S myserver tells me:
Server: Apache/2.0.35 (Unix) PHP/4.2.0RC3

And it works
http://misie.k.pl/phptest.php

Now I'm waiting for official fix instead of mine ugly workaround.

------------------------------------------------------------------------

[2002-04-13 05:15:00] [EMAIL PROTECTED]

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

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/16583

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

Reply via email to