List:Commits« Previous MessageNext Message »
From:John Embretsen Date:January 27 2009 12:03pm
Subject:Re: bzr commit into mysql-6.0-rpl branch (olav:2795) Bug#40633
View as plain text  
Hi,

For what it's worth, this change looks OK to me, after getting some
details about syncWait, Cache.cpp and IO threads from Olav.

Although it would be nice to fix the IO threads so that they release the
lock before shutting down completely, this fix seems pretty harmless (a
"risk" may be longer recovery times), and will probably fix the issue
seen in rpl's Pushbuild.

I think the best way to verify the fix for sure is to push into
mysql-6.0-rpl branch and monitor test results (Pushbuild), as this issue
is really hard to reproduce manually.

-- 
John


Olav Sandstaa wrote:
> #At file:///home/os136802/mysql/develop/repo/falcon-bug40633-rpl/ based on
> revid:luis.soares@stripped
> 
>  2795 Olav Sandstaa	2009-01-27
>       Fix for Bug #40633 Falcon assertion "lockState == 0" failed in SyncObject.cpp
>       
>       During shutdown it can happen that the IO threads terminate while the
> Cache.syncWait lock is still
>       held. To avoid that this leads to an assert in the SyncObject desctrutor we
> release this lock
>       in the Cache destructor.
> modified:
>   storage/falcon/Cache.cpp
> 
> per-file messages:
>   storage/falcon/Cache.cpp
>     During shutdown it can happen that the IO threads terminate while the syncWait
> lock is still
>     held. To avoid that this leads to an assert in the SyncObject desctrutor we
> release this lock
>     in the Cache destructor.
> === modified file 'storage/falcon/Cache.cpp'
> --- a/storage/falcon/Cache.cpp	2008-10-31 15:42:42 +0000
> +++ b/storage/falcon/Cache.cpp	2009-01-27 10:53:38 +0000
> @@ -167,6 +167,15 @@ Cache::~Cache()
>  
>  		delete[] bufferHunks;
>  		}
> +
> +	// When the IO threads terminate during shutdown the syncWait lock
> +	// might still be held. The syncWait lock is locked in Cache::flush()
> +	// and unlocked by one of the IO threads. If this IO thread terminates
> +	// with this lock being held we hit an assert in the SyncObject destructor.
> +	// To avoid this we release this lock here (see Bug#40633).
> +
> +	if (syncWait.isLocked())
> +		syncWait.unlock();
>  }
>  
>  Bdb* Cache::probePage(Dbb *dbb, int32 pageNumber)
> 
> 
Thread
bzr commit into mysql-6.0-rpl branch (olav:2795) Bug#40633Olav Sandstaa27 Jan
  • Re: bzr commit into mysql-6.0-rpl branch (olav:2795) Bug#40633John Embretsen27 Jan
  • RE: bzr commit into mysql-6.0-rpl branch (olav:2795) Bug#40633Vladislav Vaintroub27 Jan