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

mysqld got signal 11 Fatal signal 6 while backtracing on parallel show global status

    XMLWordPrintable

Details

    Description

      After upgrading from 10.3.22 to 10.4.12 I have encountered a strange issue - if two or more ' show global status where ...' are issued in parallel mysql crashes

      Something like:

      #!/bin/bash
           mysql -e 'show global status where Variable_name="Com_delete"' &
           mysql -e 'show global status where Variable_name="Com_insert"' &
           mysql -e 'show global status where Variable_name="Com_select"' &
      

      crashes the server reliably:

      200316 20:09:03 [ERROR] mysqld got signal 11 ;
      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.4.12-MariaDB-log
      key_buffer_size=209715200
      read_buffer_size=4194304
      max_used_connections=3
      max_threads=10002
      thread_count=20
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 82388318 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7f7dba213dc8
      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 = 0x7f7dba69f528 thread_stack 0x49000
      *** buffer overflow detected ***: /usr/sbin/mysqld terminated
      Fatal signal 6 while backtracing
      

      If you execute each query sequentially there are no problems.

      The coredump looks like:

      Core was generated by `/usr/sbin/mysqld'.
      Program terminated with signal SIGABRT, Aborted.
      #0  0x00007f8dbf36d160 in raise () from /lib64/libc.so.6
       
      (gdb) bt
      #0  0x00007f8dbf36d160 in raise () from /lib64/libc.so.6
      #1  0x00007f8dbf36e81f in abort () from /lib64/libc.so.6
      #2  0x00007f8dbf3b04a7 in __libc_message () from /lib64/libc.so.6
      #3  0x00007f8dbf440f6e in __fortify_fail_abort () from /lib64/libc.so.6
      #4  0x00007f8dbf440fa1 in __fortify_fail () from /lib64/libc.so.6
      #5  0x00007f8dbf43ee50 in __chk_fail () from /lib64/libc.so.6
      #6  0x00007f8dbf440eaa in __fdelt_warn () from /lib64/libc.so.6
      #7  0x000055f6b4164475 in my_addr_resolve (ptr=<optimized out>, loc=loc@entry=0x7f7dba699900) at /usr/src/debug/MariaDB-10.4.12/src_0/mysys/my_addr_resolve.c:234
      #8  0x000055f6b4149ba3 in print_with_addr_resolve (n=<optimized out>, addrs=0x7f7dba699920) at /usr/src/debug/MariaDB-10.4.12/src_0/mysys/stacktrace.c:254
      #9  my_print_stacktrace (stack_bottom=<optimized out>, thread_stack=<optimized out>, silent=silent@entry=0 '\000') at /usr/src/debug/MariaDB-10.4.12/src_0/mysys/stacktrace.c:273
      #10 0x000055f6b3bbd745 in handle_fatal_signal (sig=11) at /usr/src/debug/MariaDB-10.4.12/src_0/sql/signal_handler.cc:206
      #11 <signal handler called>
      #12 0x00007f8d9e89b55a in read_partitioned_counter () from /usr/lib64/mysql/plugin/ha_tokudb.so
      #13 0x00007f8d9e83fc2d in ?? () from /usr/lib64/mysql/plugin/ha_tokudb.so
      #14 0x000055f6b3a16752 in show_status_array (thd=thd@entry=0x7f7dba213dc8, wild=wild@entry=0x0, variables=0x7f8dbe0684d8, scope=scope@entry=SHOW_OPT_GLOBAL,
          status_var=status_var@entry=0x7f7dba69b260, prefix=prefix@entry=0x55f6b43291b5 "", table=0x7f7dba25e020, ucase_names=false, cond=0x7f7dba247e00)
          at /usr/src/debug/MariaDB-10.4.12/src_0/sql/sql_show.cc:3804
      #15 0x000055f6b3a199b3 in fill_status (thd=0x7f7dba213dc8, tables=0x7f7dba2482f8, cond=<optimized out>) at /usr/src/debug/MariaDB-10.4.12/src_0/sql/sql_show.cc:7946
      #16 0x000055f6b3a1f072 in get_schema_tables_result (join=join@entry=0x7f7dba248db0, executed_place=executed_place@entry=PROCESSED_BY_JOIN_EXEC)
          at /usr/src/debug/MariaDB-10.4.12/src_0/sql/sql_show.cc:8914
      #17 0x000055f6b3a052cd in JOIN::exec_inner (this=this@entry=0x7f7dba248db0) at /usr/src/debug/MariaDB-10.4.12/src_0/sql/sql_select.cc:4409
      #18 0x000055f6b3a058a3 in JOIN::exec (this=this@entry=0x7f7dba248db0) at /usr/src/debug/MariaDB-10.4.12/src_0/sql/sql_select.cc:4234
      #19 0x000055f6b3a03c61 in mysql_select (thd=0x7f7dba213dc8, tables=0x7f7dba2482f8, wild_num=0, fields=..., conds=<optimized out>, og_num=0, order=0x0, group=0x0, having=0x0,
          proc_param=0x0, select_options=2684619520, result=0x7f7dba248d88, unit=0x7f7dba217b30, select_lex=0x7f7dba218328) at /usr/src/debug/MariaDB-10.4.12/src_0/sql/sql_select.cc:4666
      #20 0x000055f6b3a04611 in handle_select (thd=0x7f7dba213dc8, lex=0x7f7dba217a70, result=0x7f7dba248d88, setup_tables_done_option=0)
          at /usr/src/debug/MariaDB-10.4.12/src_0/sql/sql_select.cc:408
      #21 0x000055f6b39a0c21 in execute_sqlcom_select (thd=0x7f7dba213dc8, all_tables=0x7f7dba2482f8) at /usr/src/debug/MariaDB-10.4.12/src_0/sql/sql_parse.cc:6360
      #22 0x000055f6b39ae27c in mysql_execute_command (thd=0x7f7dba213dc8) at /usr/src/debug/MariaDB-10.4.12/src_0/sql/sql_parse.cc:6394
      #23 0x000055f6b39b07da in mysql_parse (thd=0x7f7dba213dc8, rawbuf=<optimized out>, length=51, parser_state=0x7f7dba69e850, is_com_multi=<optimized out>, is_next_command=<optimized out>)
          at /usr/src/debug/MariaDB-10.4.12/src_0/sql/sql_parse.cc:7901
      #24 0x000055f6b39b2d71 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f7dba213dc8,
          packet=packet@entry=0x7f7dba231f89 "show global status where Variable_name=\"Com_delete\"", packet_length=packet_length@entry=51, is_com_multi=is_com_multi@entry=false,
          is_next_command=is_next_command@entry=false) at /usr/src/debug/MariaDB-10.4.12/src_0/sql/sql_parse.cc:1841
      #25 0x000055f6b39b4648 in do_command (thd=0x7f7dba213dc8) at /usr/src/debug/MariaDB-10.4.12/src_0/sql/sql_parse.cc:1359
      #26 0x000055f6b3a907fe in do_handle_one_connection (connect=connect@entry=0x7f8dbe044c68) at /usr/src/debug/MariaDB-10.4.12/src_0/sql/sql_connect.cc:1412
      #27 0x000055f6b3a908bd in handle_one_connection (arg=0x7f8dbe044c68) at /usr/src/debug/MariaDB-10.4.12/src_0/sql/sql_connect.cc:1316
      #28 0x00007f8dc18ab569 in start_thread () from /lib64/libpthread.so.0
      #29 0x00007f8dbf42f9ef in clone () from /lib64/libc.so.6
      

      (full backtrace in attachment)

      Attachments

        1. bt.txt
          19 kB
        2. bt2.txt
          5 kB

        Activity

          People

            serg Sergei Golubchik
            Roze Reinis Rozitis
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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