Bug #1568 mysql crash after deleteing logs
Submitted: 16 Oct 2003 5:08 Modified: 2 Feb 2004 6:28
Reporter: Johannes Ullrich Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S2 (Serious)
Version: OS:Linux (Linux 2.4.9-e.27summit)
Assigned to: Assigned Account CPU Architecture:Any

[16 Oct 2003 5:08] Johannes Ullrich
Description:
shortly after issuing a 'purge master logs' command, mysql crashed. 
disk and cpu load was high

Backtrace:

0x8071f64 handle_segfault + 420
0x82916c8 pthread_sighandler + 184
0x82b8245 chunk_free + 229
0x82b8123 free + 147
0x8276616 my_no_flags_free + 22
0x825f754 mi_close + 740
0x80c77f2 close__9ha_myisam + 34
0x809e30c free_tmp_table__FP3THDP8st_table + 76
0x8096fba mysql_select__FP3THDP13st_table_listRt4List1Z4ItemP4ItemP8st_orderT4T3T4UlP13select_result + 7082
0x80953d6 handle_select__FP3THDP6st_lexP13select_result + 102
0x807c94a mysql_execute_command__Fv + 970
0x8080565 mysql_parse__FP3THDPcUi + 149
0x807bac3 dispatch_command__F19enum_server_commandP3THDPcUi + 1443
0x807b50e do_command__FP3THD + 158
0x807acfe handle_one_connection + 638
0x828ee7c pthread_start_thread + 220
0x82c258a thread_start + 4

Error Log:

Version: '4.0.15-standard-log'  socket: '/tmp/mysql.sock'  port: 3306
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=209715200
read_buffer_size=10481664
max_used_connections=100
max_connections=100
threads_connected=23
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 327639 9 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
thd=0x8abb838
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=0xbfc5ecf8, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x8071f64
0x82916c8
0x82b8245
0x82b8123
0x8276616
0x825f754
0x80c77f2
0x809e30c
0x8096fba
0x80953d6
0x807c94a
0x8080565
0x807bac3
0x807b50e
0x807acfe
0x828ee7c
0x82c258a
New value of fp=(nil) failed sanity check, terminating stack trace!

thd->query at 0x89b5508 = select id, description, protocol, sourceport, targetpo rt from cve, cve_ports where reference=id and targetport=20944 order by id desc
thd->thread_id=413539

the 'cve' and 'cve_ports' tables are relatively small tables (7000 and 500 rows respectively). The query worked fine just after the restart. It should have returned an empty result. A check of the involved tables did not show any errors.

 

How to repeat:
1. start mysql
2. start several long running queries
3. start additional processes accessing the disk
4. 'purge master logs' for all but the current log
5. wait...
[18 Oct 2003 9:12] Guilhem Bichot
Hi Johannes!
Long time read you! I guess that bug#25 did not occur again on your machines?
The present crash: is it reproducable on your machines, or did it occur only once?
Thanks for the stacktrace; it shows that the crash is in place of code absolutely unrelated to PURGE, which is worrying (because if it's caused by PURGE, it looks like a memory corruption which has delayed effects). The thread which did PURGE MASTER LOGS, did it do other commands or only one PURGE MASTER LOGS?
Can you tell me what were the "additional processes accessing the disk"?
If you can repeat the crash, I'd be interested in the full sequence of what you did.
Because for the moment, all I can do is check code in search for coding errors.

Guilhem