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
-
- In Testing
-
- 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
-