ha_partition::init_record_priority_queue(): Assertion `!m_ordered_rec_buffer' failed. | UNIV_DEBUG

Bug #1241704 reported by Teemu Ollakka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
New
Undecided
Unassigned
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
New
Undecided
Unassigned
5.6
New
Undecided
Unassigned

Bug Description

Test:

./gentest.pl --dsn=dbi:mysql:host=gw:port=3311:user=test:database=test:password=testpass --gendata=conf/galera/galera_stress-56.zz --grammar=conf/galera/galera_stress-56.yy --threads=16 --queries=5000 --duration=300 --seed=time

Backtrace:

#0 __pthread_kill (threadid=<optimized out>, signo=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:63
#1 0x0000000000a96afc in my_write_core (sig=6) at /home/teemu/codership/galera/bzr/codership-mysql/5.6/mysys/stacktrace.c:422
#2 0x0000000000727f17 in handle_fatal_signal (sig=6)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/signal_handler.cc:248
#3 <signal handler called>
#4 0x00007fd73002a425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#5 0x00007fd73002db8b in __GI_abort () at abort.c:91
#6 0x00007fd7300230ee in __assert_fail_base (fmt=<optimized out>, assertion=0x10ce181 "!m_ordered_rec_buffer",
    file=0x10cce20 "/home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/ha_partition.cc", line=<optimized out>,
    function=<optimized out>) at assert.c:94
#7 0x00007fd730023192 in __GI___assert_fail (assertion=0x10ce181 "!m_ordered_rec_buffer",
    file=0x10cce20 "/home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/ha_partition.cc", line=4873,
    function=0x10d03e0 "bool ha_partition::init_record_priority_queue()") at assert.c:103
#8 0x0000000000df0b82 in ha_partition::init_record_priority_queue (this=0x7fd6a400d490)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/ha_partition.cc:4873
#9 0x0000000000df0fc6 in ha_partition::index_init (this=0x7fd6a400d490, inx=2, sorted=true)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/ha_partition.cc:4979
#10 0x00000000006400ca in handler::ha_index_init (this=0x7fd6a400d490, idx=2, sorted=true)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/handler.cc:2619
#11 0x0000000000962033 in QUICK_RANGE_SELECT::reset (this=0x7fd6ac050490)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/opt_range.cc:10379
#12 0x000000000091f351 in find_all_keys (param=0x7fd71c1e5c70, select=0x7fd6ac024750, fs_info=0x7fd71c1e5cf0,
    buffpek_pointers=0x7fd71c1e5f90, tempfile=0x7fd71c1e5e70, pq=0x7fd71c1e5d60, found_rows=0x7fd71c1e61f8)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/filesort.cc:727
#13 0x000000000091dfe8 in filesort (thd=0x1efe200, table=0x7fd6a400cba0, filesort=0x7fd6ac006c60, sort_positions=false,
    examined_rows=0x7fd71c1e61f0, found_rows=0x7fd71c1e61f8)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/filesort.cc:338
#14 0x00000000007a9eee in create_sort_index (thd=0x1efe200, join=0x7fd6ac023180, tab=0x7fd6ac024150)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_executor.cc:3338
#15 0x00000000007a7ab1 in st_join_table::sort_table (this=0x7fd6ac024150)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_executor.cc:2505
#16 0x00000000007a75b6 in join_init_read_record (tab=0x7fd6ac024150)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_executor.cc:2379
#17 0x00000000007a4ed1 in sub_select (join=0x7fd6ac023180, join_tab=0x7fd6ac024150, end_of_records=false)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_executor.cc:1253
#18 0x00000000007a4908 in do_select (join=0x7fd6ac023180)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_executor.cc:930
#19 0x00000000007a28df in JOIN::exec (this=0x7fd6ac023180)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_executor.cc:191
#20 0x0000000000802dbd in mysql_execute_select (thd=0x1efe200, select_lex=0x1f00c10, free_join=true)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_select.cc:1100
#21 0x00000000008030a2 in mysql_select (thd=0x1efe200, tables=0x7fd6ac005800, wild_num=0, fields=..., conds=0x7fd6ac005f68,
    order=0x1f00dd8, group=0x1f00d10, having=0x0, select_options=3489925888, result=0x7fd6ac006920, unit=0x1f005c8,
    select_lex=0x1f00c10) at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_select.cc:1221
#22 0x00000000008011b2 in handle_select (thd=0x1efe200, result=0x7fd6ac006920, setup_tables_done_option=1073741824)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_select.cc:110
#23 0x00000000007d5b99 in mysql_execute_command (thd=0x1efe200)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_parse.cc:3826
#24 0x00000000007de5de in mysql_parse (thd=0x1efe200,
    rawbuf=0x7fd6ac004c90 "INSERT INTO `table1000_innodb_key_pk_parts_2_int` ( `col_char_12` ) SELECT `col_char_12_key` FROM `u` AS X WHERE X . `col_int_key` < 233 ORDER BY `col_char_12`,`col_char_12_key`,`col_int`,`col_int_ke"..., length=215,
    parser_state=0x7fd71c1e8170) at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_parse.cc:6737
