Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-28169

ASAN errors LOAD DATA into table with unique virtual blob

    XMLWordPrintable

    Details

      Description

      All numerous bug reports of the same kind appear to be closed at the moment.

      --source include/have_innodb.inc
       
      CREATE TABLE t (
        pk INT PRIMARY KEY,
        a VARCHAR(8),
        b TEXT,
        vb TEXT AS (b) STORED,
        UNIQUE(a),
        UNIQUE(vb)
      ) ENGINE=InnoDB;
       
      INSERT INTO t (pk,a,b) VALUES (1,'foo','x');
      SELECT * INTO OUTFILE 'load.data' FROM t;
      UPDATE t SET b = 'qux';
      LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t;
       
      # Cleanup
      --let $datadir= `select @@datadir`
      --remove_file $datadir/test/load.data
      DROP TABLE t;
      

      10.4 c519aa3d

      ==3350734==ERROR: AddressSanitizer: heap-use-after-free on address 0x602000007858 at pc 0x7fb71c9d4983 bp 0x7fb705bb67b0 sp 0x7fb705bb5f60
      READ of size 1 at 0x602000007858 thread T27
          #0 0x7fb71c9d4982 in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:806
          #1 0x559150dcad1e in mem_heap_dup(mem_block_info_t*, void const*, unsigned long) /data/src/10.4/storage/innobase/include/mem0mem.h:242
          #2 0x559150dcad1e in dfield_dup /data/src/10.4/storage/innobase/include/data0data.inl:173
          #3 0x559150dcad1e in row_upd_index_replace_new_col_val /data/src/10.4/storage/innobase/row/row0upd.cc:1220
          #4 0x559150dd0d9e in row_upd_index_replace_new_col_vals_index_pos(dtuple_t*, dict_index_t const*, upd_t const*, mem_block_info_t*) /data/src/10.4/storage/innobase/row/row0upd.cc:1345
          #5 0x559150efb67e in btr_cur_optimistic_update(unsigned long, btr_cur_t*, unsigned short**, mem_block_info_t**, upd_t const*, unsigned long, que_thr_t*, unsigned long, mtr_t*) /data/src/10.4/storage/innobase/btr/btr0cur.cc:4650
          #6 0x559150d1a830 in row_ins_clust_index_entry_by_modify /data/src/10.4/storage/innobase/row/row0ins.cc:320
          #7 0x559150d1a830 in row_ins_clust_index_entry_low(unsigned long, unsigned long, dict_index_t*, unsigned long, dtuple_t*, unsigned long, que_thr_t*) /data/src/10.4/storage/innobase/row/row0ins.cc:2723
          #8 0x559150d2b1a6 in row_ins_clust_index_entry(dict_index_t*, dtuple_t*, que_thr_t*, unsigned long) /data/src/10.4/storage/innobase/row/row0ins.cc:3217
          #9 0x559150d2d1ee in row_ins_index_entry /data/src/10.4/storage/innobase/row/row0ins.cc:3343
          #10 0x559150d2d1ee in row_ins_index_entry_step /data/src/10.4/storage/innobase/row/row0ins.cc:3512
          #11 0x559150d2d1ee in row_ins /data/src/10.4/storage/innobase/row/row0ins.cc:3671
          #12 0x559150d2d1ee in row_ins_step(que_thr_t*) /data/src/10.4/storage/innobase/row/row0ins.cc:3821
          #13 0x559150d5fd8e in row_insert_for_mysql(unsigned char const*, row_prebuilt_t*, ins_mode_t) /data/src/10.4/storage/innobase/row/row0mysql.cc:1401
          #14 0x559150b21301 in ha_innobase::write_row(unsigned char const*) /data/src/10.4/storage/innobase/handler/ha_innodb.cc:8123
          #15 0x559150210581 in handler::ha_write_row(unsigned char const*) /data/src/10.4/sql/handler.cc:6774
          #16 0x55914fa85124 in write_record(THD*, TABLE*, st_copy_info*) /data/src/10.4/sql/sql_insert.cc:1747
          #17 0x55914fb23c7d in read_sep_field /data/src/10.4/sql/sql_load.cc:1164
          #18 0x55914fb23c7d in mysql_load(THD*, sql_exchange const*, TABLE_LIST*, List<Item>&, List<Item>&, List<Item>&, enum_duplicates, bool, bool) /data/src/10.4/sql/sql_load.cc:669
          #19 0x55914fb4e05e in mysql_execute_command(THD*) /data/src/10.4/sql/sql_parse.cc:5024
          #20 0x55914fb5a7ae in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.4/sql/sql_parse.cc:8011
          #21 0x55914fb6172a in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.4/sql/sql_parse.cc:1873
          #22 0x55914fb663b8 in do_command(THD*) /data/src/10.4/sql/sql_parse.cc:1378
          #23 0x55914feb3568 in do_handle_one_connection(CONNECT*) /data/src/10.4/sql/sql_connect.cc:1420
          #24 0x55914feb3a2a in handle_one_connection /data/src/10.4/sql/sql_connect.cc:1316
          #25 0x559150a14b14 in pfs_spawn_thread /data/src/10.4/storage/perfschema/pfs.cc:1869
          #26 0x7fb71c4d5ea6 in start_thread nptl/pthread_create.c:477
          #27 0x7fb71c0d2dee in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xfddee)
       
      0x602000007858 is located 8 bytes inside of 16-byte region [0x602000007850,0x602000007860)
      freed by thread T27 here:
          #0 0x7fb71ca44b6f in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:123
          #1 0x559150196ac8 in Binary_string::free() /data/src/10.4/sql/sql_string.h:610
          #2 0x559150196ac8 in Binary_string::set(char const*, unsigned long) /data/src/10.4/sql/sql_string.h:467
          #3 0x559150196ac8 in String::set(char const*, unsigned long, charset_info_st const*) /data/src/10.4/sql/sql_string.h:769
          #4 0x559150196ac8 in Field_blob::val_str(String*, String*) /data/src/10.4/sql/field.cc:8587
          #5 0x5591501c6ab8 in Field::val_str(String*) /data/src/10.4/sql/field.h:857
          #6 0x5591501c6ab8 in Field_blob::store_field(Field*) /data/src/10.4/sql/field.h:3942
          #7 0x55915023a827 in save_field_in_field /data/src/10.4/sql/item.cc:6548
          #8 0x55915023a827 in save_field_in_field /data/src/10.4/sql/item.cc:6526
          #9 0x55915023a827 in Item_field::save_in_field(Field*, bool) /data/src/10.4/sql/item.cc:6599
          #10 0x5591502336a2 in Item_field::update_vcol_processor(void*) /data/src/10.4/sql/item.cc:944
          #11 0x5591502336a2 in Item_field::update_vcol_processor(void*) /data/src/10.4/sql/item.cc:937
          #12 0x55914f8feb64 in Item::walk(bool (Item::*)(void*), bool, void*) /data/src/10.4/sql/item.h:1865
          #13 0x55914fa55ab8 in Item_args::walk_args(bool (Item::*)(void*), bool, void*) /data/src/10.4/sql/item.h:2579
          #14 0x55914fa55ab8 in Item_func_or_sum::walk(bool (Item::*)(void*), bool, void*) /data/src/10.4/sql/item.h:5263
          #15 0x55914fe2899a in TABLE::update_virtual_field(Field*) /data/src/10.4/sql/table.cc:8463
          #16 0x559150b0f4bf in innobase_get_computed_value(dtuple_t*, dict_v_col_t const*, dict_index_t const*, mem_block_info_t**, mem_block_info_t*, dict_field_t const*, THD*, TABLE*, unsigned char*, dict_table_t const*, upd_t const*) /data/src/10.4/storage/innobase/handler/ha_innodb.cc:20873
          #17 0x559150dd42bd in row_upd_store_v_row /data/src/10.4/storage/innobase/row/row0upd.cc:2161
          #18 0x559150dd42bd in row_upd_store_row /data/src/10.4/storage/innobase/row/row0upd.cc:2230
          #19 0x559150dd7fb4 in row_upd_del_mark_clust_rec /data/src/10.4/storage/innobase/row/row0upd.cc:3002
          #20 0x559150dd7fb4 in row_upd_clust_step /data/src/10.4/storage/innobase/row/row0upd.cc:3176
          #21 0x559150ddd455 in row_upd /data/src/10.4/storage/innobase/row/row0upd.cc:3298
          #22 0x559150ddd455 in row_upd_step(que_thr_t*) /data/src/10.4/storage/innobase/row/row0upd.cc:3442
          #23 0x559150d5e40a in row_update_for_mysql(row_prebuilt_t*) /data/src/10.4/storage/innobase/row/row0mysql.cc:1809
          #24 0x559150b13e1d in ha_innobase::delete_row(unsigned char const*) /data/src/10.4/storage/innobase/handler/ha_innodb.cc:9024
          #25 0x5591502120e1 in handler::ha_delete_row(unsigned char const*) /data/src/10.4/sql/handler.cc:6897
          #26 0x55914fa85b09 in write_record(THD*, TABLE*, st_copy_info*) /data/src/10.4/sql/sql_insert.cc:2023
          #27 0x55914fb23c7d in read_sep_field /data/src/10.4/sql/sql_load.cc:1164
          #28 0x55914fb23c7d in mysql_load(THD*, sql_exchange const*, TABLE_LIST*, List<Item>&, List<Item>&, List<Item>&, enum_duplicates, bool, bool) /data/src/10.4/sql/sql_load.cc:669
          #29 0x55914fb4e05e in mysql_execute_command(THD*) /data/src/10.4/sql/sql_parse.cc:5024
          #30 0x55914fb5a7ae in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.4/sql/sql_parse.cc:8011
          #31 0x55914fb6172a in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.4/sql/sql_parse.cc:1873
          #32 0x55914fb663b8 in do_command(THD*) /data/src/10.4/sql/sql_parse.cc:1378
          #33 0x55914feb3568 in do_handle_one_connection(CONNECT*) /data/src/10.4/sql/sql_connect.cc:1420
          #34 0x55914feb3a2a in handle_one_connection /data/src/10.4/sql/sql_connect.cc:1316
          #35 0x559150a14b14 in pfs_spawn_thread /data/src/10.4/storage/perfschema/pfs.cc:1869
          #36 0x7fb71c4d5ea6 in start_thread nptl/pthread_create.c:477
       
      previously allocated by thread T27 here:
          #0 0x7fb71ca44e8f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
          #1 0x559151292b52 in my_malloc /data/src/10.4/mysys/my_malloc.c:101
          #2 0x55914fd379cc in Binary_string::realloc_raw(unsigned long) /data/src/10.4/sql/sql_string.cc:101
          #3 0x55914fd379cc in Binary_string::realloc_raw(unsigned long) /data/src/10.4/sql/sql_string.cc:84
          #4 0x55914fd381a7 in Binary_string::realloc(unsigned long) /data/src/10.4/sql/sql_string.h:625
          #5 0x55914fd381a7 in Binary_string::copy() /data/src/10.4/sql/sql_string.cc:220
          #6 0x5591501c6c54 in String::copy() /data/src/10.4/sql/sql_string.h:823
          #7 0x5591501c6c54 in Field_blob::store_field(Field*) /data/src/10.4/sql/field.h:3945
          #8 0x55915023a827 in save_field_in_field /data/src/10.4/sql/item.cc:6548
          #9 0x55915023a827 in save_field_in_field /data/src/10.4/sql/item.cc:6526
          #10 0x55915023a827 in Item_field::save_in_field(Field*, bool) /data/src/10.4/sql/item.cc:6599
          #11 0x55914fe27d4b in TABLE::update_virtual_fields(handler*, enum_vcol_update_mode) /data/src/10.4/sql/table.cc:8427
          #12 0x55914fa063a3 in fill_record(THD*, TABLE*, List<Item>&, List<Item>&, bool, bool) /data/src/10.4/sql/sql_base.cc:8628
          #13 0x55914fa06da9 in fill_record_n_invoke_before_triggers(THD*, TABLE*, List<Item>&, List<Item>&, bool, trg_event_type) /data/src/10.4/sql/sql_base.cc:8756
          #14 0x55914fb23b88 in read_sep_field /data/src/10.4/sql/sql_load.cc:1149
          #15 0x55914fb23b88 in mysql_load(THD*, sql_exchange const*, TABLE_LIST*, List<Item>&, List<Item>&, List<Item>&, enum_duplicates, bool, bool) /data/src/10.4/sql/sql_load.cc:669
          #16 0x55914fb4e05e in mysql_execute_command(THD*) /data/src/10.4/sql/sql_parse.cc:5024
          #17 0x55914fb5a7ae in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.4/sql/sql_parse.cc:8011
          #18 0x55914fb6172a in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.4/sql/sql_parse.cc:1873
          #19 0x55914fb663b8 in do_command(THD*) /data/src/10.4/sql/sql_parse.cc:1378
          #20 0x55914feb3568 in do_handle_one_connection(CONNECT*) /data/src/10.4/sql/sql_connect.cc:1420
          #21 0x55914feb3a2a in handle_one_connection /data/src/10.4/sql/sql_connect.cc:1316
          #22 0x559150a14b14 in pfs_spawn_thread /data/src/10.4/storage/perfschema/pfs.cc:1869
          #23 0x7fb71c4d5ea6 in start_thread nptl/pthread_create.c:477
       
      Thread T27 created by T0 here:
          #0 0x7fb71c9f02a2 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cpp:214
          #1 0x559150a1916a in spawn_thread_v1 /data/src/10.4/storage/perfschema/pfs.cc:1919
          #2 0x55914f8d0fcb in inline_mysql_thread_create /data/src/10.4/include/mysql/psi/mysql_thread.h:1275
          #3 0x55914f8d0fcb in create_thread_to_handle_connection(CONNECT*) /data/src/10.4/sql/mysqld.cc:6249
          #4 0x55914f8dd1ef in create_new_thread(CONNECT*) /data/src/10.4/sql/mysqld.cc:6319
          #5 0x55914f8dd82a in handle_accepted_socket(st_mysql_socket, st_mysql_socket) /data/src/10.4/sql/mysqld.cc:6417
          #6 0x55914f8de939 in handle_connections_sockets() /data/src/10.4/sql/mysqld.cc:6575
          #7 0x55914f8e0380 in mysqld_main(int, char**) /data/src/10.4/sql/mysqld.cc:5907
          #8 0x7fb71bffbd09 in __libc_start_main ../csu/libc-start.c:308
       
      SUMMARY: AddressSanitizer: heap-use-after-free ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:806 in __interceptor_memcpy
      Shadow bytes around the buggy address:
        0x0c047fff8eb0: fa fa fd fa fa fa fd fa fa fa fd fd fa fa fd fa
        0x0c047fff8ec0: fa fa fd fa fa fa fd fa fa fa fd fd fa fa fd fa
        0x0c047fff8ed0: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
        0x0c047fff8ee0: fa fa 00 00 fa fa 00 00 fa fa fd fa fa fa fd fa
        0x0c047fff8ef0: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fa
      =>0x0c047fff8f00: fa fa fd fa fa fa fd fd fa fa fd[fd]fa fa 00 00
        0x0c047fff8f10: fa fa fd fd fa fa 00 00 fa fa fa fa fa fa fa fa
        0x0c047fff8f20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
        0x0c047fff8f30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
        0x0c047fff8f40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
        0x0c047fff8f50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
      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
      ==3350734==ABORTING
      

      Almost the same test case, which differs from the previous one only in the literal used by UPDATE, causes a different stack trace:

      --source include/have_innodb.inc
       
      CREATE TABLE t (
        pk INT PRIMARY KEY,
        a VARCHAR(8),
        b TEXT,
        vb TEXT AS (b) STORED,
        UNIQUE(a),
        UNIQUE(vb)
      ) ENGINE=InnoDB;
       
      INSERT INTO t (pk,a,b) VALUES (1,'foo','x');
      SELECT * INTO OUTFILE 'load.data' FROM t;
      UPDATE t SET b = 'f';
      LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t;
       
      # Cleanup
      --let $datadir= `select @@datadir`
      --remove_file $datadir/test/load.data
      DROP TABLE t;
      

      ==3352338==ERROR: AddressSanitizer: heap-use-after-free on address 0x602000007858 at pc 0x7f917708b039 bp 0x7f9160216510 sp 0x7f9160215cc0
      READ of size 1 at 0x602000007858 thread T27
          #0 0x7f917708b038 in MemcmpInterceptorCommon(void*, int (*)(void const*, void const*, unsigned long), void const*, void const*, unsigned long) ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:839
          #1 0x7f917708b648 in __interceptor_memcmp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:871
          #2 0x7f917708b648 in __interceptor_memcmp ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:866
          #3 0x55c6ec6d8927 in dfield_data_is_binary_equal /data/src/10.4/storage/innobase/include/data0data.inl:220
          #4 0x55c6ec6d8927 in row_upd_build_difference_binary(dict_index_t*, dtuple_t const*, unsigned char const*, unsigned short const*, bool, trx_t*, mem_block_info_t*, TABLE*, dberr_t*) /data/src/10.4/storage/innobase/row/row0upd.cc:1029
          #5 0x55c6ec62375a in row_ins_clust_index_entry_by_modify /data/src/10.4/storage/innobase/row/row0ins.cc:306
          #6 0x55c6ec62375a in row_ins_clust_index_entry_low(unsigned long, unsigned long, dict_index_t*, unsigned long, dtuple_t*, unsigned long, que_thr_t*) /data/src/10.4/storage/innobase/row/row0ins.cc:2723
          #7 0x55c6ec6341a6 in row_ins_clust_index_entry(dict_index_t*, dtuple_t*, que_thr_t*, unsigned long) /data/src/10.4/storage/innobase/row/row0ins.cc:3217
          #8 0x55c6ec6361ee in row_ins_index_entry /data/src/10.4/storage/innobase/row/row0ins.cc:3343
          #9 0x55c6ec6361ee in row_ins_index_entry_step /data/src/10.4/storage/innobase/row/row0ins.cc:3512
          #10 0x55c6ec6361ee in row_ins /data/src/10.4/storage/innobase/row/row0ins.cc:3671
          #11 0x55c6ec6361ee in row_ins_step(que_thr_t*) /data/src/10.4/storage/innobase/row/row0ins.cc:3821
          #12 0x55c6ec668d8e in row_insert_for_mysql(unsigned char const*, row_prebuilt_t*, ins_mode_t) /data/src/10.4/storage/innobase/row/row0mysql.cc:1401
          #13 0x55c6ec42a301 in ha_innobase::write_row(unsigned char const*) /data/src/10.4/storage/innobase/handler/ha_innodb.cc:8123
          #14 0x55c6ebb19581 in handler::ha_write_row(unsigned char const*) /data/src/10.4/sql/handler.cc:6774
          #15 0x55c6eb38e124 in write_record(THD*, TABLE*, st_copy_info*) /data/src/10.4/sql/sql_insert.cc:1747
          #16 0x55c6eb42cc7d in read_sep_field /data/src/10.4/sql/sql_load.cc:1164
          #17 0x55c6eb42cc7d in mysql_load(THD*, sql_exchange const*, TABLE_LIST*, List<Item>&, List<Item>&, List<Item>&, enum_duplicates, bool, bool) /data/src/10.4/sql/sql_load.cc:669
          #18 0x55c6eb45705e in mysql_execute_command(THD*) /data/src/10.4/sql/sql_parse.cc:5024
          #19 0x55c6eb4637ae in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.4/sql/sql_parse.cc:8011
          #20 0x55c6eb46a72a in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.4/sql/sql_parse.cc:1873
          #21 0x55c6eb46f3b8 in do_command(THD*) /data/src/10.4/sql/sql_parse.cc:1378
          #22 0x55c6eb7bc568 in do_handle_one_connection(CONNECT*) /data/src/10.4/sql/sql_connect.cc:1420
          #23 0x55c6eb7bca2a in handle_one_connection /data/src/10.4/sql/sql_connect.cc:1316
          #24 0x55c6ec31db14 in pfs_spawn_thread /data/src/10.4/storage/perfschema/pfs.cc:1869
          #25 0x7f9176b3aea6 in start_thread nptl/pthread_create.c:477
          #26 0x7f9176737dee in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xfddee)
       
      0x602000007858 is located 8 bytes inside of 16-byte region [0x602000007850,0x602000007860)
      freed by thread T27 here:
          #0 0x7f91770a9b6f in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:123
          #1 0x55c6eba9fac8 in Binary_string::free() /data/src/10.4/sql/sql_string.h:610
          #2 0x55c6eba9fac8 in Binary_string::set(char const*, unsigned long) /data/src/10.4/sql/sql_string.h:467
          #3 0x55c6eba9fac8 in String::set(char const*, unsigned long, charset_info_st const*) /data/src/10.4/sql/sql_string.h:769
          #4 0x55c6eba9fac8 in Field_blob::val_str(String*, String*) /data/src/10.4/sql/field.cc:8587
          #5 0x55c6ebacfab8 in Field::val_str(String*) /data/src/10.4/sql/field.h:857
          #6 0x55c6ebacfab8 in Field_blob::store_field(Field*) /data/src/10.4/sql/field.h:3942
          #7 0x55c6ebb43827 in save_field_in_field /data/src/10.4/sql/item.cc:6548
          #8 0x55c6ebb43827 in save_field_in_field /data/src/10.4/sql/item.cc:6526
          #9 0x55c6ebb43827 in Item_field::save_in_field(Field*, bool) /data/src/10.4/sql/item.cc:6599
          #10 0x55c6ebb3c6a2 in Item_field::update_vcol_processor(void*) /data/src/10.4/sql/item.cc:944
          #11 0x55c6ebb3c6a2 in Item_field::update_vcol_processor(void*) /data/src/10.4/sql/item.cc:937
          #12 0x55c6eb207b64 in Item::walk(bool (Item::*)(void*), bool, void*) /data/src/10.4/sql/item.h:1865
          #13 0x55c6eb35eab8 in Item_args::walk_args(bool (Item::*)(void*), bool, void*) /data/src/10.4/sql/item.h:2579
          #14 0x55c6eb35eab8 in Item_func_or_sum::walk(bool (Item::*)(void*), bool, void*) /data/src/10.4/sql/item.h:5263
          #15 0x55c6eb73199a in TABLE::update_virtual_field(Field*) /data/src/10.4/sql/table.cc:8463
          #16 0x55c6ec4184bf in innobase_get_computed_value(dtuple_t*, dict_v_col_t const*, dict_index_t const*, mem_block_info_t**, mem_block_info_t*, dict_field_t const*, THD*, TABLE*, unsigned char*, dict_table_t const*, upd_t const*) /data/src/10.4/storage/innobase/handler/ha_innodb.cc:20873
          #17 0x55c6ec6dd2bd in row_upd_store_v_row /data/src/10.4/storage/innobase/row/row0upd.cc:2161
          #18 0x55c6ec6dd2bd in row_upd_store_row /data/src/10.4/storage/innobase/row/row0upd.cc:2230
          #19 0x55c6ec6e0fb4 in row_upd_del_mark_clust_rec /data/src/10.4/storage/innobase/row/row0upd.cc:3002
          #20 0x55c6ec6e0fb4 in row_upd_clust_step /data/src/10.4/storage/innobase/row/row0upd.cc:3176
          #21 0x55c6ec6e6455 in row_upd /data/src/10.4/storage/innobase/row/row0upd.cc:3298
          #22 0x55c6ec6e6455 in row_upd_step(que_thr_t*) /data/src/10.4/storage/innobase/row/row0upd.cc:3442
          #23 0x55c6ec66740a in row_update_for_mysql(row_prebuilt_t*) /data/src/10.4/storage/innobase/row/row0mysql.cc:1809
          #24 0x55c6ec41ce1d in ha_innobase::delete_row(unsigned char const*) /data/src/10.4/storage/innobase/handler/ha_innodb.cc:9024
          #25 0x55c6ebb1b0e1 in handler::ha_delete_row(unsigned char const*) /data/src/10.4/sql/handler.cc:6897
          #26 0x55c6eb38eb09 in write_record(THD*, TABLE*, st_copy_info*) /data/src/10.4/sql/sql_insert.cc:2023
          #27 0x55c6eb42cc7d in read_sep_field /data/src/10.4/sql/sql_load.cc:1164
          #28 0x55c6eb42cc7d in mysql_load(THD*, sql_exchange const*, TABLE_LIST*, List<Item>&, List<Item>&, List<Item>&, enum_duplicates, bool, bool) /data/src/10.4/sql/sql_load.cc:669
          #29 0x55c6eb45705e in mysql_execute_command(THD*) /data/src/10.4/sql/sql_parse.cc:5024
          #30 0x55c6eb4637ae in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.4/sql/sql_parse.cc:8011
          #31 0x55c6eb46a72a in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.4/sql/sql_parse.cc:1873
          #32 0x55c6eb46f3b8 in do_command(THD*) /data/src/10.4/sql/sql_parse.cc:1378
          #33 0x55c6eb7bc568 in do_handle_one_connection(CONNECT*) /data/src/10.4/sql/sql_connect.cc:1420
          #34 0x55c6eb7bca2a in handle_one_connection /data/src/10.4/sql/sql_connect.cc:1316
          #35 0x55c6ec31db14 in pfs_spawn_thread /data/src/10.4/storage/perfschema/pfs.cc:1869
          #36 0x7f9176b3aea6 in start_thread nptl/pthread_create.c:477
       
      previously allocated by thread T27 here:
          #0 0x7f91770a9e8f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
          #1 0x55c6ecb9bb52 in my_malloc /data/src/10.4/mysys/my_malloc.c:101
          #2 0x55c6eb6409cc in Binary_string::realloc_raw(unsigned long) /data/src/10.4/sql/sql_string.cc:101
          #3 0x55c6eb6409cc in Binary_string::realloc_raw(unsigned long) /data/src/10.4/sql/sql_string.cc:84
          #4 0x55c6eb6411a7 in Binary_string::realloc(unsigned long) /data/src/10.4/sql/sql_string.h:625
          #5 0x55c6eb6411a7 in Binary_string::copy() /data/src/10.4/sql/sql_string.cc:220
          #6 0x55c6ebacfc54 in String::copy() /data/src/10.4/sql/sql_string.h:823
          #7 0x55c6ebacfc54 in Field_blob::store_field(Field*) /data/src/10.4/sql/field.h:3945
          #8 0x55c6ebb43827 in save_field_in_field /data/src/10.4/sql/item.cc:6548
          #9 0x55c6ebb43827 in save_field_in_field /data/src/10.4/sql/item.cc:6526
          #10 0x55c6ebb43827 in Item_field::save_in_field(Field*, bool) /data/src/10.4/sql/item.cc:6599
          #11 0x55c6eb730d4b in TABLE::update_virtual_fields(handler*, enum_vcol_update_mode) /data/src/10.4/sql/table.cc:8427
          #12 0x55c6eb30f3a3 in fill_record(THD*, TABLE*, List<Item>&, List<Item>&, bool, bool) /data/src/10.4/sql/sql_base.cc:8628
          #13 0x55c6eb30fda9 in fill_record_n_invoke_before_triggers(THD*, TABLE*, List<Item>&, List<Item>&, bool, trg_event_type) /data/src/10.4/sql/sql_base.cc:8756
          #14 0x55c6eb42cb88 in read_sep_field /data/src/10.4/sql/sql_load.cc:1149
          #15 0x55c6eb42cb88 in mysql_load(THD*, sql_exchange const*, TABLE_LIST*, List<Item>&, List<Item>&, List<Item>&, enum_duplicates, bool, bool) /data/src/10.4/sql/sql_load.cc:669
          #16 0x55c6eb45705e in mysql_execute_command(THD*) /data/src/10.4/sql/sql_parse.cc:5024
          #17 0x55c6eb4637ae in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.4/sql/sql_parse.cc:8011
          #18 0x55c6eb46a72a in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.4/sql/sql_parse.cc:1873
          #19 0x55c6eb46f3b8 in do_command(THD*) /data/src/10.4/sql/sql_parse.cc:1378
          #20 0x55c6eb7bc568 in do_handle_one_connection(CONNECT*) /data/src/10.4/sql/sql_connect.cc:1420
          #21 0x55c6eb7bca2a in handle_one_connection /data/src/10.4/sql/sql_connect.cc:1316
          #22 0x55c6ec31db14 in pfs_spawn_thread /data/src/10.4/storage/perfschema/pfs.cc:1869
          #23 0x7f9176b3aea6 in start_thread nptl/pthread_create.c:477
       
      Thread T27 created by T0 here:
          #0 0x7f91770552a2 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cpp:214
          #1 0x55c6ec32216a in spawn_thread_v1 /data/src/10.4/storage/perfschema/pfs.cc:1919
          #2 0x55c6eb1d9fcb in inline_mysql_thread_create /data/src/10.4/include/mysql/psi/mysql_thread.h:1275
          #3 0x55c6eb1d9fcb in create_thread_to_handle_connection(CONNECT*) /data/src/10.4/sql/mysqld.cc:6249
          #4 0x55c6eb1e61ef in create_new_thread(CONNECT*) /data/src/10.4/sql/mysqld.cc:6319
          #5 0x55c6eb1e682a in handle_accepted_socket(st_mysql_socket, st_mysql_socket) /data/src/10.4/sql/mysqld.cc:6417
          #6 0x55c6eb1e7939 in handle_connections_sockets() /data/src/10.4/sql/mysqld.cc:6575
          #7 0x55c6eb1e9380 in mysqld_main(int, char**) /data/src/10.4/sql/mysqld.cc:5907
          #8 0x7f9176660d09 in __libc_start_main ../csu/libc-start.c:308
       
      SUMMARY: AddressSanitizer: heap-use-after-free ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:839 in MemcmpInterceptorCommon(void*, int (*)(void const*, void const*, unsigned long), void const*, void const*, unsigned long)
      Shadow bytes around the buggy address:
        0x0c047fff8eb0: fa fa fd fa fa fa fd fa fa fa fd fd fa fa fd fa
        0x0c047fff8ec0: fa fa fd fa fa fa fd fa fa fa fd fd fa fa fd fa
        0x0c047fff8ed0: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
        0x0c047fff8ee0: fa fa 00 00 fa fa 00 00 fa fa fd fa fa fa fd fa
        0x0c047fff8ef0: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fa
      =>0x0c047fff8f00: fa fa fd fa fa fa fd fd fa fa fd[fd]fa fa 00 00
        0x0c047fff8f10: fa fa 00 00 fa fa fa fa fa fa fa fa fa fa fa fa
        0x0c047fff8f20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
        0x0c047fff8f30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
        0x0c047fff8f40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
        0x0c047fff8f50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
      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
      ==3352338==ABORTING
      

        Attachments

          Activity

            People

            Assignee:
            nikitamalyavin Nikita Malyavin
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.