Details
-
Bug
-
Status: In Testing (View Workflow)
-
Critical
-
Resolution: Unresolved
-
N/A
-
None
Description
--source include/have_innodb.inc
|
|
CREATE TABLE t (pk INT PRIMARY KEY, a INT, b INT, KEY(b), FOREIGN KEY (a) REFERENCES t (b)) ENGINE=InnoDB; |
INSERT INTO t VALUES (1,10,10); |
CHECK TABLE t EXTENDED; |
|
# Cleanup
|
DROP TABLE t; |
bb-11.8-check-table 01b0c6c996db756fc40d51178d669fcfbec7a1d7 |
==211056==ERROR: AddressSanitizer: use-after-poison on address 0x6290000fbe95 at pc 0x55a010c510ff bp 0x7f2dd3b50370 sp 0x7f2dd3b50368
|
READ of size 1 at 0x6290000fbe95 thread T11
|
#0 0x55a010c510fe in row_mysql_store_col_in_innobase_format(dfield_t*, unsigned char*, unsigned long, unsigned char const*, unsigned long, unsigned long) /data/bld/preview-11.8-bb-11.8-check-table-asan/storage/innobase/row/row0mysql.cc:375
|
#1 0x55a010ccfada in row_sel_convert_mysql_key_to_innobase(dtuple_t*, unsigned char*, unsigned long, dict_index_t*, unsigned char const*, unsigned long) /data/bld/preview-11.8-bb-11.8-check-table-asan/storage/innobase/row/row0sel.cc:2736
|
#2 0x55a0107e6f2e in ha_innobase::index_read(unsigned char*, unsigned char const*, unsigned int, ha_rkey_function) /data/bld/preview-11.8-bb-11.8-check-table-asan/storage/innobase/handler/ha_innodb.cc:8956
|
#3 0x55a00fbf930e in handler::index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/handler.h:4220
|
#4 0x55a00fdb8ee5 in handler::ha_index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/handler.cc:3829
|
#5 0x55a00fdde649 in handler::check_record_reference(st_key const*, st_key const*, unsigned long, unsigned char*, unsigned int, unsigned char const*, unsigned char*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/handler.cc:7964
|
#6 0x55a00f93f004 in check_key_referential_integrity /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:1746
|
#7 0x55a00f93f904 in check_foreign_key_relation /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:1853
|
#8 0x55a00f940357 in check_foreign_key_relations(THD*, TABLE*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:1913
|
#9 0x55a00fdc7c9b in handler::ha_check(THD*, st_ha_check_opt*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/handler.cc:5398
|
#10 0x55a00f937db2 in mysql_admin_table /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:942
|
#11 0x55a00f93df0f in Sql_cmd_check_table::execute(THD*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:1652
|
#12 0x55a00f42720a in mysql_execute_command(THD*, bool) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_parse.cc:5872
|
#13 0x55a00f434229 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_parse.cc:7901
|
#14 0x55a00f40b36a in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_parse.cc:1903
|
#15 0x55a00f408072 in do_command(THD*, bool) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_parse.cc:1416
|
#16 0x55a00f8fab62 in do_handle_one_connection(CONNECT*, bool) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_connect.cc:1415
|
#17 0x55a00f8fa6c1 in handle_one_connection /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_connect.cc:1327
|
#18 0x55a0105a610b in pfs_spawn_thread /data/bld/preview-11.8-bb-11.8-check-table-asan/storage/perfschema/pfs.cc:2198
|
#19 0x7f2de36a8043 in start_thread nptl/pthread_create.c:442
|
#20 0x7f2de372861b in clone3 ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
|
0x6290000fbe95 is located 7317 bytes inside of 16400-byte region [0x6290000fa200,0x6290000fe210)
|
allocated by thread T11 here:
|
#0 0x7f2de3eb89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
|
#1 0x55a011333bb9 in my_malloc /data/bld/preview-11.8-bb-11.8-check-table-asan/mysys/my_malloc.c:93
|
#2 0x55a01130617a in root_alloc /data/bld/preview-11.8-bb-11.8-check-table-asan/mysys/my_alloc.c:66
|
#3 0x55a01130716f in reset_root_defaults /data/bld/preview-11.8-bb-11.8-check-table-asan/mysys/my_alloc.c:244
|
#4 0x55a00f2c2a1e in THD::init_for_queries() /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_class.cc:1510
|
#5 0x55a00f8f9f92 in prepare_new_connection_state(THD*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_connect.cc:1253
|
#6 0x55a00f8fa742 in thd_prepare_connection(THD*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_connect.cc:1348
|
#7 0x55a00f8fab26 in do_handle_one_connection(CONNECT*, bool) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_connect.cc:1405
|
#8 0x55a00f8fa6c1 in handle_one_connection /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_connect.cc:1327
|
#9 0x55a0105a610b in pfs_spawn_thread /data/bld/preview-11.8-bb-11.8-check-table-asan/storage/perfschema/pfs.cc:2198
|
#10 0x7f2de36a8043 in start_thread nptl/pthread_create.c:442
|
|
Thread T11 created by T0 here:
|
#0 0x7f2de3e49726 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cpp:207
|
#1 0x55a0105a1ead in my_thread_create /data/bld/preview-11.8-bb-11.8-check-table-asan/storage/perfschema/my_thread.h:38
|
#2 0x55a0105a64fa in pfs_spawn_thread_v1 /data/bld/preview-11.8-bb-11.8-check-table-asan/storage/perfschema/pfs.cc:2249
|
#3 0x55a00f023aa0 in inline_mysql_thread_create /data/bld/preview-11.8-bb-11.8-check-table-asan/include/mysql/psi/mysql_thread.h:1139
|
#4 0x55a00f03c33f in create_thread_to_handle_connection(CONNECT*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/mysqld.cc:6266
|
#5 0x55a00f03c964 in create_new_thread(CONNECT*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/mysqld.cc:6328
|
#6 0x55a00f03cc4f in handle_accepted_socket(st_mysql_socket, st_mysql_socket) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/mysqld.cc:6390
|
#7 0x55a00f03d8d7 in handle_connections_sockets() /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/mysqld.cc:6502
|
#8 0x55a00f03a50a in run_main_loop /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/mysqld.cc:5744
|
#9 0x55a00f03bc0e in mysqld_main(int, char**) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/mysqld.cc:6167
|
#10 0x55a00f022d68 in main /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/main.cc:34
|
#11 0x7f2de36461c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
|
|
SUMMARY: AddressSanitizer: use-after-poison /data/bld/preview-11.8-bb-11.8-check-table-asan/storage/innobase/row/row0mysql.cc:375 in row_mysql_store_col_in_innobase_format(dfield_t*, unsigned char*, unsigned long, unsigned char const*, unsigned long, unsigned long)
|
Shadow bytes around the buggy address:
|
0x0c5280017780: f7 01 f7 02 f7 02 f7 00 00 00 00 00 00 00 00 00
|
0x0c5280017790: 00 00 00 00 00 00 00 00 00 00 00 f7 00 00 f7 00
|
0x0c52800177a0: 01 f7 05 f7 02 f7 05 f7 02 f7 00 00 f7 00 00 f7
|
0x0c52800177b0: 02 f7 02 f7 01 f7 02 f7 02 f7 00 00 00 00 00 00
|
0x0c52800177c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f7 00
|
=>0x0c52800177d0: 00 f7[05]f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
|
0x0c52800177e0: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
|
0x0c52800177f0: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
|
0x0c5280017800: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
|
0x0c5280017810: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
|
0x0c5280017820: 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
|
==211056==ABORTING
|
Attachments
Issue Links
- is caused by
-
MDEV-34309 CHECK TABLE should check that foreign key relations are correct
-
- Stalled
-
- is duplicated by
-
MDEV-35734 ASAN errors in cmp_dtuple_rec_with_match_low / check_key_referential_integrity
-
- Closed
-
- relates to
-
MDEV-35936 More ASAN errors in check_key_referential_integrity
-
- In Testing
-
MSAN variation of the failure:
==1237004==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x35d3904 in dtuple_validate(dtuple_t const*) /data/bld/preview-11.8-bb-11.8-check-table-msan/storage/innobase/data/data0data.cc:210:4
#1 0x2e8a526 in page_cur_search_with_match(dtuple_t const*, page_cur_mode_t, unsigned long*, unsigned long*, page_cur_t*, rtr_info*) /data/bld/preview-11.8-bb-11.8-check-table-msan/storage/innobase/page/page0cur.cc:314:2
#2 0x3462035 in btr_cur_t::search_leaf(dtuple_t const*, page_cur_mode_t, btr_latch_mode, mtr_t*) /data/bld/preview-11.8-bb-11.8-check-table-msan/storage/innobase/btr/btr0cur.cc:1409:9
#3 0x31e4316 in btr_pcur_open_with_no_init(dtuple_t const*, page_cur_mode_t, btr_latch_mode, btr_pcur_t*, mtr_t*) /data/bld/preview-11.8-bb-11.8-check-table-msan/storage/innobase/include/btr0pcur.inl:322:26
#4 0x31e4316 in row_search_mvcc(unsigned char*, page_cur_mode_t, row_prebuilt_t*, unsigned long, unsigned long) /data/bld/preview-11.8-bb-11.8-check-table-msan/storage/innobase/row/row0sel.cc:4797:10
#5 0x2b3f751 in ha_innobase::index_read(unsigned char*, unsigned char const*, unsigned int, ha_rkey_function) /data/bld/preview-11.8-bb-11.8-check-table-msan/storage/innobase/handler/ha_innodb.cc:8982:3
#6 0x1beb11a in handler::ha_index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) /data/bld/preview-11.8-bb-11.8-check-table-msan/sql/handler.cc:3829:3
#7 0x1c21917 in handler::check_record_reference(st_key const*, st_key const*, unsigned long, unsigned char*, unsigned int, unsigned char const*, unsigned char*) /data/bld/preview-11.8-bb-11.8-check-table-msan/sql/handler.cc:7964:14
#8 0x1489e83 in check_key_referential_integrity(TABLE const*, TABLE const*, st_key const*, st_key const*, unsigned long, unsigned char*, Lex_ident_column const&) /data/bld/preview-11.8-bb-11.8-check-table-msan/sql/sql_admin.cc:1746:35
#9 0x1489e83 in check_foreign_key_relation(THD*, TABLE const*, TABLE const*, st_foreign_key_info const&, unsigned char*) /data/bld/preview-11.8-bb-11.8-check-table-msan/sql/sql_admin.cc:1853:10
#10 0x148838e in check_foreign_key_relations(THD*, TABLE*) /data/bld/preview-11.8-bb-11.8-check-table-msan/sql/sql_admin.cc:1913:14
#11 0x1c01778 in handler::ha_check(THD*, st_ha_check_opt*) /data/bld/preview-11.8-bb-11.8-check-table-msan/sql/handler.cc:5398:7
#12 0x147b6af in mysql_admin_table(THD*, TABLE_LIST*, st_ha_check_opt*, st_mysql_const_lex_string const*, thr_lock_type, bool, bool, unsigned int, int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), int (handler::*)(THD*, st_ha_check_opt*), int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), bool) /data/bld/preview-11.8-bb-11.8-check-table-msan/sql/sql_admin.cc:942:21
#13 0x1482330 in Sql_cmd_check_table::execute(THD*) /data/bld/preview-11.8-bb-11.8-check-table-msan/sql/sql_admin.cc:1652:8
#14 0xd98a5c in mysql_execute_command(THD*, bool) /data/bld/preview-11.8-bb-11.8-check-table-msan/sql/sql_parse.cc:5872:26
#15 0xd8176f in mysql_parse(THD*, char*, unsigned int, Parser_state*) /data/bld/preview-11.8-bb-11.8-check-table-msan/sql/sql_parse.cc:7901:18
#16 0xd75bf3 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /data/bld/preview-11.8-bb-11.8-check-table-msan/sql/sql_parse.cc:1903:7
#17 0xd832ab in do_command(THD*, bool) /data/bld/preview-11.8-bb-11.8-check-table-msan/sql/sql_parse.cc:1416:17
#18 0x142bb0d in do_handle_one_connection(CONNECT*, bool) /data/bld/preview-11.8-bb-11.8-check-table-msan/sql/sql_connect.cc:1415:11
#19 0x142b13a in handle_one_connection /data/bld/preview-11.8-bb-11.8-check-table-msan/sql/sql_connect.cc:1327:5
#20 0x2859923 in pfs_spawn_thread /data/bld/preview-11.8-bb-11.8-check-table-msan/storage/perfschema/pfs.cc:2198:3
#21 0x7f5cd8d30043 in start_thread nptl/./nptl/pthread_create.c:442:8
#22 0x7f5cd8db061b in clone3 misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Uninitialized value was stored to memory at
#0 0x30f55ee in row_mysql_store_col_in_innobase_format(dfield_t*, unsigned char*, unsigned long, unsigned char const*, unsigned long, unsigned long) /data/bld/preview-11.8-bb-11.8-check-table-msan/storage/innobase/row/row0mysql.cc:384:9
Uninitialized value was stored to memory at
#0 0x30f48e0 in row_mysql_store_col_in_innobase_format(dfield_t*, unsigned char*, unsigned long, unsigned char const*, unsigned long, unsigned long) /data/bld/preview-11.8-bb-11.8-check-table-msan/storage/innobase/row/row0mysql.cc:375:7
Uninitialized value was created by a heap deallocation
#0 0x78e119 in free (/mnt8t/bld/preview-11.8-bb-11.8-check-table-msan/sql/mariadbd+0x78e119)
#1 0x3b0ae18 in root_free /data/bld/preview-11.8-bb-11.8-check-table-msan/mysys/my_alloc.c:77:5
#2 0x3b0ae18 in free_root /data/bld/preview-11.8-bb-11.8-check-table-msan/mysys/my_alloc.c:502:7
SUMMARY: MemorySanitizer: use-of-uninitialized-value /data/bld/preview-11.8-bb-11.8-check-table-msan/storage/innobase/data/data0data.cc:210:4 in dtuple_validate(dtuple_t const*)