Bug #48361 MySQL crashes on SHOW TABLE STATUS (MyISAM)
Submitted: 28 Oct 2009 6:57 Modified: 18 Dec 2009 8:22
Reporter: Konstantin Belov Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.1.39 OS:FreeBSD (AMD64)
Assigned to: CPU Architecture:Any
Tags: myisam, show table status

[28 Oct 2009 6:57] Konstantin Belov
Description:
Application makes thousands of UPDATE LOW_PRIORITY on some tables (about 7) each 5-7 seconds from a one thread. Each 15 seconds it queries SHOW TABLE STATUS from all tables of the database from other thread. MySQL crashes with signal 11 (once it commented "pure virtual method called"). It may not happen and may happen 5-7 times during a day depending on the "phase of moon". Here is the queries log:

... Some thousands of queries ...
UPDATE LOW_PRIORITY banner SET  impressions = impressions + 5,  clicks = clicks + 0,    impressions_today = impressions_today + 5,  clicks_today = clicks_today + 0,    impressions_hour = impressions_hour + 5,    clicks_hour = clicks_hour + 0,  events_1 = events_1 + 1,    events_1_today = events_1_today + 1,    events_1_hour = events_1_hour + 1 WHERE     id = 124649;
UPDATE LOW_PRIORITY banner SET  impressions = impressions + 1,  clicks = clicks + 0,    impressions_today = impressions_today + 1,  clicks_today = clicks_today + 0,    impressions_hour = impressions_hour + 1,    clicks_hour = clicks_hour + 0 WHERE     id = 98947;
UPDATE LOW_PRIORITY banner SET  impressions = impressions + 1,  clicks = clicks + 0,    impressions_today = impressions_today + 1,  clicks_today = clicks_today + 0,    impressions_hour = impressions_hour + 1,    clicks_hour = clicks_hour + 0 WHERE     id = 109170;
UPDATE LOW_PRIORITY banner SET  impressions = impressions + 1,  clicks = clicks + 0,    impressions_today = impressions_today + 1,  clicks_today = clicks_today + 0,    impressions_hour = impressions_hour + 1,    clicks_hour = clicks_hour + 0 WHERE     id = 99005
           68 Query SHOW TABLE STATUS FROM  main
/usr/local/libexec/mysqld, Version: 5.1.39-log (FreeBSD port: mysql-server-5.1.39). started with:
Tcp port: 0  Unix socket: (null)
...

All the tables are MyISAM tables.
MySQL stops to crash when excluding SHOW TABLE STATUS from application process. 

How to repeat:
This is "very floating" bug and can be repeated on the high load as described in "description".
[28 Oct 2009 7:50] Valeriy Kravchuk
Thank you for the problem report. Please, upload the relevant part of the error log (with stack trace for the crash).
[28 Oct 2009 10:06] Konstantin Belov
I use default compilation from FreeBSD port. There were no stack trace in error log, just information on signal 11 and maximal memory usage.
[6 Nov 2009 5:31] Valeriy Kravchuk
Please, send the results of SHOW GLOBAL STATUS under high load and your my.cnf file content.
[6 Nov 2009 5:34] Valeriy Kravchuk
Send also the entire error log or at least complete text of that rows where you see "pure virtual method called". I need to know from what file and line # this call happened.
[10 Nov 2009 9:46] Konstantin Belov
I will try to write to programms to simulate this bug and send it to you. There were no information in error log. I tried to set different parameters of caches and buffers in my.cnf (and defaults too), but it didn't related to the bug behaviour.
[18 Nov 2009 8:22] Sveta Smirnova
Thank you for the update.

We will wait feedback from you. Please also send output of SHOW CREATE TABLE banner and SHOW TABLE STATUS LIKE 'banner' if these queries on banner table are related to crash.
[19 Dec 2009 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".