Bug #51270 Killing Show create table causes server crash
Submitted: 18 Feb 2010 7:00 Modified: 18 Feb 2010 8:36
Reporter: Hareesh Haridas Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.41.0 OS:Linux (RHEL4)
Assigned to: CPU Architecture:Any
Tags: crashing

[18 Feb 2010 7:00] Hareesh Haridas
Description:
MySQL server crashes when you kill a show create table statement while a data load is happening on the table. From the logs I have found the following:

----------------
100215 22:12:33 - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=3
max_threads=200
threads_connected=3
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 260364 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0xc86b6e0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x232ff438 thread_stack 0x30000
/home/y/libexec/mysqld(my_print_stacktrace+0x21)[0x8366881]
/home/y/libexec/mysqld(handle_segfault+0x394)[0x81a611e]
/lib/tls/libpthread.so.0[0x392888]
/home/y/libexec/mysqld(_Z18mysqld_show_createP3THDP10TABLE_LIST+0x5d5)[0x82af42b]
/home/y/libexec/mysqld(_Z21mysql_execute_commandP3THD+0x268e)[0x81b543a]
/home/y/libexec/mysqld(_Z11mysql_parseP3THDPKcjPS2_+0x2be)[0x81ba2ec]
/home/y/libexec/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x487)[0x81ba78d]
/home/y/libexec/mysqld(_Z10do_commandP3THD+0xe2)[0x81bbb28]
/home/y/libexec/mysqld(handle_one_connection+0x7bc)[0x81acd4c]
/lib/tls/libpthread.so.0[0x38c371]
/lib/tls/libc.so.6(__clone+0x5e)[0x2b59be]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0xccaaa38 = show create table mydb.mytable
thd->thread_id=2
thd->killed=KILL_QUERY
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
Writing a core file
100215 22:12:35 mysqld_safe Number of processes running now: 0
100215 22:12:35 mysqld_safe mysqld restarted

------------------

mysql> show processlist;
+----+------+-----------+-----------------+------------+------+-------------------+------------------------------------------------------------------------------------------------------+
| Id | User | Host      | db              | Command    | Time | State             | Info                               
                                                                 |
+----+------+-----------+-----------------+------------+------+-------------------+------------------------------------------------------------------------------------------------------+
|  1 | root | localhost | mydb | Query      |    0 | update            | INSERT INTO `mytable` VALUES
(3,2,20185927600,0,5533818334045600783,1,511,'0',':url not reachable |
|  2 | root | localhost | insights_server | Field List |   45 | Waiting for table |                                    
                                                                 |
|  3 | root | localhost | mydb | Query      |    0 | NULL              | show processlist                   
                                                                 |
+----+------+-----------+-----------------+------------+------+-------------------+------------------------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)

mysql> show create table completion\G
Ctrl-C -- sending "KILL QUERY 3" to server ...
Ctrl-C -- query aborted.

How to repeat:
How to reproduce:
-----------------
1. From one session start restoring a dump 
2. From another session execute a show create table statement for the table currently being restored.
3. kill the show create table thread using kill statement or ctrl+c
[18 Feb 2010 7:43] Valeriy Kravchuk
Thank you for the problem report. Please, check with a newer version, 5.1.43, and inform about the results.
[18 Feb 2010 8:00] Hareesh Haridas
In the version 5.1.43 it is fixed
[18 Feb 2010 8:11] MySQL Verification Team
probably a duplicate of bug #48985 !
[18 Feb 2010 8:36] Valeriy Kravchuk
Duplicate of bug #48985.