partitioning/partition_handler.cc:3649: int Partition_helper::handle_ordered_prev(uchar*): Assertion `0' failed.

Description

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 Core was generated by `/sda/PS181016-percona-server-5.7.15-7-linux-x86_64-debug/bin/mysqld --no-defaul'. Program terminated with signal 6, Aborted. #0 0x00007f4966ce2741 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61 61 val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid), (gdb) bt +bt #0 0x00007f4966ce2741 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61 #1 0x00000000018460a4 in my_write_core (sig=6) at /git/PS-5.7_dbg/mysys/stacktrace.c:247 #2 0x0000000000e7d04b in handle_fatal_signal (sig=6) at /git/PS-5.7_dbg/sql/signal_handler.cc:223 #3 <signal handler called> #4 0x00007f49650795f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #5 0x00007f496507ace8 in __GI_abort () at abort.c:90 #6 0x00007f4965072566 in __assert_fail_base (fmt=0x7f49651c2ce8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x1ec984b "0", file=file@entry=0x1ec98f0 "/git/PS-5.7_dbg/sql/partitioning/partition_handler.cc", line=line@entry=3649, function=function@entry=0x1ecc5e0 <Partition_helper::handle_ordered_prev(unsigned char*)::__PRETTY_FUNCTION__> "int Partition_helper::handle_ordered_prev(uchar*)") at assert.c:92 #7 0x00007f4965072612 in __GI___assert_fail (assertion=0x1ec984b "0", file=0x1ec98f0 "/git/PS-5.7_dbg/sql/partitioning/partition_handler.cc", line=3649, function=0x1ecc5e0 <Partition_helper::handle_ordered_prev(unsigned char*)::__PRETTY_FUNCTION__> "int Partition_helper::handle_ordered_prev(uchar*)") at assert.c:101 #8 0x000000000143476f in Partition_helper::handle_ordered_prev (this=0x7f49214e3aa0, buf=0x7f49215de770 <incomplete sequence \371>) at /git/PS-5.7_dbg/sql/partitioning/partition_handler.cc:3649 #9 0x0000000001432817 in Partition_helper::ph_index_prev (this=0x7f49214e3aa0, buf=0x7f49215de770 <incomplete sequence \371>) at /git/PS-5.7_dbg/sql/partitioning/partition_handler.cc:2869 #10 0x0000000001967732 in ha_partition::index_prev (this=0x7f49214e3630, buf=0x7f49215de770 <incomplete sequence \371>) at /git/PS-5.7_dbg/storage/partition/ha_partition.h:512 #11 0x0000000000f0ee52 in handler::ha_index_prev (this=0x7f49214e3630, buf=0x7f49215de770 <incomplete sequence \371>) at /git/PS-5.7_dbg/sql/handler.cc:3303 #12 0x00000000016f65b9 in QUICK_SELECT_DESC::get_next (this=0x7f491c034c00) at /git/PS-5.7_dbg/sql/opt_range.cc:11409 #13 0x000000000143d13a in rr_quick (info=0x7f491baeaa00) at /git/PS-5.7_dbg/sql/records.cc:398 #14 0x00000000014cf789 in sub_select (join=0x7f491baea0f8, qep_tab=0x7f491baea9b0, end_of_records=false) at /git/PS-5.7_dbg/sql/sql_executor.cc:1274 #15 0x00000000014cf106 in do_select (join=0x7f491baea0f8) at /git/PS-5.7_dbg/sql/sql_executor.cc:944 #16 0x00000000014cd087 in JOIN::exec (this=0x7f491baea0f8) at /git/PS-5.7_dbg/sql/sql_executor.cc:199 #17 0x0000000001569502 in handle_query (thd=0x7f4921419000, lex=0x7f492141b5e0, result=0x7f492142cbd0, added_options=0, removed_options=0) at /git/PS-5.7_dbg/sql/sql_select.cc:184 #18 0x000000000151d818 in execute_sqlcom_select (thd=0x7f4921419000, all_tables=0x7f492142c210) at /git/PS-5.7_dbg/sql/sql_parse.cc:5393 #19 0x0000000001516b02 in mysql_execute_command (thd=0x7f4921419000, first_level=true) at /git/PS-5.7_dbg/sql/sql_parse.cc:2891 #20 0x000000000151e7f5 in mysql_parse (thd=0x7f4921419000, parser_state=0x7f496728e500) at /git/PS-5.7_dbg/sql/sql_parse.cc:5838 #21 0x0000000001513643 in dispatch_command (thd=0x7f4921419000, com_data=0x7f496728ec90, command=COM_QUERY) at /git/PS-5.7_dbg/sql/sql_parse.cc:1447 #22 0x000000000151255d in do_command (thd=0x7f4921419000) at /git/PS-5.7_dbg/sql/sql_parse.cc:1010 #23 0x000000000164e994 in handle_connection (arg=0x7f49447841c0) at /git/PS-5.7_dbg/sql/conn_handler/connection_handler_per_thread.cc:312 #24 0x0000000001874cdc in pfs_spawn_thread (arg=0x7f495af91420) at /git/PS-5.7_dbg/storage/perfschema/pfs.cc:2188 #25 0x00007f4966cdddc5 in start_thread (arg=0x7f496728f700) at pthread_create.c:308 #26 0x00007f496513aced in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
1 2 3 4 5 6 7 8 9 10 11 The attached tarball (1476835555_bug_bundle.tar.gz) gives the testcase as an exact match of our system, including some handy utilities $ vi 1476835555_mybase # STEP1: Update the base path in this file (usually the only change required!). If you use a non-binary distribution, please update SOURCE_DIR location also $ ./1476835555_init # STEP2: Initializes the data dir $ ./1476835555_start # STEP3: Starts mysqld $ ./1476835555_cl # STEP4: To check mysqld is up $ ./1476835555_run_pquery # STEP5: Run the testcase with the pquery binary $ ./1476835555_run # OPTIONAL: Run the testcase with the mysql CLI (may not reproduce the issue, as the pquery binary was used for the original testcase reduction) $ vi /dev/shm/1476835555/error.log.out # STEP6: Verify the error log $ ./1476835555_gdb # OPTIONAL: Brings you to a gdb prompt with gdb attached to the used mysqld and attached to the generated core $ ./1476835555_parse_core # OPTIONAL: Creates 1476835555_STD.gdb and 1476835555_FULL.gdb; standard and full variables gdb stack traces

See also:
https://bugs.launchpad.net/percona-server/+bug/1634708
http://bugs.mysql.com/bug.php?id=83435

But here (note: added `--sql_mode=ONLY_FULL_GROUP_BY --plugin-load-add=tokudb=ha_tokudb.so` and `changed engine=TokuDB`) the server crashes with TokuDB and using C-API (i.e. pquery).

Environment

None

Status

Assignee

Unassigned

Reporter

roel.vandepaar

Labels

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

Freshdesk Tickets

None

Priority

Major
Configure