Commit e7e493d
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: I7c2d2d83fd4e531d950895678f1ff4b07a066e891 parent 1aaf68d commit e7e493d
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments