Bug #1117 server under load crashes on simple queries
Submitted: 21 Aug 2003 11:33 Modified: 27 Sep 2003 8:15
Reporter: Dennis Allison Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:3.23.54a-3.73 OS:Linux (RH7.3)
Assigned to: CPU Architecture:Any

[21 Aug 2003 11:33] Dennis Allison
Description:
Looks like a threading problem....

Stack traces:

0x80d6caf handle_segfault__Fi + 431
0x40037f05 _end + 935642501
0x8125f3a berkeley_cmp_packed_key__FP4__dbPC8__db_dbtT1 + 122
0x8174c5c __bam_cmp + 288
0x81b8a86 __bam_search + 886
0x81ae5dd __bam_c_search + 1633
0x81ac141 __bam_c_get + 1297
0x8188960 __db_c_get + 840
0x8184a6b __db_get + 323
0x8128411 rnd_pos__11ha_berkeleyPcT1 + 97
0x811e15a rr_from_pointers__FP14st_read_record + 58
0x80fe94e join_init_read_record__FP13st_join_table + 78
0x80fde6c sub_select__FP4JOINP13st_join_tableb + 76
0x80fdbe4 do_select__FP4JOINPt4List1Z4ItemP8st_tableP9Procedure + 404
0x80f67a4 mysql_select__FP3THDP13st_table_listRt4List1Z4ItemP4ItemP8st_orderT4T3T4UiP13select_result + 7428
0x80dd5ef mysql_execute_command__Fv + 847
0x80e0a05 mysql_parse__FP3THDPcUi + 69
0x80dc803 do_command__FP3THD + 1283
0x80dbd69 handle_one_connection__FPv + 585

0x80d6caf handle_segfault__Fi + 431
0x40037f05 _end + 935642501
0x8125f10 berkeley_cmp_packed_key__FP4__dbPC8__db_dbtT1 + 80
0x8174c5c __bam_cmp + 288
0x81b8a86 __bam_search + 886
0x81ae5dd __bam_c_search + 1633
0x81ac141 __bam_c_get + 1297
0x8188960 __db_c_get + 840
0x8184a6b __db_get + 323
0x8128411 rnd_pos__11ha_berkeleyPcT1 + 97
0x811e15a rr_from_pointers__FP14st_read_record + 58
0x80fe94e join_init_read_record__FP13st_join_table + 78
0x80fde6c sub_select__FP4JOINP13st_join_tableb + 76
0x80fdbe4 do_select__FP4JOINPt4List1Z4ItemP8st_tableP9Procedure + 404
0x80f67a4 mysql_select__FP3THDP13st_table_listRt4List1Z4ItemP4ItemP8st_orderT4T3T4UiP13select_result + 7428
0x80dd5ef mysql_execute_command__Fv + 847
0x80e0a05 mysql_parse__FP3THDPcUi + 69
0x80dc803 do_command__FP3THD + 1283
0x80dbd69 handle_one_connection__FPv + 585

0x80d6caf handle_segfault__Fi + 431
0x40037f05 _end + 935642501
0x8125f10 berkeley_cmp_packed_key__FP4__dbPC8__db_dbtT1 + 80
0x8174c5c __bam_cmp + 288
0x81b8a86 __bam_search + 886
0x81ae5dd __bam_c_search + 1633
0x81ac141 __bam_c_get + 1297
0x8188960 __db_c_get + 840
0x8184a6b __db_get + 323
0x8128411 rnd_pos__11ha_berkeleyPcT1 + 97
0x811e15a rr_from_pointers__FP14st_read_record + 58
0x80fe94e join_init_read_record__FP13st_join_table + 78
0x80fde6c sub_select__FP4JOINP13st_join_tableb + 76
0x80fdbe4 do_select__FP4JOINPt4List1Z4ItemP8st_tableP9Procedure + 404
0x80f67a4 mysql_select__FP3THDP13st_table_listRt4List1Z4ItemP4ItemP8st_orderT4T3T4UiP13select_result + 7428

How to repeat:
Actually, these are the queries which caused failures -- 
executed out of context they work just fine :-(

>>>  mysqld.log  size  27261

Some pointers may be invalid and cause the dump to abort...
thd->query at 0x8c81a90 = select * from titles_list
where topic_id = 'CC0001'
  and title_type = 'ide'
order by ROUND(title_ordinal) LIMIT 1000
thd->thread_id=629

Some pointers may be invalid and cause the dump to abort...
thd->query at 0x84b07d0 = select * from titles_list
where topic_id = 'CC0001'
  and title_type = 'ov'
order by ROUND(title_ordinal) LIMIT 1000
thd->thread_id=246

Some pointers may be invalid and cause the dump to abort...
thd->query at 0x8652be8 = select * from titles_list
where topic_id = 'CC0001'
  and title_type = 'ov'
order by ROUND(title_ordinal) LIMIT 1000
thd->thread_id=26

Some pointers may be invalid and cause the dump to abort...
thd->query at 0x8487680 = select top_id, topic_title, topic_ordinal from topics_list
where course_name = 'statistics'
order by topic_ordinal LIMIT 1000
thd->thread_id=5

Some pointers may be invalid and cause the dump to abort...
thd->query at 0x877e920 = select * from titles_list
where topic_id = 'CC0001'
  and title_type = 'ov'
order by ROUND(title_ordinal) LIMIT 1000
thd->thread_id=40

Some pointers may be invalid and cause the dump to abort...
thd->query at 0x85aded8 = select * from titles_list
where topic_id = 'CC00018'
  and title_type = 'ide'
order by ROUND(title_ordinal) LIMIT 1000
thd->thread_id=18

Suggested fix:

Well, I'm going to move these to MyISAM tables from BDB tables.
[27 Aug 2003 6:46] Indrek Siitan
Crashing under load and/or threading problems are often caused by the
operating system, not MySQL directly.

What kernel version are you running?
[27 Aug 2003 8:15] Dennis Allison
kernel-2.4.18-27.7.x  at the moment.  Earlier 2.4.18 kernels with the same sort of behavior.

Changing table type to MyISAM seems to have eliminated the problem.
[14 Feb 2005 22:54] 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".