apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch ...@sfritsch.de>
Subject pool owner debugging idea
Date Thu, 01 May 2014 09:16:03 GMT

it's currently rather hard to debug issues caused by pools being used 
by different threads. The current pool debugging options don't really 
work if pool ownership changes during runtime (as int mpm event), 
require specific apr_pool_owner_set() calls, and apr compiled with 
pool debugging is significantly slower than normal apr.

So, I had the following idea for a lightweight debugging help: 

All pool operations are protected by mutexes. But in order to get the 
mutex, the operations use apr_thread_mutex_trylock(). If there is any 
contention while getting the mutex, we abort(). This would only catch 
threading issues during relatively high load when there is actual 
contention. But the mutex operations should be relatively cheap 
comparted to the full blown pool debugging. So maybe this feature 
could be even enabled by default if compiled in maintainer mode.

Do you think this would be a good idea?


View raw message