Re: [Maria-developers] 7910c99: MDEV-10043 - main.events_restart fails sporadically in buildbot (crashes upon
![](https://secure.gravatar.com/avatar/39b623a1559cf9c69ac3d9d4fb44e7fe.jpg?s=120&d=mm&r=g)
Hi, Sergey! On Jun 17, Sergey Vojtovich wrote:
revision-id: 7910c99bd1fa30911225e512997f466cb1b7996d (mariadb-5.5.49-51-g7910c99) parent(s): 7ff86b49912df5de7b5a8b9c9134e72134b7ba5c committer: Sergey Vojtovich timestamp: 2016-06-17 18:54:11 +0400 message:
MDEV-10043 - main.events_restart fails sporadically in buildbot (crashes upon shutdown)
There was race condition between shutdown thread and event worker threads.
Shutdown thread waits for thread_count to become 0 in close_connections(). It may happen so that event worker thread was started but didn't increment thread_count by this time. In this case shutdown thread may miss wait for this working thread and continue deinitialization. Worker thread in turn may continue execution and crash on deinitialized data.
Fixed by incrementing thread_count before thread is actually created like it is done for connection threads.
Also let event scheduler not to inc/dec running threads counter for symmetry with other "service" threads.
ok to push. I'll have a questionable pleasure of merging it into 10.2 :) (it conflicts with 562c1df). Regards, Sergei Chief Architect MariaDB and security@mariadb.org
participants (1)
-
Sergei Golubchik