You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Henry Jen <he...@ztune.net> on 2005/06/03 08:05:20 UTC

[patch] Deadlock in apr_thread_cond_wait on WIN32 platform [BugID 27654, 34336]

Hi,

We encountered the issue as reported in Bug
27654(http://issues.apache.org/bugzilla/show_bug.cgi?id=27654), too bad
I did not check the issue database earlier until I figured it out after
3 days.

The patch in the issues database should be working, is there a reason
for not committing it?

Anyway, I have created another patch(see attachment) to address the same
issue and which would also fix bug 34336 as it totally removing the
cond->mutex. I believe using the mutex passed in to ensure mutual access
should be sufficient.

Unless the different threads can use different mutex for the same cond,
but I don't see that as a valid usage and nor can I think of a use case
for that.

Please review it, comments are welcome. I would like to see the patch be
committed to head and also back port to 0.9.x release. The patch had
been tested for both apr-0.9.6 and SVN trunk with 'patch -Np0' in the
apr folder.
 
Cheers,
-- 
Henry Jen aka slowhog
http://blogs.sun.com/slowhog

Re: [patch] Deadlock in apr_thread_cond_wait on WIN32 platform [BugID 27654, 34336]

Posted by Klaus Keppler <kl...@informatik.stud.uni-erlangen.de>.
Hi Henry,

as you can see I commited the patch in February, but got no
answer/reason why the patch wasn't used in APR yet.

I'm tired asking for commiting the patch, so actually I patch
APR always for myself. As you prove, the bug REALLY exists and
makes thread conditionals under WIN32 actually unusuable.

However - good luck, maybe your patch will be commited one day.

Best regards,

    Klaus


Henry Jen schrieb:
> Hi,
> 
> We encountered the issue as reported in Bug
> 27654(http://issues.apache.org/bugzilla/show_bug.cgi?id=27654), too bad
> I did not check the issue database earlier until I figured it out after
> 3 days.
> 
> The patch in the issues database should be working, is there a reason
> for not committing it?
> 
> Anyway, I have created another patch(see attachment) to address the same
> issue and which would also fix bug 34336 as it totally removing the
> cond->mutex. I believe using the mutex passed in to ensure mutual access
> should be sufficient.
> 
> Unless the different threads can use different mutex for the same cond,
> but I don't see that as a valid usage and nor can I think of a use case
> for that.
> 
> Please review it, comments are welcome. I would like to see the patch be
> committed to head and also back port to 0.9.x release. The patch had
> been tested for both apr-0.9.6 and SVN trunk with 'patch -Np0' in the
> apr folder.
>  
> Cheers,



Re: [patch] Deadlock in apr_thread_cond_wait on WIN32 platform [BugID 27654, 34336]

Posted by Henry Jen <he...@ztune.net>.
Oops, keep reminding myself to attach the patch, but in the end ...

Here it is.


On Thu, 2005-06-02 at 23:05 -0700, Henry Jen wrote:
> Hi,
> 
> We encountered the issue as reported in Bug
> 27654(http://issues.apache.org/bugzilla/show_bug.cgi?id=27654), too bad
> I did not check the issue database earlier until I figured it out after
> 3 days.
> 
> The patch in the issues database should be working, is there a reason
> for not committing it?
> 
> Anyway, I have created another patch(see attachment) to address the same
> issue and which would also fix bug 34336 as it totally removing the
> cond->mutex. I believe using the mutex passed in to ensure mutual access
> should be sufficient.
> 
> Unless the different threads can use different mutex for the same cond,
> but I don't see that as a valid usage and nor can I think of a use case
> for that.
> 
> Please review it, comments are welcome. I would like to see the patch be
> committed to head and also back port to 0.9.x release. The patch had
> been tested for both apr-0.9.6 and SVN trunk with 'patch -Np0' in the
> apr folder.
>  
> Cheers,
-- 
Henry Jen aka slowhog
http://blogs.sun.com/slowhog