Below is the list of changes that have just been committed into a local
5.0 repository of tnurnberg. When tnurnberg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
1.2161 06/05/31 14:27:31 tnurnberg@stripped +1 -0
Bug#18235: assertion/crash when windows mysqld is ended with ctrl-c
Two threads both try a shutdown sequence which creates a race to the
de-init/free of certain resources.
This exists in similar form in the client as 17926: "mysql.exe crashes
when ctrl-c is pressed in windows."
1.554 06/05/31 14:27:23 tnurnberg@stripped +5 -1
We have three potential ways of hitting the iceberg:
- unireg_end() has basic de-init
- unireg_abort() has extended de-init
- main() has a de-init sequence similar to unireg_abort()
In the Windows version of the server, Control-C is handled
in a different thread from the one main() is in. The main
loop is told to end, then unireg_abort() is called. Its
de-init and that of main() will then race each other for
mutex- and cond-var-destroys, free(), and finally exit().
This patch introduces a special case for Windows that will eliminate
the race by ending the signal-handler via unireg_end() instead if
SIGINT is signalled. This seems the least intrusive fix that still
fixes user-visible behaviour.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: tnurnberg
# Host: salvation.intern.azundris.com
# Root: /home/mysql-5.0-maint-18235
--- 1.553/sql/mysqld.cc 2006-05-29 15:06:30 +02:00
+++ 1.554/sql/mysqld.cc 2006-05-31 14:27:23 +02:00
@@ -991,7 +991,11 @@
my_thread_init(); // If this is a new thread
- if (sig != MYSQL_KILL_SIGNAL && sig != 0)
+ if (sig != MYSQL_KILL_SIGNAL &&
+ sig != SIGINT && /* Bug#18235 */
+ sig != 0)
unireg_abort(1); /* purecov: inspected */
|• bk commit into 5.0 tree (tnurnberg:1.2161) BUG#18235||Tatjana A Nuernberg||31 May|