From 2336e0b3944b73379f9d773b4e1b37cbc723bce4 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Mon, 9 Sep 2019 13:48:36 +0200 Subject: MDEV-20206 : Crash inside timer_callback()[threadpool_win.cc:419] The most likely cause of the crash is that a timer fired, after it was closed. MSDN documents such a possibility, in the documentation for CloseThreadpoolTimer() function, and recommends disabling the timer before calling WaitForThreadpoolTimerCallbacks()/CloseThreadpoolTimer(). The fix follows this recommendation. Note, that 5.5-10.1 disabled the timer before close, but this code was lost in threadpool refactoring in 10.2 --- sql/threadpool_win.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/threadpool_win.cc') diff --git a/sql/threadpool_win.cc b/sql/threadpool_win.cc index 10d6e96b22f..1e2084b9c07 100644 --- a/sql/threadpool_win.cc +++ b/sql/threadpool_win.cc @@ -308,6 +308,7 @@ TP_connection_win::~TP_connection_win() if (timer) { + SetThreadpoolTimer(timer, 0, 0, 0); WaitForThreadpoolTimerCallbacks(timer, TRUE); CloseThreadpoolTimer(timer); } -- cgit v1.2.1