[PHP-DEV] Mutex deadlock problem?

2002-02-26 Thread Venkat Raghavan


Hi. 
There seems to be a mutex deadlock problem in TSRM / Zend. 
ts_free_thread() function locks the 
tsmm_mutex mutex and calls functions through function pointers 
in resource_types_table[i].dtor. One such function is 
alloc_globals_dtor(), which in turn calls 
shutdown_memory_manager(), which does a 
TSRMLS_FETCH(). This calls ts_resource_ex(), 
which again locks the same tsmm_mutex mutex. So, this function 
has to wait forever for the mutex to get unlocked.Is there something 
wrong I am doing? Can anyone help? Thanx in advance, Venkat 



Re: [PHP-DEV] Mutex deadlock problem?

2002-02-26 Thread Andi Gutmans

Hey,

Can you please try the latest CVS of PHP  Zend and let us know if it fixes 
the problem?

Thanks,

Andi

At 02:01 AM 2/26/2002 -0700, Venkat Raghavan wrote:
Hi. There seems to be a mutex deadlock problem in TSRM / Zend.

ts_free_thread() function locks the tsmm_mutex mutex and calls functions 
through function pointers in resource_types_table[i].dtor. One such 
function is alloc_globals_dtor(), which in turn calls 
shutdown_memory_manager(), which does a TSRMLS_FETCH(). This calls 
ts_resource_ex(), which again locks the same tsmm_mutex mutex. So, this 
function has to wait forever for the mutex to get unlocked.

Is there something wrong I am doing? Can anyone help?

Thanx in advance,
Venkat


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php