Bug #66011 server crash
Submitted: 25 Jul 2012 16:21 Modified: 29 Jul 2012 15:55
Reporter: Andrey Melnikov Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Partitions Severity:S1 (Critical)
Version:5.5.25a OS:Linux
Assigned to: CPU Architecture:Any

[25 Jul 2012 16:21] Andrey Melnikov
Description:
mysqld crash when try access to damaged? partition.

16:11:00 UTC - mysqld got signal 8 ;
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=16777216
read_buffer_size=131072
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 346681 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f2a46f63340
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...
stack_bottom = 7f2a3f4bae88 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x7f2a3fb5069e]
/usr/sbin/mysqld(handle_fatal_signal+0x493)[0x7f2a3fa09e93]
/lib/libpthread.so.0(+0xeff0)[0x7f2a3f1c9ff0]
/usr/sbin/mysqld(_ZN12ha_partition16records_in_rangeEjP12st_key_rangeS1_+0x71)[0x7f2a3fcc89e1]
/usr/sbin/mysqld(+0x4e68ff)[0x7f2a3fadd8ff]
/usr/sbin/mysqld(+0x4e6e6f)[0x7f2a3fadde6f]
/usr/sbin/mysqld(+0x4e6f7f)[0x7f2a3faddf7f]
/usr/sbin/mysqld(+0x4e71fb)[0x7f2a3fade1fb]
/usr/sbin/mysqld(_ZN10SQL_SELECT17test_quick_selectEP3THD6BitmapILj64EEyyb+0x1254)[0x7f2a3fae91b4]
/usr/sbin/mysqld(+0x33c6f6)[0x7f2a3f9336f6]
/usr/sbin/mysqld(_ZN4JOIN8optimizeEv+0x52d)[0x7f2a3f934ded]
/usr/sbin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18s
t_select_lex_unitP13st_select_lex+0xd7)[0x7f2a3f938857]
/usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x174)[0x7f2a3f93e384]
/usr/sbin/mysqld(+0x303727)[0x7f2a3f8fa727]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x2fda)[0x7f2a3f90099a]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x24e)[0x7f2a3f90213e]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x13f6)[0x7f2a3f9035f6]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x10e)[0x7f2a3f9a402e]
/usr/sbin/mysqld(handle_one_connection+0x50)[0x7f2a3f9a4150]
/lib/libpthread.so.0(+0x68ca)[0x7f2a3f1c18ca]
/lib/libc.so.6(clone+0x6d)[0x7f2a3db1892d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f2a47ad4d70): select value from history_uint where itemid=78495 and clock>1343228656 and clock<=1343232256 order by clock desc limit 2
Connection ID (thread ID): 2
Status: NOT_KILLED

mysql> analyze table history_uint;
+---------------------+---------+----------+----------+
| Table               | Op      | Msg_type | Msg_text |
+---------------------+---------+----------+----------+
| zabbix.history_uint | analyze | status   | OK       |
+---------------------+---------+----------+----------+
1 row in set (6.14 sec)

How to repeat:
Don't know.
[25 Jul 2012 17:05] Valeriy Kravchuk
Please, send the output of

show create table history_uint\G
[27 Jul 2012 15:30] Andrey Melnikov
table histury_uint structure

Attachment: history_uint-struct.txt (text/plain), 11.12 KiB.

[27 Jul 2012 15:48] Andrey Melnikov
more readable crash dump:
Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x7ffa8dd3a700 (LWP 2262)]
0x00007ffb6c821e21 in ha_partition::records_in_range(unsigned int, st_key_range*, st_key_range*) ()
(gdb) bt
#0  0x00007ffb6c821e21 in ha_partition::records_in_range(unsigned int, st_key_range*, st_key_range*) ()
#1  0x00007ffb6c636bef in check_quick_keys(PARAM*, unsigned int, SEL_ARG*, unsigned char*, unsigned int, int, unsi
#2  0x00007ffb6c63715f in check_quick_keys(PARAM*, unsigned int, SEL_ARG*, unsigned char*, unsigned int, int, unsi
#3  0x00007ffb6c63726f in check_quick_select(PARAM*, unsigned int, SEL_ARG*, bool) ()
#4  0x00007ffb6c6374eb in get_key_scans_params(PARAM*, SEL_TREE*, bool, bool, double) ()
#5  0x00007ffb6c6424a4 in SQL_SELECT::test_quick_select(THD*, Bitmap<64u>, unsigned long long, unsigned long long,
#6  0x00007ffb6c48c796 in make_join_statistics(JOIN*, TABLE_LIST*, Item*, st_dynamic_array*) ()
#7  0x00007ffb6c48de8d in JOIN::optimize() ()
#8  0x00007ffb6c4918f7 in mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int,
    ()
#9  0x00007ffb6c497424 in handle_select(THD*, LEX*, select_result*, unsigned long) ()
#10 0x00007ffb6c4537c7 in execute_sqlcom_select(THD*, TABLE_LIST*) ()
#11 0x00007ffb6c459a3a in mysql_execute_command(THD*) ()
#12 0x00007ffb6c45b1de in mysql_parse(THD*, char*, unsigned int, Parser_state*) ()
#13 0x00007ffb6c45c696 in dispatch_command(enum_server_command, THD*, char*, unsigned int) ()
#14 0x00007ffb6c4fd10e in do_handle_one_connection(THD*) ()
#15 0x00007ffb6c4fd230 in handle_one_connection ()
#16 0x00007ffb6bd1a8ca in start_thread () from /lib/libpthread.so.0
#17 0x00007ffb6a67192d in clone () from /lib/libc.so.6
#18 0x0000000000000000 in ?? ()
(gdb)
[29 Jul 2012 15:55] Valeriy Kravchuk
This is a duplicate of Bug #65663. Should be fixed in MySQL 5.5.27.