sql/ha_partition.cc:5916: int ha_partition::handle_ordered_index_scan(uchar*, bool): Assertion `bitmap_is_set(&m_part_info->read_partitions, m_part_spec.start_part)' failed. | abort (sig=6) in ha_partition::handle_ordered_index_scan

Bug #1384591 reported by Roel Van de Paar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Invalid
Undecided
Unassigned
5.5
Invalid
Undecided
Unassigned
5.6
Triaged
Medium
Unassigned
5.7
Triaged
Medium
Unassigned

Bug Description

2014-10-19 17:32:44 7f60440dd700 [Info] InnoDB: the file format in the system tablespace is now set to Barracuda.
2014-10-19 17:32:44 7f604411e700 [Info] InnoDB: the file format in the system tablespace is now set to Antelope.
mysqld: /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/ha_partition.cc:5916: int ha_partition::handle_ordered_index_scan(uchar*, bool): Assertion `bitmap_is_set(&m_part_info->read_partitions, m_part_spec.start_part)' failed.
06:32:45 UTC - mysqld got signal 6 ;
[...]
Query (7f5fe0004e90): SELECT MAX(a) FROM t2 WHERE a > 5
Connection ID (thread ID): 4
Status: NOT_KILLED

Thread 1 (Thread 0x7f60440dd700 (LWP 27158)):
+bt
#0 0x00007f604bfdf771 in pthread_kill () from /lib64/libpthread.so.0
#1 0x0000000000ab7586 in my_write_core (sig=6) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/mysys/stacktrace.c:422
#2 0x000000000072f9ff in handle_fatal_signal (sig=6) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/signal_handler.cc:236
#3 <signal handler called>
#4 0x00007f604abe35c9 in raise () from /lib64/libc.so.6
#5 0x00007f604abe4cd8 in abort () from /lib64/libc.so.6
#6 0x00007f604abdc536 in __assert_fail_base () from /lib64/libc.so.6
#7 0x00007f604abdc5e2 in __assert_fail () from /lib64/libc.so.6
#8 0x0000000000e57835 in ha_partition::handle_ordered_index_scan (this=0x7f5fe4119110, buf=0x7f5fe4079cf0 "\215\005", reverse_order=false) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/ha_partition.cc:5915
#9 0x0000000000e56685 in ha_partition::common_first_last (this=0x7f5fe4119110, buf=0x7f5fe4079cf0 "\215\005") at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/ha_partition.cc:5365
#10 0x0000000000e565ef in ha_partition::index_last (this=0x7f5fe4119110, buf=0x7f5fe4079cf0 "\215\005") at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/ha_partition.cc:5344
#11 0x0000000000643436 in handler::ha_index_last (this=0x7f5fe4119110, buf=0x7f5fe4079cf0 "\215\005") at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/handler.cc:3070
#12 0x000000000098a108 in get_index_max_value (table=0x7f5fe40bce10, ref=0x7f60440d9780, range_fl=2) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/opt_sum.cc:207
#13 0x000000000098a868 in opt_sum_query (thd=0x1c03cf0, tables=0x7f5fe0005218, all_fields=..., conds=0x7f5fe0005948) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/opt_sum.cc:424
#14 0x00000000009c163e in JOIN::optimize (this=0x7f5fe0005ba8) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_optimizer.cc:315
#15 0x0000000000813fc6 in mysql_execute_select (thd=0x1c03cf0, select_lex=0x1c06950, free_join=true) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_select.cc:1086
#16 0x0000000000814317 in mysql_select (thd=0x1c03cf0, tables=0x7f5fe0005218, wild_num=0, fields=..., conds=0x7f5fe0005948, order=0x1c06b18, group=0x1c06a50, having=0x0, select_options=203115520, result=0x7f5fe0005b80, unit=0x1c06308, select_lex=0x1c06950) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_select.cc:1221
#17 0x00000000008123a6 in handle_select (thd=0x1c03cf0, result=0x7f5fe0005b80, setup_tables_done_option=0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_select.cc:110
#18 0x00000000007ea892 in execute_sqlcom_select (thd=0x1c03cf0, all_tables=0x7f5fe0005218) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:5597
#19 0x00000000007e2de9 in mysql_execute_command (thd=0x1c03cf0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:2958
#20 0x00000000007ed193 in mysql_parse (thd=0x1c03cf0, rawbuf=0x7f5fe0004e90 "SELECT MAX(a) FROM t2 WHERE a > 5", length=33, parser_state=0x7f60440dbd50) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:6773
#21 0x00000000007df5fc in dispatch_command (command=COM_QUERY, thd=0x1c03cf0, packet=0x23fd6d1 "SELECT MAX(a) FROM t2 WHERE a > 5;", packet_length=34) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:1432
#22 0x00000000007de528 in do_command (thd=0x1c03cf0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/sql_parse.cc:1049
#23 0x00000000008c2c30 in threadpool_process_request (thd=0x1c03cf0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/threadpool_common.cc:311
#24 0x00000000008c5572 in handle_event (connection=0x2285db0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/threadpool_unix.cc:1553
#25 0x00000000008c57a2 in worker_main (param=0x1898400 <all_groups+2048>) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/sql/threadpool_unix.cc:1606
#26 0x0000000000dc5bac in pfs_spawn_thread (arg=0x7f5fe0004ba0) at /mnt/workspace/percona-server-5.6-binaries-debug-yassl/label_exp/centos6-64/percona-server-5.6.21-69.0/storage/perfschema/pfs.cc:1860
#27 0x00007f604bfdadf3 in start_thread () from /lib64/libpthread.so.0
#28 0x00007f604aca401d in clone () from /lib64/libc.so.6

