Bug #1006 mysqld-4.0.13 crash on Linux 2.4.19
Submitted: 6 Aug 2003 6:33 Modified: 10 Dec 2003 17:05
Reporter: Martin Mokrejs Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.13 OS:Linux (Linux 2.4.19-SMP)
Assigned to: Assigned Account CPU Architecture:Any

[6 Aug 2003 6:33] Martin Mokrejs
Description:
Hi,
  I tried to refresh opened files under mysqld on our linux server and found mysqladmin does not return back to the shell. I found the following was running on the server:

bioadmin@bontebok$ mysqladmin -hjerboas processlist
+-------+-----------+----------------------+----------------------------------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
| Id    | User      | Host                 | db                               | Command | Time | State                | Info                                                                                                 |
+-------+-----------+----------------------+----------------------------------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
| 36284 | guelden   | bongo.gsf.de:4001    | Fusarium_graminearum             | Sleep   | 96   |                      |                                                                                                      |
| 36308 | wwwpedant | grysbok.gsf.de:4071  | Saccharomyces_servazzii_CBS_4311 | Query   | 8560 | statistics           | explain SELECT rep.code FROM SC_orf, Upd, blast, blastindex, blastn_GeneticElement, blastx, blastx_S |
| 36836 | wwwpedant | nyala.gsf.de:2477    | Saccharomyces_servazzii_CBS_4311 | Sleep   | 3557 |                      |                                                                                                      |
| 36954 | wwwpedant | grysbok.gsf.de:4404  | Magnaporthe_grisea               | Query   | 2912 | Copying to tmp table | SELECT rep.code FROM blast_Scerevisiae, cogs, ecnum, funcat, interpro, orf, pfam, pirkw, pros, prot_ |
| 37351 | pedant    | bontebok.gsf.de:1880 |                                  | Refresh | 322  | Flushing tables      |                                                                                                      |
| 37423 | pedant    | bontebok.gsf.de:1911 |                                  | Query   | 0    |                      | show processlist                                                                                     |
+-------+-----------+----------------------+----------------------------------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
bioadmin@bontebok$ mysqladmin: refresh failed; error: 'Lost connection to MySQL server during query'

bioadmin@bontebok$

The connection was lost after cca. 80 seconds, if that matters.

The crash dump says:

0x80702cb handle_segfault + 447
0x8282488 pthread_sighandler + 184
0x8283a23 __pthread_unlock + 147
0x8280ca4 pthread_mutex_unlock + 164
0x827ed89 pthread_cond_wait + 345
0x808de79 wait_for_tables__FP3THD + 53
0x806ca29 mysql_lock_tables__FP3THDPP8st_tableUi + 329
0x808e53c open_ltable__FP3THDP13st_table_list13thr_lock_type + 184
0x80d7c44 mysqld_extend_show_tables__FP3THDPCcT1 + 2392
0x807c6f6 mysql_execute_command__Fv + 9282
0x807e166 mysql_parse__FP3THDPcUi + 146
0x80797ad dispatch_command__F19enum_server_commandP3THDPcUi + 1461
0x80791ed do_command__FP3THD + 149
0x8078a0f handle_one_connection + 631
0x827fc3c pthread_start_thread + 220
0x82b53fa thread_start + 4

thd->query at 0x112e9328 = show table status
thd->thread_id=36284

I see some other crashes in the error log file:

0x80702cb handle_segfault + 447
0x8282488 pthread_sighandler + 184
0x8283a23 __pthread_unlock + 147
0x8280ca4 pthread_mutex_unlock + 164
0x827ed89 pthread_cond_wait + 345
0x80d028f safe_remove_from_cache__FP3THDP8st_table + 79
0x80d1636 mysql_alter_table__FP3THDPcT1P24st_ha_create_informationP13st_table_listRt4List1Z12create_fieldRt4List1Z3KeyRt4List1Z10Alter_dr + 838
0x807b487 mysql_execute_command__Fv + 4563
0x807e166 mysql_parse__FP3THDPcUi + 146
0x80797ad dispatch_command__F19enum_server_commandP3THDPcUi + 1461
0x80791ed do_command__FP3THD + 149
0x8078a0f handle_one_connection + 631
0x827fc3c pthread_start_thread + 220
0x82b53fa thread_start + 4

