List:Maria Storage Engine« Previous MessageNext Message »
From:Guilhem Bichot Date:October 15 2008 12:15pm
Subject:Re: timeout of waiting_threads-t on Windows
View as plain text  
Sergei Golubchik a écrit :
> Hi, Guilhem!
> 
> On Oct 14, Guilhem Bichot wrote:
>>>> Maybe it is the deadlock which you feared on certain rwlock
>>>> implementations? Note that Windows build is using our home-made
>>>> thr_rwlock.c implementation.
>>> Yes, looks like it's the one.
>> So what should we do?
> 
> Try this one. It should make mysys/thr_rwlock.c to behave like
> linux/solaris rwlocks do by default.
> It's a workaround, not a real fix, of course.
> 
> === modified file 'mysys/thr_rwlock.c'
> --- mysys/thr_rwlock.c  2006-12-23 19:17:15 +0000
> +++ mysys/thr_rwlock.c  2008-10-15 09:53:24 +0000
> @@ -89,7 +89,7 @@
>    pthread_mutex_lock(&rwp->lock);
>  
>    /* active or queued writers */
> -  while (( rwp->state < 0 ) || rwp->waiters)
> +  while ( rwp->state < 0 )
>      pthread_cond_wait( &rwp->readers, &rwp->lock);
>  
>    rwp->state++;
> @@ -101,7 +101,7 @@
>  {
>    int res;
>    pthread_mutex_lock(&rwp->lock);
> -  if ((rwp->state < 0 ) || rwp->waiters)
> +  if (rwp->state < 0 )
>      res= EBUSY;                                        /* Can't get lock */
>    else
>    {

Thanks.
Unfortunately, even with the patch, it still hangs. I filed it as
http://bugs.mysql.com/bug.php?id=40043

-- 
Mr. Guilhem Bichot <guilhem@stripped>
Sun Microsystems / MySQL, Lead Software Engineer
Bordeaux, France
www.sun.com / www.mysql.com
Thread
timeout of waiting_threads-t on WindowsGuilhem Bichot10 Oct
  • Re: timeout of waiting_threads-t on WindowsGuilhem Bichot11 Oct
  • Re: timeout of waiting_threads-t on WindowsSergei Golubchik13 Oct
    • Re: timeout of waiting_threads-t on WindowsGuilhem Bichot14 Oct
      • Re: timeout of waiting_threads-t on WindowsSergei Golubchik15 Oct
        • Re: timeout of waiting_threads-t on WindowsGuilhem Bichot15 Oct