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

ASAN errors upon update on versioned HEAP table with blob

    XMLWordPrintable

Details

    Description

      CREATE TABLE t (f TEXT) ENGINE=HEAP WITH SYSTEM VERSIONING;
      INSERT INTO t VALUES (REPEAT('x',64));
      UPDATE t SET f = 'foo';
       
      DROP TABLE t;
      

      942f74667bbc861112716f9566cdfa639c5ecfc1

      ==2166355==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x7f7636744860,0x7f7636744880) and [0x7f763674486f, 0x7f763674488f) overlap
          #0 0x7f7645047f4f in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:827
          #1 0x55ee10ca2aec in hp_write_run_data /data/bld/testing/pr-5409/storage/heap/hp_blob.c:291
          #2 0x55ee10ca3184 in hp_take_free_list_runs /data/bld/testing/pr-5409/storage/heap/hp_blob.c:354
          #3 0x55ee10ca3e12 in hp_write_one_blob /data/bld/testing/pr-5409/storage/heap/hp_blob.c:436
          #4 0x55ee10ca4b16 in hp_write_blobs /data/bld/testing/pr-5409/storage/heap/hp_blob.c:593
          #5 0x55ee10c9f0cb in heap_write /data/bld/testing/pr-5409/storage/heap/hp_write.c:59
          #6 0x55ee10c83b1b in ha_heap::write_row(unsigned char const*) /data/bld/testing/pr-5409/storage/heap/ha_heap.cc:298
          #7 0x55ee1024a3d7 in handler::ha_write_row(unsigned char const*) /data/bld/testing/pr-5409/sql/handler.cc:8521
          #8 0x55ee0f6f5b72 in vers_insert_history_row(TABLE*) /data/bld/testing/pr-5409/sql/sql_insert.cc:2051
          #9 0x55ee0fb580b9 in Sql_cmd_update::update_single_table(THD*) /data/bld/testing/pr-5409/sql/sql_update.cc:1130
          #10 0x55ee0fb5b249 in Sql_cmd_update::execute_inner(THD*) /data/bld/testing/pr-5409/sql/sql_update.cc:3322
          #11 0x55ee0f9181ec in Sql_cmd_dml::execute(THD*) /data/bld/testing/pr-5409/sql/sql_select.cc:35333
          #12 0x55ee0f7dd22e in mysql_execute_command(THD*, bool) /data/bld/testing/pr-5409/sql/sql_parse.cc:4453
          #13 0x55ee0f7e8b6a in mysql_parse(THD*, char*, unsigned int, Parser_state*) /data/bld/testing/pr-5409/sql/sql_parse.cc:8006
          #14 0x55ee0f7ec9d2 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /data/bld/testing/pr-5409/sql/sql_parse.cc:1904
          #15 0x55ee0f7f18a6 in do_command(THD*, bool) /data/bld/testing/pr-5409/sql/sql_parse.cc:1438
          #16 0x55ee0fcb9184 in do_handle_one_connection(CONNECT*, bool) /data/bld/testing/pr-5409/sql/sql_connect.cc:1503
          #17 0x55ee0fcb967b in handle_one_connection /data/bld/testing/pr-5409/sql/sql_connect.cc:1415
          #18 0x55ee109bccc2 in pfs_spawn_thread /data/bld/testing/pr-5409/storage/perfschema/pfs.cc:2198
          #19 0x7f76442a71f4 in start_thread nptl/pthread_create.c:442
          #20 0x7f76443278eb in clone3 ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
       
      0x7f7636744860 is located 96 bytes inside of 131072-byte region [0x7f7636744800,0x7f7636764800)
      allocated by thread T6 here:
          #0 0x7f76450b89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
          #1 0x55ee116502ae in my_malloc /data/bld/testing/pr-5409/mysys/my_malloc.c:93
          #2 0x55ee10ca222e in hp_get_new_block /data/bld/testing/pr-5409/storage/heap/hp_block.c:83
          #3 0x55ee10c9e1d7 in hp_alloc_from_tail /data/bld/testing/pr-5409/storage/heap/hp_write.c:206
          #4 0x55ee10c9ea93 in next_free_record_pos /data/bld/testing/pr-5409/storage/heap/hp_write.c:303
          #5 0x55ee10c9ebd9 in heap_write /data/bld/testing/pr-5409/storage/heap/hp_write.c:45
          #6 0x55ee10c83b1b in ha_heap::write_row(unsigned char const*) /data/bld/testing/pr-5409/storage/heap/ha_heap.cc:298
          #7 0x55ee1024a3d7 in handler::ha_write_row(unsigned char const*) /data/bld/testing/pr-5409/sql/handler.cc:8521
          #8 0x55ee0f6f6bad in Write_record::single_insert(unsigned long long*) /data/bld/testing/pr-5409/sql/sql_insert.cc:2389
          #9 0x55ee0f6f8c84 in Write_record::write_record() /data/bld/testing/pr-5409/sql/sql_insert.cc:2431
          #10 0x55ee0f71233e in mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool, select_result*) /data/bld/testing/pr-5409/sql/sql_insert.cc:1232
          #11 0x55ee0f7dda0c in mysql_execute_command(THD*, bool) /data/bld/testing/pr-5409/sql/sql_parse.cc:4509
          #12 0x55ee0f7e8b6a in mysql_parse(THD*, char*, unsigned int, Parser_state*) /data/bld/testing/pr-5409/sql/sql_parse.cc:8006
          #13 0x55ee0f7ec9d2 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /data/bld/testing/pr-5409/sql/sql_parse.cc:1904
          #14 0x55ee0f7f18a6 in do_command(THD*, bool) /data/bld/testing/pr-5409/sql/sql_parse.cc:1438
          #15 0x55ee0fcb9184 in do_handle_one_connection(CONNECT*, bool) /data/bld/testing/pr-5409/sql/sql_connect.cc:1503
          #16 0x55ee0fcb967b in handle_one_connection /data/bld/testing/pr-5409/sql/sql_connect.cc:1415
          #17 0x55ee109bccc2 in pfs_spawn_thread /data/bld/testing/pr-5409/storage/perfschema/pfs.cc:2198
          #18 0x7f76442a71f4 in start_thread nptl/pthread_create.c:442
       
      Thread T6 created by T0 here:
          #0 0x7f7645049726 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cpp:207
          #1 0x55ee109bcf30 in my_thread_create /data/bld/testing/pr-5409/storage/perfschema/my_thread.h:38
          #2 0x55ee109bcf30 in pfs_spawn_thread_v1 /data/bld/testing/pr-5409/storage/perfschema/pfs.cc:2249
          #3 0x55ee0f3bc6ad in inline_mysql_thread_create /data/bld/testing/pr-5409/include/mysql/psi/mysql_thread.h:1139
          #4 0x55ee0f3bc6ad in create_thread_to_handle_connection(CONNECT*) /data/bld/testing/pr-5409/sql/mysqld.cc:6542
          #5 0x55ee0f3ca937 in create_new_thread(CONNECT*) /data/bld/testing/pr-5409/sql/mysqld.cc:6604
          #6 0x55ee0f3cab06 in handle_accepted_socket(st_mysql_socket, st_mysql_socket) /data/bld/testing/pr-5409/sql/mysqld.cc:6666
          #7 0x55ee0f3cb513 in handle_connections_sockets() /data/bld/testing/pr-5409/sql/mysqld.cc:6778
          #8 0x55ee0f3cb936 in run_main_loop /data/bld/testing/pr-5409/sql/mysqld.cc:6007
          #9 0x55ee0f3ccea9 in mysqld_main(int, char**) /data/bld/testing/pr-5409/sql/mysqld.cc:6445
          #10 0x55ee0f3abd51 in main /data/bld/testing/pr-5409/sql/main.cc:34
          #11 0x7f7644245249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
       
      0x7f763674486f is located 111 bytes inside of 131072-byte region [0x7f7636744800,0x7f7636764800)
      allocated by thread T6 here:
          #0 0x7f76450b89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
          #1 0x55ee116502ae in my_malloc /data/bld/testing/pr-5409/mysys/my_malloc.c:93
          #2 0x55ee10ca222e in hp_get_new_block /data/bld/testing/pr-5409/storage/heap/hp_block.c:83
          #3 0x55ee10c9e1d7 in hp_alloc_from_tail /data/bld/testing/pr-5409/storage/heap/hp_write.c:206
          #4 0x55ee10c9ea93 in next_free_record_pos /data/bld/testing/pr-5409/storage/heap/hp_write.c:303
          #5 0x55ee10c9ebd9 in heap_write /data/bld/testing/pr-5409/storage/heap/hp_write.c:45
          #6 0x55ee10c83b1b in ha_heap::write_row(unsigned char const*) /data/bld/testing/pr-5409/storage/heap/ha_heap.cc:298
          #7 0x55ee1024a3d7 in handler::ha_write_row(unsigned char const*) /data/bld/testing/pr-5409/sql/handler.cc:8521
          #8 0x55ee0f6f6bad in Write_record::single_insert(unsigned long long*) /data/bld/testing/pr-5409/sql/sql_insert.cc:2389
          #9 0x55ee0f6f8c84 in Write_record::write_record() /data/bld/testing/pr-5409/sql/sql_insert.cc:2431
          #10 0x55ee0f71233e in mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool, select_result*) /data/bld/testing/pr-5409/sql/sql_insert.cc:1232
          #11 0x55ee0f7dda0c in mysql_execute_command(THD*, bool) /data/bld/testing/pr-5409/sql/sql_parse.cc:4509
          #12 0x55ee0f7e8b6a in mysql_parse(THD*, char*, unsigned int, Parser_state*) /data/bld/testing/pr-5409/sql/sql_parse.cc:8006
          #13 0x55ee0f7ec9d2 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /data/bld/testing/pr-5409/sql/sql_parse.cc:1904
          #14 0x55ee0f7f18a6 in do_command(THD*, bool) /data/bld/testing/pr-5409/sql/sql_parse.cc:1438
          #15 0x55ee0fcb9184 in do_handle_one_connection(CONNECT*, bool) /data/bld/testing/pr-5409/sql/sql_connect.cc:1503
          #16 0x55ee0fcb967b in handle_one_connection /data/bld/testing/pr-5409/sql/sql_connect.cc:1415
          #17 0x55ee109bccc2 in pfs_spawn_thread /data/bld/testing/pr-5409/storage/perfschema/pfs.cc:2198
          #18 0x7f76442a71f4 in start_thread nptl/pthread_create.c:442
      

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 4h 5m
                  4h 5m
                  Remaining:
                  Remaining Estimate - 4h 5m
                  4h 5m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                  Git Integration

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