Re: [PHP4BETA] deadlock

From: Date: Sat, 25 Sep 1999 14:12:45 +0000
Subject: Re: [PHP4BETA] deadlock
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-4905@lists.php.net to get a copy of this message
This looks like a genuine problem in the TSRM approach, rather than a locking problem. When TSRM is preparing the data structures for a new thread, if during this initialization code tries to access the local storage for that thread, you get a chicken&egg problem. I'm trying to figure out how to solve it. Zeev On Sat, 25 Sep 1999, Sascha Schumann wrote: > Hi, > > while trying to get php4 + aolserver running, the following > situation occurs. ts_resource() is entered twice recursively, > thus leading to a deadlock. Any hints appreciated. > > (gdb) bt > #0 0x4003a1bb in __sigsuspend (set=0xbf3ff910) > at ../sysdeps/unix/sysv/linux/sigsuspend.c:48 > #1 0x40111f51 in __pthread_lock (lock=0x813f680, self=0xbf3ffe7c) > at restart.h:32 > #2 0x4010f83a in __pthread_mutex_lock (mutex=0x813f670) at mutex.c:84 > #3 0x401df787 in tsrm_mutex_lock (mutexp=0x813f670) > at /home/sascha/src/aol/../php4/TSRM/TSRM.c:357 > #4 0x401df5d3 in ts_resource (id=4) > at /home/sascha/src/aol/../php4/TSRM/TSRM.c:209 > #5 0x40190c66 in OnUpdateBool (entry=0x81423e0, new_value=0x401f5642 "1", > new_value_length=1, mh_arg1=0x4, mh_arg2=0x402299e0, mh_arg3=0x0) > at ../php4/php_ini.c:377 > #6 0x401903d9 in php_ini_refresh_cache (p=0x81423e0) at ../php4/php_ini.c:131 > #7 0x401ddad1 in zend_hash_apply (ht=0x40228ae0, > destruct=0x40190390 <php_ini_refresh_cache>) > at /home/sascha/src/aol/../php4/libzend/zend_hash.c:797 > #8 0x4019040f in php_ini_refresh_caches () at ../php4/php_ini.c:139 > #9 0x401894ad in php_new_thread_end_handler (thread_id=3076) > at ../php4/main.c:784 > #10 0x401df5a4 in allocate_new_resource (thread_resources_ptr=0x813ad90, > thread_id=3076) at /home/sascha/src/aol/../php4/TSRM/TSRM.c:195 > #11 0x401df5f8 in ts_resource (id=0) > at /home/sascha/src/aol/../php4/TSRM/TSRM.c:215 > #12 0x401881e6 in request_handler (context=0x814d2d8, conn=0x82ebeb8) > at ../php4/aolserver.c:170 > #13 0x8066377 in Ns_ConnRunRequest (conn=0x82ebeb8) > at /usr/local/sascha/aolserver3/nsd/op.c:202 > > > -- > > Regards, > > Sascha Schumann > Consultant > > -- > PHP 4 Beta > -- ----------------------------------------------------- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il

« previous php.version4 (#4905) next »