apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: [PATCH] PR 49709 apr_thread_pool race condition caused by use of separate mutexes?
Date Mon, 27 Sep 2010 21:28:51 GMT
On Mon, Sep 27, 2010 at 4:55 PM, Henry Jen <henryjen@ztune.net> wrote:
> 2010/9/27 Nick Kew <niq@apache.org>:
>>
>> On 27 Sep 2010, at 13:12, Jeff Trawick wrote:
>>
>>> See https://issues.apache.org/bugzilla/show_bug.cgi?id=49709 and attached patch.
>>>
>>> The patch makes conceptual sense to me, though I haven't studied the details.
 Perhaps someone has a head start on learning the apr thread pool implementation?
>
> The patch looks good to me. As cond_wait actually release the mutex,
> it should work just fine.

Right; no worries here about whether it will continue to function
properly.  Looking at some of the
unlock(a)+lock(b)+do-something+unlock(b)+lock(a) usages, I'd expect
the patch will allow it to go faster for at least some applications,
and am not surprised that there were some potential deadlocks.

As far as "the right fix" for this problem...  I believe it is, and
will commit it shortly.

Thanks!

(The next one is
https://issues.apache.org/bugzilla/show_bug.cgi?id=48722, which has no
patch.  Maybe I can debug it.)

Mime
View raw message