thd->query at 0x15db6a58 = /*!40000 ALTER TABLE blast ENABLE KEYS */
thd->thread_id=85798

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

0x80702cb handle_segfault + 447
0x8282488 pthread_sighandler + 184
0x8283a23 __pthread_unlock + 147
0x8280ca4 pthread_mutex_unlock + 164
0x827ed89 pthread_cond_wait + 345
0x808de79 wait_for_tables__FP3THD + 53
0x806ca29 mysql_lock_tables__FP3THDPP8st_tableUi + 329
0x808e60c lock_tables__FP3THDP13st_table_list + 108
0x808e589 open_and_lock_tables__FP3THDP13st_table_list + 41
0x807a62b mysql_execute_command__Fv + 887
0x807e166 mysql_parse__FP3THDPcUi + 146
0x80797ad dispatch_command__F19enum_server_commandP3THDPcUi + 1461
0x80791ed do_command__FP3THD + 149
0x8078a0f handle_one_connection + 631
0x827fc3c pthread_start_thread + 220
0x82b53fa thread_start + 4

thd->query at 0x14dcee30 = select manual from blast where prot_data_id=1789
thd->thread_id=55201

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

0x80702cb handle_segfault + 447
0x8282488 pthread_sighandler + 184
0x8283a23 __pthread_unlock + 147
0x8280ca4 pthread_mutex_unlock + 164
0x827ed89 pthread_cond_wait + 345
0x80d028f safe_remove_from_cache__FP3THDP8st_table + 79
0x80d1636 mysql_alter_table__FP3THDPcT1P24st_ha_create_informationP13st_table_listRt4List1Z12create_fieldRt4List1Z3KeyRt4List1Z10Alter_dr + 838
0x807b487 mysql_execute_command__Fv + 4563
0x807e166 mysql_parse__FP3THDPcUi + 146
0x80797ad dispatch_command__F19enum_server_commandP3THDPcUi + 1461
0x80791ed do_command__FP3THD + 149
0x8078a0f handle_one_connection + 631
0x827fc3c pthread_start_thread + 220
0x82b53fa thread_start + 4

thd->query at 0x84f9f98 = /*!40000 ALTER TABLE known3d ENABLE KEYS */
thd->thread_id=8

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

0x80702cb handle_segfault + 447
0x8282488 pthread_sighandler + 184
0x82493d4 decode_bytes + 148
0x8249277 uf_blob + 171
0x8248787 _mi_pack_rec_unpack + 91
0x8255ff8 chk_data_link + 2880
0x80c3e2d check__9ha_myisamP3THDP15st_ha_check_opt + 597
0x80d0e75 mysql_admin_table__FP3THDP13st_table_listP15st_ha_check_optPCc13thr_lock_typebUiPFP3THDP13st_table_listP15st_ha_check_opt_iPM7h + 1537
0x80d12e5 mysql_check_table__FP3THDP13st_table_listP15st_ha_check_opt + 69
0x807b7b2 mysql_execute_command__Fv + 5374
0x807e166 mysql_parse__FP3THDPcUi + 146
0x80797ad dispatch_command__F19enum_server_commandP3THDPcUi + 1461
0x80791ed do_command__FP3THD + 149
0x8078a0f handle_one_connection + 631
0x827fc3c pthread_start_thread + 220
0x82b53fa thread_start + 4

thd->query at 0x910b478 = check table contig_data
thd->thread_id=157589

How to repeat:
Hmm, maybe one can reproduce the first crash with "refresh", the others do reappear time to time, but not reproducibly. We use oficial binaries.
[10 Dec 2003 17:05] Michael Widenius
Sorry for the delayed reply

I looked at the back traces but could not find anything that could help me find the source of the problem in them.

The last crashed was however different and indicated that you had a crashed compressed table.

To be able to help we would need a core file for one of the crashes.

Please download 4.0.16-debug (or 4.0.17-debug after a couple of days) and start mysqld with --core-file.

Hopefully the new release will either fix the problem or the core file will help us find the problem.