Re: [Maria-developers] e8ca684: MDEV-11221 - main.events_restart failed in bb
Hi, Sergey! Thanks! Ok to push! On Feb 28, Sergey Vojtovich wrote:
revision-id: e8ca684c6d5ce14eb021b4b691be50a8bf9c8281 (mariadb-10.0.29-38-ge8ca684) parent(s): b54566d73bb96ef9eb7d734742d3743fb3369a40 committer: Sergey Vojtovich timestamp: 2017-02-28 15:23:44 +0400 message:
MDEV-11221 - main.events_restart failed in bb
Applied lost in a merge revision:
next time, please specify a commit you're applying. Like Applied commit 7f38a070baa that was lost in a merge:
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.
Regards, Sergei Chief Architect MariaDB and security@mariadb.org
participants (1)
-
Sergei Golubchik