Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
-
None
Description
INSTALL SONAME 'ha_rocksdb'; |
|
CREATE TABLE t (id INT NOT NULL, i INT, PRIMARY KEY(id), KEY(i)) ENGINE=RocksDB WITH SYSTEM VERSIONING; |
INSERT INTO t VALUES (1,1),(2,2); # Optional, fails either way |
SELECT DISTINCT * FROM t WHERE i = 1 OR id > 8; |
10.5 fc456bc9 |
==3578269==ERROR: AddressSanitizer: use-after-poison on address 0x6210000c4650 at pc 0x7f0bb2ca0983 bp 0x7f0ba93d4b40 sp 0x7f0ba93d42f0
|
READ of size 4 at 0x6210000c4650 thread T5
|
#0 0x7f0bb2ca0982 in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:806
|
#1 0x5607dfa799df in key_restore(unsigned char*, unsigned char const*, st_key*, unsigned int) /data/src/10.5/sql/key.cc:262
|
#2 0x7f0ba82a668c in myrocks::Rdb_key_def::pack_index_tuple(TABLE*, unsigned char*, unsigned char*, unsigned char*, unsigned char const*, unsigned long const&) const /data/src/10.5/storage/rocksdb/rdb_datadic.cc:1009
|
#3 0x7f0ba8196af0 in myrocks::ha_rocksdb::index_read_map_impl(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function, st_key_range const*) /data/src/10.5/storage/rocksdb/ha_rocksdb.cc:8552
|
#4 0x7f0ba8197b40 in myrocks::ha_rocksdb::read_range_first(st_key_range const*, st_key_range const*, bool, bool) /data/src/10.5/storage/rocksdb/ha_rocksdb.cc:8407
|
#5 0x5607dfba2404 in QUICK_RANGE_SELECT::get_next_prefix(unsigned int, unsigned int, unsigned char*) /data/src/10.5/sql/opt_range.cc:12781
|
#6 0x5607dfbaa6d9 in QUICK_GROUP_MIN_MAX_SELECT::next_prefix() /data/src/10.5/sql/opt_range.cc:15612
|
#7 0x5607dfbacad2 in QUICK_GROUP_MIN_MAX_SELECT::get_next() /data/src/10.5/sql/opt_range.cc:15354
|
#8 0x5607dfbc1262 in rr_quick /data/src/10.5/sql/records.cc:403
|
#9 0x5607df0f0056 in sub_select(JOIN*, st_join_table*, bool) /data/src/10.5/sql/sql_select.cc:20928
|
#10 0x5607df195891 in do_select /data/src/10.5/sql/sql_select.cc:20463
|
#11 0x5607df195891 in JOIN::exec_inner() /data/src/10.5/sql/sql_select.cc:4540
|
#12 0x5607df197312 in JOIN::exec() /data/src/10.5/sql/sql_select.cc:4320
|
#13 0x5607df18ee52 in mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) /data/src/10.5/sql/sql_select.cc:4797
|
#14 0x5607df19199d in handle_select(THD*, LEX*, select_result*, unsigned long) /data/src/10.5/sql/sql_select.cc:444
|
#15 0x5607df003094 in execute_sqlcom_select /data/src/10.5/sql/sql_parse.cc:6314
|
#16 0x5607df02c69b in mysql_execute_command(THD*) /data/src/10.5/sql/sql_parse.cc:4005
|
#17 0x5607df03169b in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.5/sql/sql_parse.cc:8100
|
#18 0x5607df0379b4 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.5/sql/sql_parse.cc:1891
|
#19 0x5607df03d2b2 in do_command(THD*) /data/src/10.5/sql/sql_parse.cc:1375
|
#20 0x5607df39f0be in do_handle_one_connection(CONNECT*, bool) /data/src/10.5/sql/sql_connect.cc:1418
|
#21 0x5607df39f76c in handle_one_connection /data/src/10.5/sql/sql_connect.cc:1312
|
#22 0x5607dfeec204 in pfs_spawn_thread /data/src/10.5/storage/perfschema/pfs.cc:2201
|
#23 0x7f0bb277cea6 in start_thread nptl/pthread_create.c:477
|
#24 0x7f0bb2379dee in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xfddee)
|
|
0x6210000c4650 is located 336 bytes inside of 4080-byte region [0x6210000c4500,0x6210000c54f0)
|
allocated by thread T5 here:
|
#0 0x7f0bb2d10e8f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
|
#1 0x5607e089cf08 in my_malloc /data/src/10.5/mysys/my_malloc.c:90
|
#2 0x5607e08893dd in alloc_root /data/src/10.5/mysys/my_alloc.c:244
|
#3 0x5607dfb5214a in QUICK_GROUP_MIN_MAX_SELECT::init() /data/src/10.5/sql/opt_range.cc:15012
|
#4 0x5607dfb5214a in QUICK_GROUP_MIN_MAX_SELECT::init() /data/src/10.5/sql/opt_range.cc:15003
|
#5 0x5607dfbaa192 in TRP_GROUP_MIN_MAX::make_quick(PARAM*, bool, st_mem_root*) /data/src/10.5/sql/opt_range.cc:14853
|
#6 0x5607dfb90765 in SQL_SELECT::test_quick_select(THD*, Bitmap<64u>, unsigned long long, unsigned long long, bool, bool, bool, bool) /data/src/10.5/sql/opt_range.cc:3057
|
#7 0x5607df17a205 in get_quick_record_count /data/src/10.5/sql/sql_select.cc:4841
|
#8 0x5607df17a205 in make_join_statistics /data/src/10.5/sql/sql_select.cc:5568
|
#9 0x5607df18ca77 in JOIN::optimize_inner() /data/src/10.5/sql/sql_select.cc:2313
|
#10 0x5607df18ea7c in JOIN::optimize() /data/src/10.5/sql/sql_select.cc:1671
|
#11 0x5607df18ecf9 in mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) /data/src/10.5/sql/sql_select.cc:4783
|
#12 0x5607df19199d in handle_select(THD*, LEX*, select_result*, unsigned long) /data/src/10.5/sql/sql_select.cc:444
|
#13 0x5607df003094 in execute_sqlcom_select /data/src/10.5/sql/sql_parse.cc:6314
|
#14 0x5607df02c69b in mysql_execute_command(THD*) /data/src/10.5/sql/sql_parse.cc:4005
|
#15 0x5607df03169b in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.5/sql/sql_parse.cc:8100
|
#16 0x5607df0379b4 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.5/sql/sql_parse.cc:1891
|
#17 0x5607df03d2b2 in do_command(THD*) /data/src/10.5/sql/sql_parse.cc:1375
|
#18 0x5607df39f0be in do_handle_one_connection(CONNECT*, bool) /data/src/10.5/sql/sql_connect.cc:1418
|
#19 0x5607df39f76c in handle_one_connection /data/src/10.5/sql/sql_connect.cc:1312
|
#20 0x5607dfeec204 in pfs_spawn_thread /data/src/10.5/storage/perfschema/pfs.cc:2201
|
#21 0x7f0bb277cea6 in start_thread nptl/pthread_create.c:477
|
|
Thread T5 created by T0 here:
|
#0 0x7f0bb2cbc2a2 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cpp:214
|
#1 0x5607dfeec492 in my_thread_create /data/src/10.5/storage/perfschema/my_thread.h:52
|
#2 0x5607dfeec492 in pfs_spawn_thread_v1 /data/src/10.5/storage/perfschema/pfs.cc:2252
|
#3 0x5607ded9668b in inline_mysql_thread_create /data/src/10.5/include/mysql/psi/mysql_thread.h:1323
|
#4 0x5607ded9668b in create_thread_to_handle_connection(CONNECT*) /data/src/10.5/sql/mysqld.cc:6051
|
#5 0x5607deda1f02 in handle_accepted_socket(st_mysql_socket, st_mysql_socket) /data/src/10.5/sql/mysqld.cc:6175
|
#6 0x5607deda2913 in handle_connections_sockets() /data/src/10.5/sql/mysqld.cc:6302
|
#7 0x5607deda45fb in mysqld_main(int, char**) /data/src/10.5/sql/mysqld.cc:5697
|
#8 0x7f0bb22a2d09 in __libc_start_main ../csu/libc-start.c:308
|
|
SUMMARY: AddressSanitizer: use-after-poison ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:806 in __interceptor_memcpy
|
Shadow bytes around the buggy address:
|
0x0c4280010870: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
|
0x0c4280010880: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
|
0x0c4280010890: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
|
0x0c42800108a0: 00 00 00 00 00 00 f7 00 02 f7 00 00 01 f7 07 f7
|
0x0c42800108b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
=>0x0c42800108c0: f7 04 f7 00 00 00 00 00 f7 00[f7]00 f7 00 00 00
|
0x0c42800108d0: 00 00 00 00 00 00 00 00 00 f7 f7 f7 f7 f7 f7 f7
|
0x0c42800108e0: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
|
0x0c42800108f0: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
|
0x0c4280010900: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
|
0x0c4280010910: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
|
Shadow byte legend (one shadow byte represents 8 application bytes):
|
Addressable: 00
|
Partially addressable: 01 02 03 04 05 06 07
|
Heap left redzone: fa
|
Freed heap region: fd
|
Stack left redzone: f1
|
Stack mid redzone: f2
|
Stack right redzone: f3
|
Stack after return: f5
|
Stack use after scope: f8
|
Global redzone: f9
|
Global init order: f6
|
Poisoned by user: f7
|
Container overflow: fc
|
Array cookie: ac
|
Intra object redzone: bb
|
ASan internal: fe
|
Left alloca redzone: ca
|
Right alloca redzone: cb
|
Shadow gap: cc
|
==3578269==ABORTING
|
Doesn't fail on 10.4.