Bug #34524 Server crash when pressing Control-C during OPTIMIZE TABLE for MyISAM
Submitted: 13 Feb 2008 14:30 Modified: 2 Jun 2008 7:48
Reporter: Kristian Koehntopp Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: DDL Severity:S1 (Critical)
Version:5.0.52-enterprise-gpl-log OS:Any (Linux </hostname_edited/ 2.6.9-55.0.9.ELsmp #1 SMP Thu Sep 27 18:28:00 EDT 2007 x86_6)
Assigned to: Assigned Account CPU Architecture:Any

[13 Feb 2008 14:30] Kristian Koehntopp
Description:
I compared two servers statistics and found

@@ -2077,14 +2077,14 @@
      Row_format: Dynamic
-    Data_length: 103575900
+    Data_length: 103693992
 Max_data_length: 281474976710655
-   Index_length: 117451776
-      Data_free: 0
+   Index_length: 117882880
+      Data_free: 113336
  Auto_increment: NULL
-    Update_time: 2008-02-13 06:37:18
-     Check_time: 2008-01-28 12:26:16
+    Update_time: 2008-02-13 06:40:16
+     Check_time: 2007-11-29 22:46:07
       Collation: latin1_swedish_ci
        Checksum: NULL
  Create_options:

To equal out the difference between the two servers, I ran OPTIMIZE TABLE on the TABLE in Question. The tables locked, I pressed Control-C. The server crashed.

The relevant part of the crash log is

*** glibc detected *** free(): invalid pointer: 0x0000002c3a4dcf90 ***
080213 15:22:49 - mysqld got signal 6;
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=536870912
read_buffer_size=4190208
max_used_connections=243
max_connections=400
threads_connected=242
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 3799484 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x2c40aef8d0
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...
Cannot determine thread, fp=0x45353f78, backtrace may not be correct.
Bogus stack limit or frame pointer, fp=0x45353f78, stack_bottom=0x45350000, thread_stack=262144,
aborting backtrace.
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0xcd51620 = optimize table B_HotelTrans
thd->thread_id=2327741
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.
mysqld: my_new.cc:50: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.

How to repeat:
Try OPTIMIZE TABLE on a large MyISAM table, and Control-C it. Maybe it is easily reproduceable.
[13 Feb 2008 14:43] Susanne Ebrecht
Set to verified as described.
[13 Feb 2008 16:35] MySQL Verification Team
Hi!  Please send "SHOW CREATE TABLE B_HotelTrans" and the my.cnf used for this server.

I haven't been able to repeat a crash after using my own tables.  All I got was corruptions, which is expected.
[14 Mar 2008 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[2 Jun 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".