Skip to content

Commit e7e493d

Browse files
Dyre Tjeldvollzmur
authored andcommitted
Bug#37039422 Backport Bug#36682079: crash on thread_pool + audit_log with [SEMI]SYNCHRONOUS when killing connections
Problem: Using the audit log plugin together with the thread pool plugin could result in SEGV. Root cause: The audit log plugin would execute code when a connection is killed, and this code could invoke the thd_pool_wait_begin() callback. Since this was done from the waiting thread without attaching the connection to worker thread tp_low_level_client_t::processing_thread would be nullptr. This was not expected by thd_pool_wait_begin(). Solution: Unset THD::scheduler_data before calling end_connection(). That way both thd_pool_wait_begin() and thd_pool_wait_end() return early and the invalid tp_client_low_level_t::processing_thread is not dereferenced. Additionally, specialize error handling for poll and epoll when waiting for events and allow a Windows-specific error mentioned in the bug report. Change-Id: I7c2d2d83fd4e531d950895678f1ff4b07a066e89
1 parent 1aaf68d commit e7e493d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

mysql-test/include/check_windows.inc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ==== Purpose ====
2+
#
3+
# Check if we are executing on Windows.
4+
#
5+
# ==== Usage ====
6+
#
7+
# --source include/check_windows.inc
8+
# # Now check if $have_windows is 0 or 1
9+
10+
--let $have_windows = `SELECT CONVERT(@@version_compile_os using latin1) IN ("Win32", "Win64", "Windows")`

0 commit comments

Comments
 (0)