Details
-
Bug
-
Status: In Testing (View Workflow)
-
Critical
-
Resolution: Unresolved
-
N/A
-
None
Description
With tentative fixes for all cases from MDEV-35908 and MDEV-35733.
--source include/have_innodb.inc
|
|
CREATE TABLE t1 (a CHAR(64)) ENGINE=InnoDB; |
INSERT INTO t1 VALUES ('foo'); |
CREATE TABLE t2 (b CHAR(128), KEY(b)) ENGINE=InnoDB; |
INSERT INTO t2 VALUES ('foo'); |
ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t2 (b); |
CHECK TABLE t1 EXTENDED; |
bb-11.8-check-table 594c0c55d3dca85c6b39ba0e42dee654594c8c15 |
==3937534==ERROR: AddressSanitizer: use-after-poison on address 0x62f000081646 at pc 0x7f16d7c47681 bp 0x7f16a9951850 sp 0x7f16a9951000
|
WRITE of size 152 at 0x62f000081646 thread T18
|
#0 0x7f16d7c47680 in __interceptor_memset ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:799
|
#1 0x556a7734f2d9 in Field_varstring::get_key_image(unsigned char*, unsigned int, unsigned char const*, Field::imagetype) const /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/field.cc:8457
|
#2 0x556a7770064e in key_copy(unsigned char*, unsigned char*, unsigned char const*, st_key const*, st_key const*, unsigned int, bool) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/key.cc:178
|
#3 0x556a773e78a8 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:7962
|
#4 0x556a76f47ffc in check_key_referential_integrity /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:1754
|
#5 0x556a76f48ac0 in check_foreign_key_relation /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:1886
|
#6 0x556a76f49513 in check_foreign_key_relations(THD*, TABLE*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:1946
|
#7 0x556a773d0f21 in handler::ha_check(THD*, st_ha_check_opt*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/handler.cc:5398
|
#8 0x556a76f40cbf in mysql_admin_table /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:942
|
#9 0x556a76f46f07 in Sql_cmd_check_table::execute(THD*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:1660
|
#10 0x556a76a30130 in mysql_execute_command(THD*, bool) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_parse.cc:5872
|
#11 0x556a76a3d14f 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
|
#12 0x556a76a14290 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
|
#13 0x556a76a10f98 in do_command(THD*, bool) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_parse.cc:1416
|
#14 0x556a76f03a88 in do_handle_one_connection(CONNECT*, bool) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_connect.cc:1415
|
#15 0x556a76f035e7 in handle_one_connection /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_connect.cc:1327
|
#16 0x556a77baf983 in pfs_spawn_thread /data/bld/preview-11.8-bb-11.8-check-table-asan/storage/perfschema/pfs.cc:2198
|
#17 0x7f16d70a81c3 in start_thread nptl/pthread_create.c:442
|
#18 0x7f16d712885b in clone3 ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
|
0x62f000081646 is located 12870 bytes inside of 49168-byte region [0x62f00007e400,0x62f00008a410)
|
allocated by thread T18 here:
|
#0 0x7f16d7cb89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
|
#1 0x556a7893d431 in my_malloc /data/bld/preview-11.8-bb-11.8-check-table-asan/mysys/my_malloc.c:93
|
#2 0x556a7890f9f2 in root_alloc /data/bld/preview-11.8-bb-11.8-check-table-asan/mysys/my_alloc.c:66
|
#3 0x556a789113e2 in alloc_root /data/bld/preview-11.8-bb-11.8-check-table-asan/mysys/my_alloc.c:333
|
#4 0x556a78913709 in strmake_root /data/bld/preview-11.8-bb-11.8-check-table-asan/mysys/my_alloc.c:668
|
#5 0x556a767578fb in Query_arena::strmake(char const*, unsigned long) const /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_class.h:1287
|
#6 0x556a768c9382 in thd_strmake /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_class.cc:1211
|
#7 0x556a77e38ad4 in Lex_cstring::set_dup(THD const*, char const*, unsigned long) /share8t/bld/preview-11.8-bb-11.8-check-table-asan/sql/lex_string.h:136
|
#8 0x556a77e38b68 in Lex_cstring::set_dup(THD const*, char const*) /share8t/bld/preview-11.8-bb-11.8-check-table-asan/sql/lex_string.h:142
|
#9 0x556a77e1c258 in get_foreign_key_info /data/bld/preview-11.8-bb-11.8-check-table-asan/storage/innobase/handler/ha_innodb.cc:15533
|
#10 0x556a77e1cb76 in ha_innobase::get_parent_foreign_key_list(THD*, List<st_foreign_key_info>*) /data/bld/preview-11.8-bb-11.8-check-table-asan/storage/innobase/handler/ha_innodb.cc:15605
|
#11 0x556a7686d7bd in Check_table_prelocking_strategy::handle_table(THD*, Query_tables_list*, TABLE_LIST*, bool*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_base.cc:5205
|
#12 0x556a768664e5 in extend_table_list(THD*, TABLE_LIST*, Prelocking_strategy*, bool) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_base.cc:3930
|
#13 0x556a76867e3a in open_and_process_table /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_base.cc:4236
|
#14 0x556a7686a58d in open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_base.cc:4662
|
#15 0x556a7686ff6d in open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_base.cc:5681
|
#16 0x556a76f3b2b2 in open_and_lock_tables /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_base.h:286
|
#17 0x556a76f3d4cf in open_only_one_table /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:439
|
#18 0x556a76f3e867 in mysql_admin_table /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:654
|
#19 0x556a76f46f07 in Sql_cmd_check_table::execute(THD*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_admin.cc:1660
|
#20 0x556a76a30130 in mysql_execute_command(THD*, bool) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_parse.cc:5872
|
#21 0x556a76a3d14f 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
|
#22 0x556a76a14290 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
|
#23 0x556a76a10f98 in do_command(THD*, bool) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_parse.cc:1416
|
#24 0x556a76f03a88 in do_handle_one_connection(CONNECT*, bool) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_connect.cc:1415
|
#25 0x556a76f035e7 in handle_one_connection /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/sql_connect.cc:1327
|
#26 0x556a77baf983 in pfs_spawn_thread /data/bld/preview-11.8-bb-11.8-check-table-asan/storage/perfschema/pfs.cc:2198
|
#27 0x7f16d70a81c3 in start_thread nptl/pthread_create.c:442
|
|
Thread T18 created by T0 here:
|
#0 0x7f16d7c49726 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cpp:207
|
#1 0x556a77bab725 in my_thread_create /data/bld/preview-11.8-bb-11.8-check-table-asan/storage/perfschema/my_thread.h:38
|
#2 0x556a77bafd72 in pfs_spawn_thread_v1 /data/bld/preview-11.8-bb-11.8-check-table-asan/storage/perfschema/pfs.cc:2249
|
#3 0x556a7662caa0 in inline_mysql_thread_create /data/bld/preview-11.8-bb-11.8-check-table-asan/include/mysql/psi/mysql_thread.h:1139
|
#4 0x556a7664533f in create_thread_to_handle_connection(CONNECT*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/mysqld.cc:6266
|
#5 0x556a76645964 in create_new_thread(CONNECT*) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/mysqld.cc:6328
|
#6 0x556a76645c4f 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 0x556a766468d7 in handle_connections_sockets() /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/mysqld.cc:6502
|
#8 0x556a7664350a in run_main_loop /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/mysqld.cc:5744
|
#9 0x556a76644c0e in mysqld_main(int, char**) /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/mysqld.cc:6167
|
#10 0x556a7662bd68 in main /data/bld/preview-11.8-bb-11.8-check-table-asan/sql/main.cc:34
|
#11 0x7f16d7046249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
|
|
SUMMARY: AddressSanitizer: use-after-poison ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:799 in __interceptor_memset
|
Shadow bytes around the buggy address:
|
0x0c5e80008270: f7 07 f7 00 00 00 00 00 00 00 00 00 00 00 00 00
|
0x0c5e80008280: 00 00 00 00 00 00 00 f7 00 00 f7 00 02 f7 00 04
|
0x0c5e80008290: f7 03 f7 00 04 f7 03 f7 00 00 f7 00 00 f7 07 f7
|
0x0c5e800082a0: 07 f7 00 01 f7 07 f7 00 00 00 00 00 00 00 00 00
|
0x0c5e800082b0: 00 00 00 00 00 00 00 00 00 00 00 f7 00 00 f7 00
|
=>0x0c5e800082c0: 00 00 00 00 00 00 00 00[06]f7 f7 f7 f7 f7 f7 f7
|
0x0c5e800082d0: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
|
0x0c5e800082e0: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
|
0x0c5e800082f0: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
|
0x0c5e80008300: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
|
0x0c5e80008310: 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
|
==3937534==ABORTING
|
Attachments
Issue Links
- is caused by
-
MDEV-34309 CHECK TABLE should check that foreign key relations are correct
-
- In Testing
-
- relates to
-
MDEV-35733 ASAN errors in row_mysql_store_col_in_innobase_format / check_key_referential_integrity
-
- In Testing
-
-
MDEV-35734 ASAN errors in cmp_dtuple_rec_with_match_low / check_key_referential_integrity
-
- Closed
-
-
MDEV-35908 Unexpected error, crash, MSAN errors, assertion failures upon CHECK
-
- Stalled
-