apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch ...@sfritsch.de>
Subject testreslist failures / thread-safety issues
Date Sun, 22 May 2011 20:42:37 GMT
On Sunday 22 May 2011, sf@apache.org wrote:
> Author: sf
> Date: Sun May 22 20:10:42 2011
> New Revision: 1126207
> 
> URL: http://svn.apache.org/viewvc?rev=1126207&view=rev
> Log:
> Fix thread unsafe pool usage. This is a potential culprit for the
> occasional testreslist failures.

Can those people who frequently hit the testreslist failures please 
check if this commit helps? From a powerpc Debian build host, it looks 
promising, but I don't have direct access to that machine and can't do 
repeated tests there.

Unfortunately, there are also other thread-safety issues in apr/apr-
util. Using hellgrind on testreslist found these issues:

- unsafe read of pool->child in apr_pool_destroy. This one worries me. 
If a subpool is destroyed in one thread while the pool itself is 
destroyed in another thread, it can happen that apr_pool_destroy is 
called again for the subpool. This would likely lead to a crash.
Any ideas on how to fix this without sacrificing too much performance?

- unsafe read of allocator->max_index (PR 48535, likely not critical)

- unsafe read of _myself->thd_cnt in thread_pool_cleanup() (likely not 
critical; but there seem to be other thread-safety issues in that 
file, at least the access of thd_high is also unsafe)


Cheers,
Stefan

Mime
View raw message