#At file:///home/os136802/mysql/develop/repo/falcon-bug40633-linux3/ based on revid:vvaintroub@stripped
3032 Olav Sandstaa 2009-02-23
Bug #43048 Falcon may crash during shutdown when running it embedded
Calling shutdown() directly on a Thread object is not thread safe. If the
thread we want to shutdown wake's up during the call to shutdown() it might
shutdown and delete the thread object before the call to shutdown() has
completed. This might result in shutdown() accessing free and overwritten
memory.
Instead of calling shutdown() directly, use the thread barn's
shutdown() method which has the neccessary locking for concurrent
threads.
modified:
storage/falcon/Cache.cpp
per-file messages:
storage/falcon/Cache.cpp
Change from calling shutdown() directly on the IO threads to call shutdown() on the
thread barn instead since the former of these methods is not thread safe.
=== modified file 'storage/falcon/Cache.cpp'
--- a/storage/falcon/Cache.cpp 2009-02-12 19:31:23 +0000
+++ b/storage/falcon/Cache.cpp 2009-02-23 18:57:39 +0000
@@ -1042,7 +1042,7 @@ void Cache::shutdownThreads(void)
{
for (int n = 0; n < numberIoThreads; ++n)
{
- ioThreads[n]->shutdown();
+ database->threads->shutdown(ioThreads[n]);
ioThreads[n] = 0;
}
| Thread |
|---|
| • bzr commit into mysql-6.0-falcon-team branch (olav:3032) Bug#43048 | Olav Sandstaa | 23 Feb |