partition table created with RocksDB engine crashes on a select query

Description

While testing RocksDB storage engine, a crash is seen with a simple select query. (refer attached MTR testcase)

Stacktrace:

#0 __pthread_kill (threadid=<optimized out>, signo=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x000055bd8c8d6765 in my_write_core (sig=11) at /home/mohit.joshi/mysql-8.0/mysys/stacktrace.cc:409 #2 0x000055bd8b5bd893 in handle_fatal_signal (sig=11) at /home/mohit.joshi/mysql-8.0/sql/signal_handler.cc:194 #3 <signal handler called> #4 __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:328 #5 0x00007f8f77992932 in myrocks::Rdb_key_def::unpack_binary_varlength (fpi=0x7f8f7e358900, ctx=0x7f902859fd70, dst=0x7f8f7e219c01 "\n", reader=0x7f902859fea0, unp_reader=0x7f902859feb0) at /home/mohit.joshi/mysql-8.0/storage/rocksdb/rdb_datadic.cc:3243 #6 0x00007f8f77989efb in myrocks::Rdb_convert_to_record_key_decoder::decode_field (fpi=0x7f8f7e358900, table=0x7f8f7e21a550, buf=0x7f8f7e219b48 "\300 ", reader=0x7f902859fea0, unpack_reader=0x7f902859feb0) at /home/mohit.joshi/mysql-8.0/storage/rocksdb/rdb_datadic.cc:105 #7 0x00007f8f77989fb3 in myrocks::Rdb_convert_to_record_key_decoder::decode (buf=0x7f8f7e219b48 "\300 ", fpi=0x7f8f7e358900, table=0x7f8f7e21a550, has_unpack_info=true, reader=0x7f902859fea0, unpack_reader=0x7f902859feb0) at /home/mohit.joshi/mysql-8.0/storage/rocksdb/rdb_datadic.cc:135 #8 0x00007f8f7798a3ba in myrocks::Rdb_key_field_iterator::next (this=0x7f902859fee0) at /home/mohit.joshi/mysql-8.0/storage/rocksdb/rdb_datadic.cc:246 #9 0x00007f8f779908f7 in myrocks::Rdb_key_def::unpack_record (this=0x7f8f7e358380, table=0x7f8f7e21a550, buf=0x7f8f7e219b48 "\300 ", packed_key=0x7f902859ffd0, unpack_info=0x7f902859ffe0, verify_row_debug_checksums=false) at /home/mohit.joshi/mysql-8.0/storage/rocksdb/rdb_datadic.cc:2119 #10 0x00007f8f77919319 in myrocks::ha_rocksdb::index_next_with_direction_intern (this=0x7f8f7e34c698, buf=0x7f8f7e219b48 "\300 ", move_forward=true, skip_next=false) at /home/mohit.joshi/mysql-8.0/storage/rocksdb/ha_rocksdb.cc:9190 #11 0x00007f8f77918d35 in myrocks::ha_rocksdb::index_next (this=0x7f8f7e34c698, buf=0x7f8f7e219b48 "\300 ") at /home/mohit.joshi/mysql-8.0/storage/rocksdb/ha_rocksdb.cc:9080 #12 0x000055bd8aeea8b4 in handler::ha_index_next (this=0x7f8f7e34c698, buf=0x7f8f7e219b48 "\300 ") at /home/mohit.joshi/mysql-8.0/sql/handler.cc:3556 #13 0x000055bd8aef653c in handler::read_range_next (this=0x7f8f7e34c698) at /home/mohit.joshi/mysql-8.0/sql/handler.cc:7649 #14 0x000055bd8aec67df in native_part::Partition_base::read_range_next_in_part (this=0x7f8f7e1d9cd8, part=1, buf=0x0) at /home/mohit.joshi/mysql-8.0/sql/partitioning/partition_base.cc:2741 #15 0x000055bd8b1fab30 in Partition_helper::handle_unordered_next (this=0x7f8f7e1db500, buf=0x7f8f7e219b48 "\300 ", is_next_same=false) at /home/mohit.joshi/mysql-8.0/sql/partitioning/partition_handler.cc:2343 #16 0x000055bd8b1fa739 in Partition_helper::ph_read_range_next (this=0x7f8f7e1db500) at /home/mohit.joshi/mysql-8.0/sql/partitioning/partition_handler.cc:2229 #17 0x000055bd8aecf9ee in native_part::Partition_base::read_range_next (this=0x7f8f7e1d9cd8) at /home/mohit.joshi/mysql-8.0/sql/partitioning/partition_base.h:436 #18 0x000055bd8aef3dc9 in handler::multi_range_read_next (this=0x7f8f7e1d9cd8, range_info=0x7f90285a03f8) at /home/mohit.joshi/mysql-8.0/sql/handler.cc:6718 #19 0x000055bd8aef3bcf in handler::ha_multi_range_read_next (this=0x7f8f7e1d9cd8, range_info=0x7f90285a03f8) at /home/mohit.joshi/mysql-8.0/sql/handler.cc:6672#20 0x000055bd8b19cc5d in QUICK_RANGE_SELECT::get_next (this=0x7f8f7ed77ee0) at /home/mohit.joshi/mysql-8.0/sql/opt_range.cc:10110 #21 0x000055bd8b216bf7 in IndexRangeScanIterator::Read (this=0x7f8f7f2ddc98) at /home/mohit.joshi/mysql-8.0/sql/records.cc:311 #22 0x000055bd8b4d9667 in Query_expression::ExecuteIteratorQuery (this=0x7f8f7f289c98, thd=0x7f8f7c015080) at /home/mohit.joshi/mysql-8.0/sql/sql_union.cc:1231 #23 0x000055bd8b4d99f0 in Query_expression::execute (this=0x7f8f7f289c98, thd=0x7f8f7c015080) at /home/mohit.joshi/mysql-8.0/sql/sql_union.cc:1284 #24 0x000055bd8b41a936 in Sql_cmd_dml::execute_inner (this=0x7f8f7f2dc2d0, thd=0x7f8f7c015080) at /home/mohit.joshi/mysql-8.0/sql/sql_select.cc:791 #25 0x000055bd8b419df4 in Sql_cmd_dml::execute (this=0x7f8f7f2dc2d0, thd=0x7f8f7c015080) at /home/mohit.joshi/mysql-8.0/sql/sql_select.cc:575 #26 0x000055bd8b393dea in mysql_execute_command (thd=0x7f8f7c015080, first_level=true) at /home/mohit.joshi/mysql-8.0/sql/sql_parse.cc:4677 #27 0x000055bd8b395f0c in dispatch_sql_command (thd=0x7f8f7c015080, parser_state=0x7f90285a1aa0, update_userstat=false) at /home/mohit.joshi/mysql-8.0/sql/sql_parse.cc:5273 #28 0x000055bd8b38b4db in dispatch_command (thd=0x7f8f7c015080, com_data=0x7f90285a2b70, command=COM_QUERY) at /home/mohit.joshi/mysql-8.0/sql/sql_parse.cc:1938 #29 0x000055bd8b38984b in do_command (thd=0x7f8f7c015080) at /home/mohit.joshi/mysql-8.0/sql/sql_parse.cc:1386 #30 0x000055bd8b5a4c0a in handle_connection (arg=0x55bd933fb300) at /home/mohit.joshi/mysql-8.0/sql/conn_handler/connection_handler_per_thread.cc:307 #31 0x000055bd8d16399a in pfs_spawn_thread (arg=0x55bd935501d0) at /home/mohit.joshi/mysql-8.0/storage/perfschema/pfs.cc:2899 #32 0x00007f903d765609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #33 0x00007f903d68c293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Steps to repeat:

Step 1: Copy the testcase in rocksdb test suite Step 2: ./mtr rocksdb.bug7827

 

Environment

None

Attachments

1
  • 29 Jul 2021, 06:31 PM

Confluence content

mentioned on

Smart Checklist

Activity

Show:

puneet.kaushik February 21, 2022 at 6:15 PM

MTR test bug_ps7827.test passed !

Done

Details

Assignee

Reporter

Time tracking

1d 32m logged48m remaining

Components

Affects versions

Priority

Smart Checklist

Created July 29, 2021 at 6:29 PM
Updated March 6, 2024 at 10:29 AM
Resolved January 13, 2022 at 2:54 PM

Flag notifications