#25 0x00000000007ddc3a in wsrep_mysql_parse (thd=0x1efe200,
    rawbuf=0x7fd6ac004c90 "INSERT INTO `table1000_innodb_key_pk_parts_2_int` ( `col_char_12` ) SELECT `col_char_12_key` FROM `u` AS X WHERE X . `col_int_key` < 233 ORDER BY `col_char_12`,`col_char_12_key`,`col_int`,`col_int_ke"..., length=215,
    parser_state=0x7fd71c1e8170) at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_parse.cc:6517
#26 0x00000000007d0252 in dispatch_command (command=COM_QUERY, thd=0x1efe200,
    packet=0x1f048e1 "INSERT INTO `table1000_innodb_key_pk_parts_2_int` ( `col_char_12` ) SELECT `col_char_12_key` FROM `u` AS X WHERE X . `col_int_key` < 233 ORDER BY `col_char_12`,`col_char_12_key`,`col_int`,`col_int_ke"..., packet_length=215)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_parse.cc:1526
#27 0x00000000007cee16 in do_command (thd=0x1efe200)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_parse.cc:1118
#28 0x000000000079841b in do_handle_one_connection (thd_arg=0x1efe200)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_connect.cc:1007
#29 0x0000000000797eb9 in handle_one_connection (arg=0x1efe200)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/sql_connect.cc:916
#30 0x00007fd730bcce9a in start_thread (arg=0x7fd71c1e9700) at pthread_create.c:308
#31 0x00007fd7300e7ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#32 0x0000000000000000 in ?? ()
(gdb) f 8
#8 0x0000000000df0b82 in ha_partition::init_record_priority_queue (this=0x7fd6a400d490)
    at /home/teemu/codership/galera/bzr/codership-mysql/5.6/sql/ha_partition.cc:4873
4873 DBUG_ASSERT(!m_ordered_rec_buffer);
(gdb) p m_ordered_rec_buffer
$1 = (uchar *) 0x7fd6a40362c0 ""

summary: - mysqld: /home/teemu/codership/galera/bzr/codership-
- mysql/5.6/sql/ha_partition.cc:4873: bool
ha_partition::init_record_priority_queue(): Assertion
`!m_ordered_rec_buffer' failed.
summary: ha_partition::init_record_priority_queue(): Assertion
- `!m_ordered_rec_buffer' failed.
+ `!m_ordered_rec_buffer' failed | UNIV_DEBUG
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote : Re: ha_partition::init_record_priority_queue(): Assertion `!m_ordered_rec_buffer' failed | UNIV_DEBUG

Was able to reproduce this again. Attach the general log, backtrace and error log.

Of special interest is:

     DELETE FROM `table100_innodb_key_pk_parts_2_int_autoinc` WHERE `col_char_12_key` = 'i' ORDER BY `col_char_12`,`col_char_12_key`,`col_int`,`col_int_key`,`pk` LIMIT 4
     UPDATE `table100_innodb_key_pk_parts_2_int_autoinc` AS X SET `col_char_12` = 'l' ORDER BY `col_char_12`,`col_char_12_key`,`col_int`,`col_int_key`,`pk` LIMIT 7

the first query caused the crash, so may be useful to reproduce
this issue. (concurrent delete with update).

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :
summary: ha_partition::init_record_priority_queue(): Assertion
- `!m_ordered_rec_buffer' failed | UNIV_DEBUG
+ `!m_ordered_rec_buffer' failed. | UNIV_DEBUG
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.