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

Server crash, hang or ASAN heap-use-after-free in simple_key_cache_read or simple_key_cache_write, unitialized mutex at mf_keycache.c

    XMLWordPrintable

Details

    Description

      Note: The test case is non-deterministic, run with --repeat=N. It usually fails for me one or another way in a few attempts, but it can vary on different machines and builds.

      SET @segments.save= @@key_cache_segments;
      SET @buffer.save= @@key_buffer_size;
      SET GLOBAL key_buffer_size= 128*1024*1024;
       
      CREATE TABLE t1 (a INT, KEY(a)) ENGINE=MyISAM;
      INSERT INTO t1 VALUES (1),(5),(9),(6);
       
      --connect (con1,localhost,root,,test)
      --send
        SET GLOBAL key_cache_segments= 40;
       
      --connection default
      INSERT INTO t1 VALUES (1),(5),(3),(5);
       
      --connection con1
      --reap
       
      # Cleanup
      --disconnect con1
      --connection default
      DROP TABLE t1;
      SET GLOBAL key_cache_segments= @segments.save;
      SET GLOBAL key_buffer_size= @buffer.save;
      

      10.5 92014bd1

      #3  <signal handler called>
      #4  0x0000558f9b268ad0 in pfs_start_mutex_wait_v1 (state=0x7f306c354250, mutex=0x8f8f8f8f8f8f8f8f, op=PSI_MUTEX_LOCK, src_file=0x558f9bdb05f0 "/data/src/10.5/mysys/mf_keycache.c", src_line=2966) at /data/src/10.5/storage/perfschema/pfs.cc:2617
      #5  0x0000558f9b7ffe52 in inline_mysql_mutex_lock (that=0x558f9d62b7b8, src_file=0x558f9bdb05f0 "/data/src/10.5/mysys/mf_keycache.c", src_line=2966) at /data/src/10.5/include/mysql/psi/mysql_thread.h:743
      #6  0x0000558f9b8062cf in simple_key_cache_read (keycache=0x558f9d62b6f8, file=54, filepos=1024, level=3, buff=0x7f306c3543f0 "", length=1024, block_length=1024, return_buffer=0) at /data/src/10.5/mysys/mf_keycache.c:2966
      #7  0x0000558f9b80b06b in key_cache_read (keycache=0x558f9d5e9938, file=54, filepos=1024, level=3, buff=0x7f306c3543f0 "", length=1024, block_length=1024, return_buffer=0) at /data/src/10.5/mysys/mf_keycache.c:6244
      #8  0x0000558f9b7c58fa in _mi_fetch_keypage (info=0x7f305c008628, keyinfo=0x7f305c0fb4f0, page=1024, level=3, buff=0x7f306c3543f0 "", return_buffer=0) at /data/src/10.5/storage/myisam/mi_page.c:32
      #9  0x0000558f9b7d1f1f in w_search (info=0x7f305c008628, keyinfo=0x7f305c0fb4f0, comp_flag=4, key=0x7f305c009286 "\001", key_length=5, page=1024, father_buff=0x0, father_keypos=0x0, father_page=0, insert_last=1 '\001') at /data/src/10.5/storage/myisam/mi_write.c:356
      #10 0x0000558f9b7d1b42 in _mi_ck_real_write_btree (info=0x7f305c008628, keyinfo=0x7f305c0fb4f0, key=0x7f305c009286 "\001", key_length=5, root=0x7f305c0fb680, comp_flag=4) at /data/src/10.5/storage/myisam/mi_write.c:298
      #11 0x0000558f9b7d1a56 in _mi_ck_write_btree (info=0x7f305c008628, keynr=0, key=0x7f305c009286 "\001", key_length=5) at /data/src/10.5/storage/myisam/mi_write.c:279
      #12 0x0000558f9b7d1951 in _mi_ck_write (info=0x7f305c008628, keynr=0, key=0x7f305c009286 "\001", key_length=5) at /data/src/10.5/storage/myisam/mi_write.c:250
      #13 0x0000558f9b7d12ab in mi_write (info=0x7f305c008628, record=0x7f305c0fa258 "\375\001") at /data/src/10.5/storage/myisam/mi_write.c:125
      #14 0x0000558f9b78c1b7 in ha_myisam::write_row (this=0x7f305c0fa6c0, buf=0x7f305c0fa258 "\375\001") at /data/src/10.5/storage/myisam/ha_myisam.cc:950
      #15 0x0000558f9aef74fd in handler::ha_write_row (this=0x7f305c0fa6c0, buf=0x7f305c0fa258 "\375\001") at /data/src/10.5/sql/handler.cc:7133
      #16 0x0000558f9ab3f200 in write_record (thd=0x7f305c000b18, table=0x7f305c0f9dc8, info=0x7f306c355bf0, sink=0x0) at /data/src/10.5/sql/sql_insert.cc:2094
      #17 0x0000558f9ab3c062 in mysql_insert (thd=0x7f305c000b18, table_list=0x7f305c0139c8, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false, result=0x0) at /data/src/10.5/sql/sql_insert.cc:1087
      #18 0x0000558f9ab8db24 in mysql_execute_command (thd=0x7f305c000b18) at /data/src/10.5/sql/sql_parse.cc:4545
      #19 0x0000558f9ab99629 in mysql_parse (thd=0x7f305c000b18, rawbuf=0x7f305c0138d0 "INSERT INTO t1 VALUES (1),(5),(3),(5)", length=37, parser_state=0x7f306c356520, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7993
      #20 0x0000558f9ab85922 in dispatch_command (command=COM_QUERY, thd=0x7f305c000b18, packet=0x7f305c1af129 "INSERT INTO t1 VALUES (1),(5),(3),(5)", packet_length=37, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1867
      #21 0x0000558f9ab8405a in do_command (thd=0x7f305c000b18) at /data/src/10.5/sql/sql_parse.cc:1348
      #22 0x0000558f9ad2990b in do_handle_one_connection (connect=0x558f9da961b8, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1411
      #23 0x0000558f9ad29673 in handle_one_connection (arg=0x558f9da961b8) at /data/src/10.5/sql/sql_connect.cc:1313
      #24 0x0000558f9b26790c in pfs_spawn_thread (arg=0x558f9da95de8) at /data/src/10.5/storage/perfschema/pfs.cc:2201
      #25 0x00007f30737434a4 in start_thread (arg=0x7f306c357700) at pthread_create.c:456
      #26 0x00007f3071877d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      10.5 ASAN 30e7a0a8

      ==22281==ERROR: AddressSanitizer: heap-use-after-free on address 0x616000009a09 at pc 0x562685c396b2 bp 0x7f6d56307ae0 sp 0x7f6d56307ad8
      READ of size 1 at 0x616000009a09 thread T5
          #0 0x562685c396b1 in simple_key_cache_read /data/src/10.5/mysys/mf_keycache.c:2817
          #1 0x562685c45e4a in key_cache_read /data/src/10.5/mysys/mf_keycache.c:6244
          #2 0x562685b8a46b in _mi_fetch_keypage /data/src/10.5/storage/myisam/mi_page.c:32
          #3 0x562685bae1f4 in w_search /data/src/10.5/storage/myisam/mi_write.c:356
          #4 0x562685bad934 in _mi_ck_real_write_btree /data/src/10.5/storage/myisam/mi_write.c:298
          #5 0x562685bad694 in _mi_ck_write_btree /data/src/10.5/storage/myisam/mi_write.c:279
          #6 0x562685bad3a6 in _mi_ck_write /data/src/10.5/storage/myisam/mi_write.c:250
          #7 0x562685babfd8 in mi_write /data/src/10.5/storage/myisam/mi_write.c:125
          #8 0x562685af6fa7 in ha_myisam::write_row(unsigned char const*) /data/src/10.5/storage/myisam/ha_myisam.cc:950
          #9 0x5626849a6f4f in handler::ha_write_row(unsigned char const*) /data/src/10.5/sql/handler.cc:7133
          #10 0x56268417da41 in write_record(THD*, TABLE*, st_copy_info*, select_result*) /data/src/10.5/sql/sql_insert.cc:2090
          #11 0x56268417669d in mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool, select_result*) /data/src/10.5/sql/sql_insert.cc:1087
          #12 0x56268422bf47 in mysql_execute_command(THD*) /data/src/10.5/sql/sql_parse.cc:4545
          #13 0x562684241d31 in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.5/sql/sql_parse.cc:7993
          #14 0x56268421c591 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.5/sql/sql_parse.cc:1867
          #15 0x562684219414 in do_command(THD*) /data/src/10.5/sql/sql_parse.cc:1348
          #16 0x5626845d5e08 in do_handle_one_connection(CONNECT*, bool) /data/src/10.5/sql/sql_connect.cc:1411
          #17 0x5626845d5877 in handle_one_connection /data/src/10.5/sql/sql_connect.cc:1313
          #18 0x5626851c458a in pfs_spawn_thread /data/src/10.5/storage/perfschema/pfs.cc:2201
          #19 0x7f6d60b714a3 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x74a3)
          #20 0x7f6d5eca5d0e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xe8d0e)
       
      0x616000009a09 is located 137 bytes inside of 612-byte region [0x616000009980,0x616000009be4)
      freed by thread T6 here:
          #0 0x7f6d60e48a10 in free (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1a10)
          #1 0x562685ca3006 in free_memory /data/src/10.5/mysys/safemalloc.c:279
          #2 0x562685ca26f0 in sf_free /data/src/10.5/mysys/safemalloc.c:197
          #3 0x562685c73f28 in my_free /data/src/10.5/mysys/my_malloc.c:209
          #4 0x562685c45c52 in end_key_cache_internal /data/src/10.5/mysys/mf_keycache.c:6157
          #5 0x562685c46503 in repartition_key_cache_internal /data/src/10.5/mysys/mf_keycache.c:6521
          #6 0x562685c4658b in repartition_key_cache /data/src/10.5/mysys/mf_keycache.c:6572
          #7 0x56268499bbbe in ha_repartition_key_cache(st_key_cache*) /data/src/10.5/sql/handler.cc:5661
          #8 0x56268461008c in update_keycache /data/src/10.5/sql/sys_vars.ic:1129
          #9 0x5626846101a7 in repartition_keycache /data/src/10.5/sql/sys_vars.ic:1154
          #10 0x562684631243 in Sys_var_keycache::global_update(THD*, set_var*) /data/src/10.5/sql/sys_vars.ic:1055
          #11 0x562683fb9222 in sys_var::update(THD*, set_var*) /data/src/10.5/sql/set_var.cc:207
          #12 0x562683fbd675 in set_var::update(THD*) /data/src/10.5/sql/set_var.cc:859
          #13 0x562683fbcbfa in sql_set_variables(THD*, List<set_var_base>*, bool) /data/src/10.5/sql/set_var.cc:746
          #14 0x56268422fd24 in mysql_execute_command(THD*) /data/src/10.5/sql/sql_parse.cc:5008
          #15 0x562684241d31 in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.5/sql/sql_parse.cc:7993
          #16 0x56268421c591 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.5/sql/sql_parse.cc:1867
          #17 0x562684219414 in do_command(THD*) /data/src/10.5/sql/sql_parse.cc:1348
          #18 0x5626845d5e08 in do_handle_one_connection(CONNECT*, bool) /data/src/10.5/sql/sql_connect.cc:1411
          #19 0x5626845d5877 in handle_one_connection /data/src/10.5/sql/sql_connect.cc:1313
          #20 0x5626851c458a in pfs_spawn_thread /data/src/10.5/storage/perfschema/pfs.cc:2201
          #21 0x7f6d60b714a3 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x74a3)
       
      previously allocated by thread T0 here:
          #0 0x7f6d60e48d28 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1d28)
          #1 0x562685ca2109 in sf_malloc /data/src/10.5/mysys/safemalloc.c:118
          #2 0x562685c7328c in my_malloc /data/src/10.5/mysys/my_malloc.c:88
          #3 0x562685c4506b in init_key_cache_internal /data/src/10.5/mysys/mf_keycache.c:5914
          #4 0x562685c45625 in init_key_cache /data/src/10.5/mysys/mf_keycache.c:6010
          #5 0x56268499b2f6 in ha_init_key_cache /data/src/10.5/sql/handler.cc:5589
          #6 0x562683f8aac9 in process_key_caches(int (*)(char const*, st_key_cache*, void*), void*) /data/src/10.5/sql/keycaches.cc:180
          #7 0x562683f72731 in init_server_components /data/src/10.5/sql/mysqld.cc:4898
          #8 0x562683f7454e in mysqld_main(int, char**) /data/src/10.5/sql/mysqld.cc:5492
          #9 0x562683f60fcf in main /data/src/10.5/sql/main.cc:25
          #10 0x7f6d5ebdd2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
       
      Thread T5 created by T0 here:
          #0 0x7f6d60db7f59 in __interceptor_pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x30f59)
          #1 0x5626851bf64c in my_thread_create /data/src/10.5/storage/perfschema/my_thread.h:34
          #2 0x5626851c4979 in pfs_spawn_thread_v1 /data/src/10.5/storage/perfschema/pfs.cc:2252
          #3 0x562683f627d7 in inline_mysql_thread_create /data/src/10.5/include/mysql/psi/mysql_thread.h:1321
          #4 0x562683f75509 in create_thread_to_handle_connection(CONNECT*) /data/src/10.5/sql/mysqld.cc:6018
          #5 0x562683f75a7e in create_new_thread(CONNECT*) /data/src/10.5/sql/mysqld.cc:6077
          #6 0x562683f75c3b in handle_accepted_socket(st_mysql_socket, st_mysql_socket) /data/src/10.5/sql/mysqld.cc:6142
          #7 0x562683f7661e in handle_connections_sockets() /data/src/10.5/sql/mysqld.cc:6269
          #8 0x562683f74e6f in mysqld_main(int, char**) /data/src/10.5/sql/mysqld.cc:5664
          #9 0x562683f60fcf in main /data/src/10.5/sql/main.cc:25
          #10 0x7f6d5ebdd2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
       
      Thread T6 created by T0 here:
          #0 0x7f6d60db7f59 in __interceptor_pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x30f59)
          #1 0x5626851bf64c in my_thread_create /data/src/10.5/storage/perfschema/my_thread.h:34
          #2 0x5626851c4979 in pfs_spawn_thread_v1 /data/src/10.5/storage/perfschema/pfs.cc:2252
          #3 0x562683f627d7 in inline_mysql_thread_create /data/src/10.5/include/mysql/psi/mysql_thread.h:1321
          #4 0x562683f75509 in create_thread_to_handle_connection(CONNECT*) /data/src/10.5/sql/mysqld.cc:6018
          #5 0x562683f75a7e in create_new_thread(CONNECT*) /data/src/10.5/sql/mysqld.cc:6077
          #6 0x562683f75c3b in handle_accepted_socket(st_mysql_socket, st_mysql_socket) /data/src/10.5/sql/mysqld.cc:6142
          #7 0x562683f7661e in handle_connections_sockets() /data/src/10.5/sql/mysqld.cc:6269
          #8 0x562683f74e6f in mysqld_main(int, char**) /data/src/10.5/sql/mysqld.cc:5664
          #9 0x562683f60fcf in main /data/src/10.5/sql/main.cc:25
          #10 0x7f6d5ebdd2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
       
      SUMMARY: AddressSanitizer: heap-use-after-free /data/src/10.5/mysys/mf_keycache.c:2817 in simple_key_cache_read
      Shadow bytes around the buggy address:
        0x0c2c7fff92f0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
        0x0c2c7fff9300: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
        0x0c2c7fff9310: fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa fa
        0x0c2c7fff9320: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
        0x0c2c7fff9330: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
      =>0x0c2c7fff9340: fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd
        0x0c2c7fff9350: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
        0x0c2c7fff9360: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
        0x0c2c7fff9370: fd fd fd fd fd fd fd fd fd fd fd fd fd fa fa fa
        0x0c2c7fff9380: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
        0x0c2c7fff9390: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
      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
        Heap right redzone:      fb
        Freed heap region:       fd
        Stack left redzone:      f1
        Stack mid redzone:       f2
        Stack right redzone:     f3
        Stack partial redzone:   f4
        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
      ==22281==ABORTING
      200723 21:00:03 [ERROR] mysqld got signal 6 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
       
      Server version: 10.5.5-MariaDB-debug-log
      key_buffer_size=134217720
      read_buffer_size=131072
      max_used_connections=2
      max_threads=153
      thread_count=3
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 193730 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x62b000062288
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7f6d5630b9a0 thread_stack 0x5fc00
      ??:0(backtrace)[0x7f6d60dd4681]
      /data/bld/10.5-asan/bin/mariadbd(my_print_stacktrace+0xb5)[0x562685c81ff3]
      mysys/stacktrace.c:306(my_print_stacktrace)[0x56268496dfa4]
      ??:0(__restore_rt)[0x7f6d60b7b0e0]
      linux/raise.c:51(__GI_raise)[0x7f6d5ebeffff]
      stdlib/abort.c:91(__GI_abort)[0x7f6d5ebf142a]
      ??:0(__sanitizer_cov_trace_switch)[0x7f6d60e62329]
      ??:0(__asan_print_accumulated_stats)[0x7f6d60e579ab]
      ??:0(__asan_unpoison_intra_object_redzone)[0x7f6d60e51b57]
      ??:0(__asan_report_load1)[0x7f6d60e521e8]
      /data/bld/10.5-asan/bin/mariadbd(simple_key_cache_read+0x204)[0x562685c396b2]
      mysys/mf_keycache.c:2817(simple_key_cache_read)[0x562685c45e4b]
      mysys/mf_keycache.c:6244(key_cache_read)[0x562685b8a46c]
      myisam/mi_page.c:32(_mi_fetch_keypage)[0x562685bae1f5]
      myisam/mi_write.c:356(w_search)[0x562685bad935]
      myisam/mi_write.c:298(_mi_ck_real_write_btree)[0x562685bad695]
      myisam/mi_write.c:279(_mi_ck_write_btree)[0x562685bad3a7]
      myisam/mi_write.c:250(_mi_ck_write)[0x562685babfd9]
      myisam/mi_write.c:125(mi_write)[0x562685af6fa8]
      myisam/ha_myisam.cc:951(ha_myisam::write_row(unsigned char const*))[0x5626849a6f50]
      sql/handler.cc:7133(handler::ha_write_row(unsigned char const*))[0x56268417da42]
      sql/sql_insert.cc:2090(write_record(THD*, TABLE*, st_copy_info*, select_result*))[0x56268417669e]
      sql/sql_insert.cc:1087(mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool, select_result*))[0x56268422bf48]
      sql/sql_parse.cc:4545(mysql_execute_command(THD*))[0x562684241d32]
      sql/sql_parse.cc:7993(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x56268421c592]
      sql/sql_parse.cc:1869(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x562684219415]
      sql/sql_parse.cc:1348(do_command(THD*))[0x5626845d5e09]
      sql/sql_connect.cc:1411(do_handle_one_connection(CONNECT*, bool))[0x5626845d5878]
      sql/sql_connect.cc:1315(handle_one_connection)[0x5626851c458b]
      nptl/pthread_create.c:456(start_thread)[0x7f6d60b714a4]
      x86_64/clone.S:99(clone)[0x7f6d5eca5d0f]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x62b00005b2a8): INSERT INTO t1 VALUES (1),(5),(3),(5)
      Connection ID (thread ID): 4
      Status: NOT_KILLED
       
      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
       
      The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
      information that should help you find out what is causing the crash.
      Writing a core file...
      Working directory at /dev/shm/var_simple1/mysqld.1/data
      Resource Limits:
      Limit                     Soft Limit           Hard Limit           Units     
      Max cpu time              unlimited            unlimited            seconds   
      Max file size             unlimited            unlimited            bytes     
      Max data size             unlimited            unlimited            bytes     
      Max stack size            8388608              unlimited            bytes     
      Max core file size        0                    0                    bytes     
      Max resident set          unlimited            unlimited            bytes     
      Max processes             128123               128123               processes 
      Max open files            1024                 1024                 files     
      Max locked memory         65536                65536                bytes     
      Max address space         unlimited            unlimited            bytes     
      Max file locks            unlimited            unlimited            locks     
      Max pending signals       128123               128123               signals   
      Max msgqueue size         819200               819200               bytes     
      Max nice priority         0                    0                    
      Max realtime priority     0                    0                    
      Max realtime timeout      unlimited            unlimited            us        
      

      10.4 ddb8309e (hang)

      Thread 6 (Thread 0x7fb98d822700 (LWP 23399)):
      #0  __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
      #1  0x00007fb995602ce6 in __GI___pthread_mutex_lock (mutex=0x55d13808bc20) at ../nptl/pthread_mutex_lock.c:135
      #2  0x000055d1367b441e in safe_mutex_lock (mp=0x55d13808bbf8, my_flags=0, file=0x55d136c761b0 "/data/src/10.4/mysys/mf_keycache.c", line=2802) at /data/src/10.4/mysys/thr_mutex.c:293
      #3  0x000055d13678abfb in inline_mysql_mutex_lock (that=0x55d13808bbf8, src_file=0x55d136c761b0 "/data/src/10.4/mysys/mf_keycache.c", src_line=2802) at /data/src/10.4/include/mysql/psi/mysql_thread.h:702
      #4  0x000055d136790a69 in simple_key_cache_read (keycache=0x55d13808bb40, file=54, filepos=1024, level=3, buff=0x7fb98d81f280 "\260\362\201\215\271\177", length=1024, block_length=1024, return_buffer=0) at /data/src/10.4/mysys/mf_keycache.c:2802
      #5  0x000055d136795d5f in key_cache_read (keycache=0x55d13805b0f0, file=54, filepos=1024, level=3, buff=0x7fb98d81f280 "\260\362\201\215\271\177", length=1024, block_length=1024, return_buffer=0) at /data/src/10.4/mysys/mf_keycache.c:6240
      #6  0x000055d1366cc68d in _mi_fetch_keypage (info=0x7fb97c12bb80, keyinfo=0x7fb97c12b8d8, page=1024, level=3, buff=0x7fb98d81f280 "\260\362\201\215\271\177", return_buffer=0) at /data/src/10.4/storage/myisam/mi_page.c:32
      #7  0x000055d1366d8c42 in w_search (info=0x7fb97c12bb80, keyinfo=0x7fb97c12b8d8, comp_flag=4, key=0x7fb97c12c7e6 "\001", key_length=5, page=1024, father_buff=0x0, father_keypos=0x0, father_page=0, insert_last=1 '\001') at /data/src/10.4/storage/myisam/mi_write.c:356
      #8  0x000055d1366d8865 in _mi_ck_real_write_btree (info=0x7fb97c12bb80, keyinfo=0x7fb97c12b8d8, key=0x7fb97c12c7e6 "\001", key_length=5, root=0x7fb97c12ba68, comp_flag=4) at /data/src/10.4/storage/myisam/mi_write.c:298
      #9  0x000055d1366d8779 in _mi_ck_write_btree (info=0x7fb97c12bb80, keynr=0, key=0x7fb97c12c7e6 "\001", key_length=5) at /data/src/10.4/storage/myisam/mi_write.c:279
      #10 0x000055d1366d8674 in _mi_ck_write (info=0x7fb97c12bb80, keynr=0, key=0x7fb97c12c7e6 "\001", key_length=5) at /data/src/10.4/storage/myisam/mi_write.c:250
      #11 0x000055d1366d7fb2 in mi_write (info=0x7fb97c12bb80, record=0x7fb97c130160 "\375\001") at /data/src/10.4/storage/myisam/mi_write.c:125
      #12 0x000055d136692d9f in ha_myisam::write_row (this=0x7fb97c1333d8, buf=0x7fb97c130160 "\375\001") at /data/src/10.4/storage/myisam/ha_myisam.cc:950
      #13 0x000055d135f25084 in handler::ha_write_row (this=0x7fb97c1333d8, buf=0x7fb97c130160 "\375\001") at /data/src/10.4/sql/handler.cc:6742
      #14 0x000055d135b72ca1 in write_record (thd=0x7fb97c000af0, table=0x7fb97c12a490, info=0x7fb98d820a90) at /data/src/10.4/sql/sql_insert.cc:2060
      #15 0x000055d135b6fbf1 in mysql_insert (thd=0x7fb97c000af0, table_list=0x7fb97c013290, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/10.4/sql/sql_insert.cc:1078
      #16 0x000055d135bbcf89 in mysql_execute_command (thd=0x7fb97c000af0) at /data/src/10.4/sql/sql_parse.cc:4518
      #17 0x000055d135bc88d3 in mysql_parse (thd=0x7fb97c000af0, rawbuf=0x7fb97c013198 "INSERT INTO t1 VALUES (1),(5),(3),(5)", length=37, parser_state=0x7fb98d821570, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7895
      #18 0x000055d135bb4e08 in dispatch_command (command=COM_QUERY, thd=0x7fb97c000af0, packet=0x7fb97c1364a1 "INSERT INTO t1 VALUES (1),(5),(3),(5)", packet_length=37, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1834
      #19 0x000055d135bb35aa in do_command (thd=0x7fb97c000af0) at /data/src/10.4/sql/sql_parse.cc:1352
      #20 0x000055d135d3c666 in do_handle_one_connection (connect=0x55d1382b7410) at /data/src/10.4/sql/sql_connect.cc:1412
      #21 0x000055d135d3c3b5 in handle_one_connection (arg=0x55d1382b7410) at /data/src/10.4/sql/sql_connect.cc:1316
      #22 0x000055d13673c9e9 in pfs_spawn_thread (arg=0x55d1381d97e0) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #23 0x00007fb9956004a4 in start_thread (arg=0x7fb98d822700) at pthread_create.c:456
      #24 0x00007fb993734d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      10.4 de208723 non-debug

      #3  <signal handler called>
      #4  0x0000559d33904271 in get_hash_link (keycache=keycache@entry=0x559d36c83b88, file=file@entry=54, filepos=filepos@entry=1024) at /data/src/10.4/mysys/mf_keycache.c:1773
      #5  0x0000559d33909296 in find_key_block (keycache=keycache@entry=0x559d36c83b88, file=file@entry=54, filepos=filepos@entry=1024, init_hits_left=init_hits_left@entry=3, page_st=page_st@entry=0x7fedf6e1cd8c, wrmode=0) at /data/src/10.4/mysys/mf_keycache.c:1926
      #6  0x0000559d3390a5d3 in simple_key_cache_read (keycache=0x559d36c83b88, file=54, filepos=1024, level=3, buff=0x7fedf6e1ce40 "", length=1024, block_length=1024, return_buffer=0) at /data/src/10.4/mysys/mf_keycache.c:2845
      #7  0x0000559d337df8e6 in _mi_fetch_keypage (info=info@entry=0x7fede00806d8, keyinfo=keyinfo@entry=0x7fede00804a0, page=page@entry=1024, level=level@entry=3, buff=buff@entry=0x7fedf6e1ce40 "", return_buffer=return_buffer@entry=0) at /data/src/10.4/storage/myisam/mi_page.c:32
      #8  0x0000559d337e9863 in w_search (info=info@entry=0x7fede00806d8, keyinfo=keyinfo@entry=0x7fede00804a0, comp_flag=4, key=key@entry=0x7fede00812be "\001", key_length=5, page=1024, father_buff=0x0, father_keypos=0x0, father_page=0, insert_last=1 '\001') at /data/src/10.4/storage/myisam/mi_write.c:356
      #9  0x0000559d337e9e81 in _mi_ck_real_write_btree (comp_flag=<optimized out>, root=0x7fede0080630, key_length=<optimized out>, key=0x7fede00812be "\001", keyinfo=0x7fede00804a0, info=0x7fede00806d8) at /data/src/10.4/storage/myisam/mi_write.c:298
      #10 _mi_ck_write_btree (info=0x7fede00806d8, keynr=0, key=0x7fede00812be "\001", key_length=<optimized out>) at /data/src/10.4/storage/myisam/mi_write.c:279
      #11 0x0000559d337e88d4 in mi_write (info=0x7fede00806d8, record=0x7fede00763b8 "\375\001") at /data/src/10.4/storage/myisam/mi_write.c:125
      #12 0x0000559d3331f60e in handler::ha_write_row (this=0x7fede00767a0, buf=0x7fede00763b8 "\375\001") at /data/src/10.4/sql/handler.cc:6719
      #13 0x0000559d330cda9d in write_record (thd=thd@entry=0x7fede00009a8, table=table@entry=0x7fede00755b8, info=info@entry=0x7fedf6e1e490) at /data/src/10.4/sql/sql_insert.cc:2056
      #14 0x0000559d330d53ee in mysql_insert (thd=thd@entry=0x7fede00009a8, table_list=<optimized out>, fields=..., values_list=..., update_fields=..., update_values=..., duplic=<optimized out>, ignore=<optimized out>) at /data/src/10.4/sql/sql_insert.cc:1078
      #15 0x0000559d331038aa in mysql_execute_command (thd=thd@entry=0x7fede00009a8) at /data/src/10.4/sql/sql_parse.cc:4520
      #16 0x0000559d3310858a in mysql_parse (thd=thd@entry=0x7fede00009a8, rawbuf=<optimized out>, length=37, parser_state=parser_state@entry=0x7fedf6e20580, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.4/sql/sql_parse.cc:7899
      #17 0x0000559d3310a834 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7fede00009a8, packet=packet@entry=0x7fede0007a19 "INSERT INTO t1 VALUES (1),(5),(3),(5)", packet_length=packet_length@entry=37, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.4/sql/sql_parse.cc:1834
      #18 0x0000559d3310bff6 in do_command (thd=0x7fede00009a8) at /data/src/10.4/sql/sql_parse.cc:1352
      #19 0x0000559d331e9f92 in do_handle_one_connection (connect=connect@entry=0x559d36d83618) at /data/src/10.4/sql/sql_connect.cc:1412
      #20 0x0000559d331ea04d in handle_one_connection (arg=arg@entry=0x559d36d83618) at /data/src/10.4/sql/sql_connect.cc:1316
      #21 0x0000559d3382a061 in pfs_spawn_thread (arg=0x559d36d83678) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #22 0x00007fee01ee14a4 in start_thread (arg=0x7fedf6e21700) at pthread_create.c:456
      #23 0x00007fee00f5fd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      10.2 3a8943ae ASAN

      safe_mutex: Trying to lock unitialized mutex at /data/src/10.2/mysys/mf_keycache.c, line 2962
      200723 21:13:13 [ERROR] mysqld got signal 6 ;
       
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00007f1d7aa6042a in __GI_abort () at abort.c:89
      #6  0x000055dc62dfca84 in safe_mutex_lock (mp=0x55dc655998a8, my_flags=0, file=0x55dc6317d610 "/data/src/10.2/mysys/mf_keycache.c", line=2962) at /data/src/10.2/mysys/thr_mutex.c:245
      #7  0x000055dc62dd66ec in inline_mysql_mutex_lock (that=0x55dc655998a8, src_file=0x55dc6317d610 "/data/src/10.2/mysys/mf_keycache.c", src_line=2962) at /data/src/10.2/include/mysql/psi/mysql_thread.h:688
      #8  0x000055dc62ddaf32 in simple_key_cache_read (keycache=0x55dc655997f0, file=56, filepos=1024, level=3, buff=0x7f1d74d89100 "", length=1024, block_length=1024, return_buffer=0) at /data/src/10.2/mysys/mf_keycache.c:2962
      #9  0x000055dc62ddf031 in key_cache_read (keycache=0x55dc65554c60, file=56, filepos=1024, level=3, buff=0x7f1d74d89100 "", length=1024, block_length=1024, return_buffer=0) at /data/src/10.2/mysys/mf_keycache.c:6231
      #10 0x000055dc62d35c18 in _mi_fetch_keypage (info=0x7f1d64069760, keyinfo=0x7f1d6400c318, page=1024, level=3, buff=0x7f1d74d89100 "", return_buffer=0) at /data/src/10.2/storage/myisam/mi_page.c:32
      #11 0x000055dc62d41ec6 in w_search (info=0x7f1d64069760, keyinfo=0x7f1d6400c318, comp_flag=4, key=0x7f1d6406a39e "\001", key_length=5, page=1024, father_buff=0x0, father_keypos=0x0, father_page=0, insert_last=1 '\001') at /data/src/10.2/storage/myisam/mi_write.c:357
      #12 0x000055dc62d41ae9 in _mi_ck_real_write_btree (info=0x7f1d64069760, keyinfo=0x7f1d6400c318, key=0x7f1d6406a39e "\001", key_length=5, root=0x7f1d6400c4a8, comp_flag=4) at /data/src/10.2/storage/myisam/mi_write.c:299
      #13 0x000055dc62d419fd in _mi_ck_write_btree (info=0x7f1d64069760, keynr=0, key=0x7f1d6406a39e "\001", key_length=5) at /data/src/10.2/storage/myisam/mi_write.c:280
      #14 0x000055dc62d418f8 in _mi_ck_write (info=0x7f1d64069760, keynr=0, key=0x7f1d6406a39e "\001", key_length=5) at /data/src/10.2/storage/myisam/mi_write.c:251
      #15 0x000055dc62d41227 in mi_write (info=0x7f1d64069760, record=0x7f1d64006630 "\375\001") at /data/src/10.2/storage/myisam/mi_write.c:125
      #16 0x000055dc62cfd44f in ha_myisam::write_row (this=0x7f1d6400b5b8, buf=0x7f1d64006630 "\375\001") at /data/src/10.2/storage/myisam/ha_myisam.cc:922
      #17 0x000055dc626bcaf4 in handler::ha_write_row (this=0x7f1d6400b5b8, buf=0x7f1d64006630 "\375\001") at /data/src/10.2/sql/handler.cc:6108
      #18 0x000055dc62412681 in write_record (thd=0x7f1d64000af0, table=0x7f1d6400a9b0, info=0x7f1d74d8a8f0) at /data/src/10.2/sql/sql_insert.cc:1941
      #19 0x000055dc62410110 in mysql_insert (thd=0x7f1d64000af0, table_list=0x7f1d64012550, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/10.2/sql/sql_insert.cc:1066
      #20 0x000055dc624369ac in mysql_execute_command (thd=0x7f1d64000af0) at /data/src/10.2/sql/sql_parse.cc:4159
      #21 0x000055dc624420f9 in mysql_parse (thd=0x7f1d64000af0, rawbuf=0x7f1d64012458 "INSERT INTO t1 VALUES (1),(5),(3),(5)", length=37, parser_state=0x7f1d74d8b610, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7733
      #22 0x000055dc62430425 in dispatch_command (command=COM_QUERY, thd=0x7f1d64000af0, packet=0x7f1d6408d251 "INSERT INTO t1 VALUES (1),(5),(3),(5)", packet_length=37, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824
      #23 0x000055dc6242eea0 in do_command (thd=0x7f1d64000af0) at /data/src/10.2/sql/sql_parse.cc:1377
      #24 0x000055dc62584f01 in do_handle_one_connection (connect=0x55dc6575f970) at /data/src/10.2/sql/sql_connect.cc:1336
      #25 0x000055dc62584c6c in handle_one_connection (arg=0x55dc6575f970) at /data/src/10.2/sql/sql_connect.cc:1241
      #26 0x000055dc62d9b144 in pfs_spawn_thread (arg=0x55dc65782c50) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #27 0x00007f1d7c9e04a4 in start_thread (arg=0x7f1d74d8c700) at pthread_create.c:456
      #28 0x00007f1d7ab14d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      10.2 3a8943ae ASAN

      ==24566==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x55bc7b0200d4 bp 0x7f4eb961a850 sp 0x7f4eb961a740 T5)
          #0 0x55bc7b0200d3 in simple_key_cache_write /data/src/10.2/mysys/mf_keycache.c:3314
          #1 0x55bc7b02926e in key_cache_write /data/src/10.2/mysys/mf_keycache.c:6338
          #2 0x55bc7ae80d97 in _mi_write_keypage /data/src/10.2/storage/myisam/mi_page.c:90
          #3 0x55bc7aea449d in w_search /data/src/10.2/storage/myisam/mi_write.c:427
          #4 0x55bc7aea31c5 in _mi_ck_real_write_btree /data/src/10.2/storage/myisam/mi_write.c:299
          #5 0x55bc7aea2f25 in _mi_ck_write_btree /data/src/10.2/storage/myisam/mi_write.c:280
          #6 0x55bc7aea2c37 in _mi_ck_write /data/src/10.2/storage/myisam/mi_write.c:251
          #7 0x55bc7aea180a in mi_write /data/src/10.2/storage/myisam/mi_write.c:125
          #8 0x55bc7adeed4d in ha_myisam::write_row(unsigned char*) /data/src/10.2/storage/myisam/ha_myisam.cc:922
          #9 0x55bc7a044703 in handler::ha_write_row(unsigned char*) /data/src/10.2/sql/handler.cc:6108
          #10 0x55bc799ef238 in write_record(THD*, TABLE*, st_copy_info*) /data/src/10.2/sql/sql_insert.cc:1941
          #11 0x55bc799e9664 in mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) /data/src/10.2/sql/sql_insert.cc:1066
          #12 0x55bc79a490f2 in mysql_execute_command(THD*) /data/src/10.2/sql/sql_parse.cc:4159
          #13 0x55bc79a60691 in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /data/src/10.2/sql/sql_parse.cc:7733
          #14 0x55bc79a3c78b in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /data/src/10.2/sql/sql_parse.cc:1824
          #15 0x55bc79a39830 in do_command(THD*) /data/src/10.2/sql/sql_parse.cc:1377
          #16 0x55bc79d76f01 in do_handle_one_connection(CONNECT*) /data/src/10.2/sql/sql_connect.cc:1336
          #17 0x55bc79d768d1 in handle_one_connection /data/src/10.2/sql/sql_connect.cc:1241
          #18 0x55bc7af7ed8a in pfs_spawn_thread /data/src/10.2/storage/perfschema/pfs.cc:1869
          #19 0x7f4ec53154a3 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x74a3)
          #20 0x7f4ec3449d0e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xe8d0e)
       
      AddressSanitizer can not provide additional info.
      SUMMARY: AddressSanitizer: SEGV /data/src/10.2/mysys/mf_keycache.c:3314 in simple_key_cache_write
      Thread T5 created by T0 here:
          #0 0x7f4ec555bf59 in __interceptor_pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x30f59)
          #1 0x55bc7af7f1c6 in spawn_thread_v1 /data/src/10.2/storage/perfschema/pfs.cc:1919
          #2 0x55bc79816df2 in inline_mysql_thread_create /data/src/10.2/include/mysql/psi/mysql_thread.h:1246
          #3 0x55bc7982b646 in create_thread_to_handle_connection(CONNECT*) /data/src/10.2/sql/mysqld.cc:6518
          #4 0x55bc7982bd29 in create_new_thread /data/src/10.2/sql/mysqld.cc:6588
          #5 0x55bc7982cd41 in handle_connections_sockets() /data/src/10.2/sql/mysqld.cc:6863
          #6 0x55bc7982ab85 in mysqld_main(int, char**) /data/src/10.2/sql/mysqld.cc:6137
          #7 0x55bc7981577f in main /data/src/10.2/sql/main.cc:25
          #8 0x7f4ec33812e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
       
      ==24566==ABORTING
      

      10.2 3a8943ae ASAN

      safe_mutex: Trying to lock unitialized mutex at /data/src/10.2/mysys/mf_keycache.c, line 3569
      200723 21:10:33 [ERROR] mysqld got signal 6 ;
       
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00007f9617ce842a in __GI_abort () at abort.c:89
      #6  0x000055abb9ef6db9 in safe_mutex_lock (mp=0x61600000c7a8, my_flags=0, file=0x55abba7ed920 "/data/src/10.2/mysys/mf_keycache.c", line=3569) at /data/src/10.2/mysys/thr_mutex.c:245
      #7  0x000055abb9e995c4 in inline_mysql_mutex_lock (that=0x61600000c7a8, src_file=0x55abba7ed920 "/data/src/10.2/mysys/mf_keycache.c", src_line=3569) at /data/src/10.2/include/mysql/psi/mysql_thread.h:688
      #8  0x000055abb9ea7071 in simple_key_cache_write (keycache=0x61600000c6f0, file=56, file_extra=0x61d00017e170, filepos=1024, level=3, buff=0x7f960df739b0 "", length=1024, block_length=1024, dont_write=1) at /data/src/10.2/mysys/mf_keycache.c:3569
      #9  0x000055abb9eaf26f in key_cache_write (keycache=0x611000009cf0, file=56, file_extra=0x61d00017e170, filepos=1024, level=3, buff=0x7f960df739b0 "", length=1024, block_length=1024, force_write=1) at /data/src/10.2/mysys/mf_keycache.c:6338
      #10 0x000055abb9d06d98 in _mi_write_keypage (info=0x61f00004c2f0, keyinfo=0x61d00017e4e8, page=1024, level=3, buff=0x7f960df739b0 "") at /data/src/10.2/storage/myisam/mi_page.c:90
      #11 0x000055abb9d2a49e in w_search (info=0x61f00004c2f0, keyinfo=0x61d00017e4e8, comp_flag=4, key=0x61f00004cf2e "\001", key_length=5, page=1024, father_buff=0x0, father_keypos=0x0, father_page=0, insert_last=0 '\000') at /data/src/10.2/storage/myisam/mi_write.c:427
      #12 0x000055abb9d291c6 in _mi_ck_real_write_btree (info=0x61f00004c2f0, keyinfo=0x61d00017e4e8, key=0x61f00004cf2e "\001", key_length=5, root=0x61d00017e678, comp_flag=4) at /data/src/10.2/storage/myisam/mi_write.c:299
      #13 0x000055abb9d28f26 in _mi_ck_write_btree (info=0x61f00004c2f0, keynr=0, key=0x61f00004cf2e "\001", key_length=5) at /data/src/10.2/storage/myisam/mi_write.c:280
      #14 0x000055abb9d28c38 in _mi_ck_write (info=0x61f00004c2f0, keynr=0, key=0x61f00004cf2e "\001", key_length=5) at /data/src/10.2/storage/myisam/mi_write.c:251
      #15 0x000055abb9d2780b in mi_write (info=0x61f00004c2f0, record=0x619000088520 "\375\001") at /data/src/10.2/storage/myisam/mi_write.c:125
      #16 0x000055abb9c74d4e in ha_myisam::write_row (this=0x61c000020910, buf=0x619000088520 "\375\001") at /data/src/10.2/storage/myisam/ha_myisam.cc:922
      #17 0x000055abb8eca704 in handler::ha_write_row (this=0x61c000020910, buf=0x619000088520 "\375\001") at /data/src/10.2/sql/handler.cc:6108
      #18 0x000055abb8875239 in write_record (thd=0x62a000048270, table=0x61f00004d0f0, info=0x7f960df75770) at /data/src/10.2/sql/sql_insert.cc:1941
      #19 0x000055abb886f665 in mysql_insert (thd=0x62a000048270, table_list=0x62b0000003b8, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/10.2/sql/sql_insert.cc:1066
      #20 0x000055abb88cf0f3 in mysql_execute_command (thd=0x62a000048270) at /data/src/10.2/sql/sql_parse.cc:4159
      #21 0x000055abb88e6692 in mysql_parse (thd=0x62a000048270, rawbuf=0x62b000000290 "INSERT INTO t1 VALUES (1),(5),(3),(5)", length=37, parser_state=0x7f960df76e20, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7733
      #22 0x000055abb88c278c in dispatch_command (command=COM_QUERY, thd=0x62a000048270, packet=0x6290000e6271 "INSERT INTO t1 VALUES (1),(5),(3),(5)", packet_length=37, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824
      #23 0x000055abb88bf831 in do_command (thd=0x62a000048270) at /data/src/10.2/sql/sql_parse.cc:1377
      #24 0x000055abb8bfcf02 in do_handle_one_connection (connect=0x611000005e70) at /data/src/10.2/sql/sql_connect.cc:1336
      #25 0x000055abb8bfc8d2 in handle_one_connection (arg=0x611000005e70) at /data/src/10.2/sql/sql_connect.cc:1241
      #26 0x000055abb9e04d8b in pfs_spawn_thread (arg=0x6160000048f0) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #27 0x00007f9619c684a4 in start_thread (arg=0x7f960df78700) at pthread_create.c:456
      #28 0x00007f9617d9cd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      10.2 3a8943ae

      Thread 1 (Thread 0x7f7522f8d700 (LWP 25308)):
      #0  0x000055a302e31387 in my_hash_first (hash=0x8f8f8f8f8f8f8f8f, key=0x55a3042b6fb8 <THR_LOCK_open+120> "\t", length=0, current_record=0x7f7522f8856c) at /data/src/10.2/mysys/hash.c:260
      #1  0x000055a302e31332 in my_hash_search (hash=0x8f8f8f8f8f8f8f8f, key=0x55a3042b6fb8 <THR_LOCK_open+120> "\t", length=0) at /data/src/10.2/mysys/hash.c:235
      #2  0x000055a302e5fd4b in safe_mutex_lock (mp=0x55a3042b6f40 <THR_LOCK_open>, my_flags=0, file=0x55a3031e4628 "/data/src/10.2/mysys/my_open.c", line=140) at /data/src/10.2/mysys/thr_mutex.c:337
      #3  0x000055a302e551b2 in inline_mysql_mutex_lock (that=0x55a3042b6f40 <THR_LOCK_open>, src_file=0x55a3031e4628 "/data/src/10.2/mysys/my_open.c", src_line=140) at /data/src/10.2/include/mysql/psi/mysql_thread.h:673
      #4  0x000055a302e556b5 in my_register_filename (fd=59, FileName=0x55a302ff875a "/proc/self/limits", type_of_file=FILE_BY_OPEN, error_message_number=29, MyFlags=0) at /data/src/10.2/mysys/my_open.c:140
      #5  0x000055a302e553d3 in my_open (FileName=0x55a302ff875a "/proc/self/limits", Flags=0, MyFlags=0) at /data/src/10.2/mysys/my_open.c:60
      #6  0x000055a30270fbd9 in output_core_info () at /data/src/10.2/sql/signal_handler.cc:63
      #7  0x000055a30271040a in handle_fatal_signal (sig=11) at /data/src/10.2/sql/signal_handler.cc:339
      #8  <signal handler called>
      #9  0x000055a302e3bf4b in get_hash_link (keycache=0x55a304ae77f0, file=56, filepos=0) at /data/src/10.2/mysys/mf_keycache.c:1780
      #10 0x000055a302e3c1fe in find_key_block (keycache=0x55a304ae77f0, file=56, filepos=0, init_hits_left=3, wrmode=0, page_st=0x7f7522f89fd8) at /data/src/10.2/mysys/mf_keycache.c:1933
      #11 0x000055a302e3db6b in simple_key_cache_read (keycache=0x55a304ae77f0, file=56, filepos=0, level=3, buff=0x7f7522f8a100 " \241\370\"u\177", length=1024, block_length=1024, return_buffer=0) at /data/src/10.2/mysys/mf_keycache.c:2843
      #12 0x000055a302e42031 in key_cache_read (keycache=0x55a304aa2c60, file=56, filepos=1024, level=3, buff=0x7f7522f8a100 " \241\370\"u\177", length=1024, block_length=1024, return_buffer=0) at /data/src/10.2/mysys/mf_keycache.c:6231
      #13 0x000055a302d98c18 in _mi_fetch_keypage (info=0x7f750c069760, keyinfo=0x7f750c00c318, page=1024, level=3, buff=0x7f7522f8a100 " \241\370\"u\177", return_buffer=0) at /data/src/10.2/storage/myisam/mi_page.c:32
      #14 0x000055a302da4ec6 in w_search (info=0x7f750c069760, keyinfo=0x7f750c00c318, comp_flag=4, key=0x7f750c06a39e "\001", key_length=5, page=1024, father_buff=0x0, father_keypos=0x0, father_page=0, insert_last=1 '\001') at /data/src/10.2/storage/myisam/mi_write.c:357
      #15 0x000055a302da4ae9 in _mi_ck_real_write_btree (info=0x7f750c069760, keyinfo=0x7f750c00c318, key=0x7f750c06a39e "\001", key_length=5, root=0x7f750c00c4a8, comp_flag=4) at /data/src/10.2/storage/myisam/mi_write.c:299
      #16 0x000055a302da49fd in _mi_ck_write_btree (info=0x7f750c069760, keynr=0, key=0x7f750c06a39e "\001", key_length=5) at /data/src/10.2/storage/myisam/mi_write.c:280
      #17 0x000055a302da48f8 in _mi_ck_write (info=0x7f750c069760, keynr=0, key=0x7f750c06a39e "\001", key_length=5) at /data/src/10.2/storage/myisam/mi_write.c:251
      #18 0x000055a302da4227 in mi_write (info=0x7f750c069760, record=0x7f750c006630 "\375\001") at /data/src/10.2/storage/myisam/mi_write.c:125
      #19 0x000055a302d6044f in ha_myisam::write_row (this=0x7f750c00b5b8, buf=0x7f750c006630 "\375\001") at /data/src/10.2/storage/myisam/ha_myisam.cc:922
      #20 0x000055a30271faf4 in handler::ha_write_row (this=0x7f750c00b5b8, buf=0x7f750c006630 "\375\001") at /data/src/10.2/sql/handler.cc:6108
      #21 0x000055a302475681 in write_record (thd=0x7f750c000af0, table=0x7f750c00a9b0, info=0x7f7522f8b8f0) at /data/src/10.2/sql/sql_insert.cc:1941
      #22 0x000055a302473110 in mysql_insert (thd=0x7f750c000af0, table_list=0x7f750c012550, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/10.2/sql/sql_insert.cc:1066
      #23 0x000055a3024999ac in mysql_execute_command (thd=0x7f750c000af0) at /data/src/10.2/sql/sql_parse.cc:4159
      #24 0x000055a3024a50f9 in mysql_parse (thd=0x7f750c000af0, rawbuf=0x7f750c012458 "INSERT INTO t1 VALUES (1),(5),(3),(5)", length=37, parser_state=0x7f7522f8c610, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7733
      #25 0x000055a302493425 in dispatch_command (command=COM_QUERY, thd=0x7f750c000af0, packet=0x7f750c08d251 "INSERT INTO t1 VALUES (1),(5),(3),(5)", packet_length=37, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824
      #26 0x000055a302491ea0 in do_command (thd=0x7f750c000af0) at /data/src/10.2/sql/sql_parse.cc:1377
      #27 0x000055a3025e7f01 in do_handle_one_connection (connect=0x55a304cad970) at /data/src/10.2/sql/sql_connect.cc:1336
      #28 0x000055a3025e7c6c in handle_one_connection (arg=0x55a304cad970) at /data/src/10.2/sql/sql_connect.cc:1241
      #29 0x000055a302dfe144 in pfs_spawn_thread (arg=0x55a304cd0c50) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #30 0x00007f752ebf54a4 in start_thread (arg=0x7f7522f8d700) at pthread_create.c:456
      #31 0x00007f752cd29d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      10.2 3a8943ae ASAN

      safe_mutex: Trying to destroy a mutex keycache->cache_lock that was locked at /data/src/10.2/mysys/mf_keycache.c, line 2800 at /data/src/10.2/mysys/mf_keycache.c, line 1002
      200723 21:17:45 [ERROR] mysqld got signal 6 ;
       
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00007f1465f1e42a in __GI_abort () at abort.c:89
      #6  0x00005558baa15322 in safe_mutex_destroy (mp=0x61600000c7a8, file=0x5558bb309920 "/data/src/10.2/mysys/mf_keycache.c", line=1002) at /data/src/10.2/mysys/thr_mutex.c:599
      #7  0x00005558ba9b5390 in inline_mysql_mutex_destroy (that=0x61600000c7a8, src_file=0x5558bb309920 "/data/src/10.2/mysys/mf_keycache.c", src_line=1002) at /data/src/10.2/include/mysql/psi/mysql_thread.h:647
      #8  0x00005558ba9b8271 in end_simple_key_cache (keycache=0x61600000c6f0, cleanup=1 '\001') at /data/src/10.2/mysys/mf_keycache.c:1002
      #9  0x00005558ba9cade2 in end_key_cache_internal (keycache=0x611000009cf0, cleanup=1 '\001', use_op_lock=0 '\000') at /data/src/10.2/mysys/mf_keycache.c:6139
      #10 0x00005558ba9cb6df in repartition_key_cache_internal (keycache=0x611000009cf0, key_cache_block_size=1024, use_mem=134217728, division_limit=100, age_threshold=300, changed_blocks_hash_size=512, partitions=40, use_op_lock=1 '\001') at /data/src/10.2/mysys/mf_keycache.c:6508
      #11 0x00005558ba9cb767 in repartition_key_cache (keycache=0x611000009cf0, key_cache_block_size=1024, use_mem=134217728, division_limit=100, age_threshold=300, changed_blocks_hash_size=512, partitions=40) at /data/src/10.2/mysys/mf_keycache.c:6559
      #12 0x00005558b99dfb4f in ha_repartition_key_cache (key_cache=0x611000009cf0) at /data/src/10.2/sql/handler.cc:5004
      #13 0x00005558b974f5b1 in update_keycache (thd=0x62a000060270, key_cache=0x611000009cf0, offset=56, new_value=40, func=0x5558b99df884 <ha_repartition_key_cache(st_key_cache*)>) at /data/src/10.2/sql/sys_vars.ic:1093
      #14 0x00005558b974f6c9 in repartition_keycache (thd=0x62a000060270, key_cache=0x611000009cf0, offset=56, new_value=40) at /data/src/10.2/sql/sys_vars.ic:1118
      #15 0x00005558b976d669 in Sys_var_keycache::global_update (this=0x5558bc0f4d20 <Sys_key_cache_segments>, thd=0x62a000060270, var=0x62b00002a428) at /data/src/10.2/sql/sys_vars.ic:1019
      #16 0x00005558b9210c33 in sys_var::update (this=0x5558bc0f4d20 <Sys_key_cache_segments>, thd=0x62a000060270, var=0x62b00002a428) at /data/src/10.2/sql/set_var.cc:208
      #17 0x00005558b9215072 in set_var::update (this=0x62b00002a428, thd=0x62a000060270) at /data/src/10.2/sql/set_var.cc:837
      #18 0x00005558b92145b7 in sql_set_variables (thd=0x62a000060270, var_list=0x62a000064bf8, free=true) at /data/src/10.2/sql/set_var.cc:738
      #19 0x00005558b93ee4e8 in mysql_execute_command (thd=0x62a000060270) at /data/src/10.2/sql/sql_parse.cc:4583
      #20 0x00005558b9402692 in mysql_parse (thd=0x62a000060270, rawbuf=0x62b00002a290 "SET GLOBAL key_cache_segments= 40", length=33, parser_state=0x7f1453e37e20, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7733
      #21 0x00005558b93de78c in dispatch_command (command=COM_QUERY, thd=0x62a000060270, packet=0x6290000e1271 "SET GLOBAL key_cache_segments= 40", packet_length=33, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824
      #22 0x00005558b93db831 in do_command (thd=0x62a000060270) at /data/src/10.2/sql/sql_parse.cc:1377
      #23 0x00005558b9718f02 in do_handle_one_connection (connect=0x611000005bf0) at /data/src/10.2/sql/sql_connect.cc:1336
      #24 0x00005558b97188d2 in handle_one_connection (arg=0x611000005bf0) at /data/src/10.2/sql/sql_connect.cc:1241
      #25 0x00005558ba920d8b in pfs_spawn_thread (arg=0x616000003ff0) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #26 0x00007f1467e9e4a4 in start_thread (arg=0x7f1453e39700) at pthread_create.c:456
      #27 0x00007f1465fd2d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      10.2 3a8943ae

      mysqld: ../nptl/pthread_mutex_lock.c:144: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
      200723 21:26:06 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f6a57e86f12 in __GI___assert_fail (assertion=assertion@entry=0x7f6a59e1adf2 "mutex->__data.__owner == 0", file=file@entry=0x7f6a59e1add5 "../nptl/pthread_mutex_lock.c", line=line@entry=144, function=function@entry=0x7f6a59e1af60 <__PRETTY_FUNCTION__.8475> "__pthread_mutex_lock") at assert.c:101
      #8  0x00007f6a59e11d31 in __GI___pthread_mutex_lock (mutex=<optimized out>) at ../nptl/pthread_mutex_lock.c:144
      #9  0x0000560945efbb6a in safe_mutex_lock (mp=0x560947e048a8, my_flags=0, file=0x56094627c610 "/data/src/10.2/mysys/mf_keycache.c", line=2800) at /data/src/10.2/mysys/thr_mutex.c:292
      #10 0x0000560945ed56a6 in inline_mysql_mutex_lock (that=0x560947e048a8, src_file=0x56094627c610 "/data/src/10.2/mysys/mf_keycache.c", src_line=2800) at /data/src/10.2/include/mysql/psi/mysql_thread.h:673
      #11 0x0000560945ed9a40 in simple_key_cache_read (keycache=0x560947e047f0, file=56, filepos=1024, level=3, buff=0x7f6a521b8100 " \201\033Rj\177", length=1024, block_length=1024, return_buffer=0) at /data/src/10.2/mysys/mf_keycache.c:2800
      #12 0x0000560945ede031 in key_cache_read (keycache=0x560947dbfc60, file=56, filepos=1024, level=3, buff=0x7f6a521b8100 " \201\033Rj\177", length=1024, block_length=1024, return_buffer=0) at /data/src/10.2/mysys/mf_keycache.c:6231
      #13 0x0000560945e34c18 in _mi_fetch_keypage (info=0x7f6a40183090, keyinfo=0x7f6a4000c318, page=1024, level=3, buff=0x7f6a521b8100 " \201\033Rj\177", return_buffer=0) at /data/src/10.2/storage/myisam/mi_page.c:32
      #14 0x0000560945e40ec6 in w_search (info=0x7f6a40183090, keyinfo=0x7f6a4000c318, comp_flag=4, key=0x7f6a40183cce "\001", key_length=5, page=1024, father_buff=0x0, father_keypos=0x0, father_page=0, insert_last=1 '\001') at /data/src/10.2/storage/myisam/mi_write.c:357
      #15 0x0000560945e40ae9 in _mi_ck_real_write_btree (info=0x7f6a40183090, keyinfo=0x7f6a4000c318, key=0x7f6a40183cce "\001", key_length=5, root=0x7f6a4000c4a8, comp_flag=4) at /data/src/10.2/storage/myisam/mi_write.c:299
      #16 0x0000560945e409fd in _mi_ck_write_btree (info=0x7f6a40183090, keynr=0, key=0x7f6a40183cce "\001", key_length=5) at /data/src/10.2/storage/myisam/mi_write.c:280
      #17 0x0000560945e408f8 in _mi_ck_write (info=0x7f6a40183090, keynr=0, key=0x7f6a40183cce "\001", key_length=5) at /data/src/10.2/storage/myisam/mi_write.c:251
      #18 0x0000560945e40227 in mi_write (info=0x7f6a40183090, record=0x7f6a40006630 "\375\001") at /data/src/10.2/storage/myisam/mi_write.c:125
      #19 0x0000560945dfc44f in ha_myisam::write_row (this=0x7f6a4000b5b8, buf=0x7f6a40006630 "\375\001") at /data/src/10.2/storage/myisam/ha_myisam.cc:922
      #20 0x00005609457bbaf4 in handler::ha_write_row (this=0x7f6a4000b5b8, buf=0x7f6a40006630 "\375\001") at /data/src/10.2/sql/handler.cc:6108
      #21 0x0000560945511681 in write_record (thd=0x7f6a40000af0, table=0x7f6a4000a9b0, info=0x7f6a521b98f0) at /data/src/10.2/sql/sql_insert.cc:1941
      #22 0x000056094550f110 in mysql_insert (thd=0x7f6a40000af0, table_list=0x7f6a40012550, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/10.2/sql/sql_insert.cc:1066
      #23 0x00005609455359ac in mysql_execute_command (thd=0x7f6a40000af0) at /data/src/10.2/sql/sql_parse.cc:4159
      #24 0x00005609455410f9 in mysql_parse (thd=0x7f6a40000af0, rawbuf=0x7f6a40012458 "INSERT INTO t1 VALUES (1),(5),(3),(5)", length=37, parser_state=0x7f6a521ba610, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7733
      #25 0x000056094552f425 in dispatch_command (command=COM_QUERY, thd=0x7f6a40000af0, packet=0x7f6a4008d3c1 "INSERT INTO t1 VALUES (1),(5),(3),(5)", packet_length=37, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824
      #26 0x000056094552dea0 in do_command (thd=0x7f6a40000af0) at /data/src/10.2/sql/sql_parse.cc:1377
      #27 0x0000560945683f01 in do_handle_one_connection (connect=0x560947fca970) at /data/src/10.2/sql/sql_connect.cc:1336
      #28 0x0000560945683c6c in handle_one_connection (arg=0x560947fca970) at /data/src/10.2/sql/sql_connect.cc:1241
      #29 0x0000560945e9a144 in pfs_spawn_thread (arg=0x560947fedc50) at /data/src/10.2/storage/perfschema/pfs.cc:1869
      #30 0x00007f6a59e0f4a4 in start_thread (arg=0x7f6a521bb700) at pthread_create.c:456
      #31 0x00007f6a57f43d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Also observed

      Got error 22 when trying to lock mutex keycache->cache_lock at /data/src/10.2/mysys/mf_keycache.c, line 3337
      

      All of debug, non-debug and ASAN builds are affected as examples above show, although the failures on non-debug builds seem less frequent.

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.