Tags: upstream
Revision history for this message
Roel Van de Paar (roel11) wrote :

Single threaded run, single mysqld involved

Revision history for this message
Roel Van de Paar (roel11) wrote :
Revision history for this message
Ramesh Sivaraman (rameshvs02) wrote :

This is an upstream bug : http://bugs.mysql.com/bug.php?id=74779

**** Testcase

DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE TABLE t1(a INT)ENGINE=InnoDB PARTITION BY list(a) (PARTITION p1 VALUES IN (1));
CREATE INDEX i1 ON t1(a);
SELECT MAX(a)FROM t1 WHERE a>5;

tags: added: upstream
Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :
Download full text (3.9 KiB)

5.6 with TokuDB fails with:

Version: '5.6.31-76.4-debug-log' socket: '/home/sveta/build/ps-5.6/mysql-test/var/tmp/mysqld.1.sock' port: 13001 Source distribution
mysqld: /home/sveta/src/percona-server/sql/ha_partition.cc:5963: int ha_partition::handle_ordered_index_scan(uchar*, bool): Assertion `bitmap_is_set(&m_part_info->read_partitions, m_part_spec.start_part)' failed.
18:25:27 UTC - mysqld got signal 6 ;
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.
Please help us make Percona Server better by reporting any
bugs at http://bugs.percona.com/

key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=1
max_threads=153
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 = 61927 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7efd7b75b000
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 = 7efd87c33dc8 thread_stack 0x40000
/home/sveta/build/ps-5.6/bin/mysqld(my_print_stacktrace+0x38)[0xae6e13]
/home/sveta/build/ps-5.6/bin/mysqld(handle_fatal_signal+0x42d)[0x73e3ab]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7efd86bd4330]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x7efd86006c37]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7efd8600a028]
/lib/x86_64-linux-gnu/libc.so.6(+0x2fbf6)[0x7efd85fffbf6]
/lib/x86_64-linux-gnu/libc.so.6(+0x2fca2)[0x7efd85fffca2]
/home/sveta/build/ps-5.6/bin/mysqld(_ZN12ha_partition25handle_ordered_index_scanEPhb+0x101)[0xe7db81]
/home/sveta/build/ps-5.6/bin/mysqld(_ZN12ha_partition17common_first_lastEPh+0x89)[0xe7ca3b]
/home/sveta/build/ps-5.6/bin/mysqld(_ZN12ha_partition10index_lastEPh+0x61)[0xe7c9af]
/home/sveta/build/ps-5.6/bin/mysqld(_ZN7handler13ha_index_lastEPh+0xf6)[0x64dcdc]
/home/sveta/build/ps-5.6/bin/mysqld[0x9a9c4a]
/home/sveta/build/ps-5.6/bin/mysqld(_Z13opt_sum_queryP3THDP10TABLE_LISTR4ListI4ItemEPS4_+0x87d)[0x9aa4c9]
/home/sveta/build/ps-5.6/bin/mysqld(_ZN4JOIN8optimizeEv+0xb79)[0x9e2a5d]
/home/sveta/build/ps-5.6/bin/mysqld[0x82aaed]
/home/sveta/build/ps-5.6/bin/mysqld(_Z12mysql_selectP3THDP10TABLE_LISTjR4ListI4ItemEPS4_P10SQL_I_ListI8st_orderESB_S7_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x220)[0x82adfc]
/home/sveta/build/ps-5.6/bin/mysqld(_Z13handle_selectP3THDP13select_resultm+0x1a6)[0x828d6c]
/home/sveta/build/ps-5.6/bin/mysqld[0x7ff69f]
/home/sveta/build/ps-5.6/bin/mysqld(_Z21mysql_execute_commandP3THD+0xe29)[0x7f76ff]
/home/sveta/build/ps-5.6/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x5a8)[0x80249c]
/home/sveta/build/ps-5.6/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xd13)[0x7f3c43]
/home/sveta/build/ps-5.6/bin/mysqld(_Z...

Read more...

Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

5.5 debug version does not crash with the same test

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1559

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.