forked from facebook/mysql-5.6
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug#34144617: Signal 11 in vio_shutdown when closing(?) connection
Problem: Killing a connection resulted in signal 11. Root cause is assumed to be (unable to verify) that an attempt was made at sending SIGALRM to a non-existent thread id. This is not unusual but normally pthread_kill() returns an error code which gets printed in the log, and does not trigger sig 11. This situation can occur when running with TP, or any other time when a THD is re-assigned to a different OS thread, because the thread id used to send SIGALRM is recorded in the Vio object when the THD is created and not updated when the THD is reassigned to a different OS thread. And this is incorrect even if when it does not trigger sig 11, because we are sending SIGALRM to the wrong thread. While a stray SIGALRM is ignored, it also means that the the thread that is actually waiting in ppoll will not be woken up and will hang until it times out. Solution: Make sure THD::real_id is stored in the Vio object before calling vio_shutdown(). Change thd_close_connection() so that it calls THD::shutdown_active_vio() instead of Protocol_classic::shutdown() which is meant to be used from a different thread and is what is being used when killing connections without TP. Change-Id: Id9b7e54c5b4388977a39fd268e0ff173d701db2b
- Loading branch information
Dyre Tjeldvoll
authored and
Dyre Tjeldvoll
committed
Jun 28, 2022
1 parent
8500849
commit 222479b
Showing
8 changed files
with
76 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters