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

Galera crashes when a user is killed while the backup lock is active

    XMLWordPrintable

Details

    Description

      BACKUP LOCK t;
      KILL USER test@localhost;
      

      Leads to:

      10.4.25 446ec646511adf4327f9f5d9414fc4cb75c8161c (Optimized)

      Core was generated by `/test/GAL_MD020322-mariadb-10.4.25-linux-x86_64-opt/bin/mysqld --defaults-file='.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x1535f57e7700 (LWP 1179195))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000056106c3faa5f in my_write_core (sig=sig@entry=11) at /test/10.4_opt/mysys/stacktrace.c:386
      #2  0x000056106be72098 in handle_fatal_signal (sig=11) at /test/10.4_opt/sql/signal_handler.cc:356
      #3  <signal handler called>
      #4  __strnlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
      #5  0x000056106c45adbf in process_str_arg (cs=cs@entry=0x56106cc305a0 <my_charset_utf8_general_ci>, to=to@entry=0x1535f57e485a "A\210\032/\304`\200\310\366k\020V", end=end@entry=0x1535f57e4a3f "", width=width@entry=256, par=0x1 <error: Cannot access memory at address 0x1>, print_type=0, nice_cut=0 '\000') at /test/10.4_opt/strings/my_vsnprintf.c:259
      #6  0x000056106c45bd3e in my_vsnprintf_ex (cs=0x56106cc305a0 <my_charset_utf8_general_ci>, to=0x1535f57e485a "A\210\032/\304`\200\310\366k\020V", to@entry=0x1535f57e4840 "Operation test failed for A\210\032/\304`\200\310\366k\020V", n=n@entry=512, fmt=0x56106c5c861d "s", ap=ap@entry=0x1535f57e4828) at /test/10.4_opt/strings/my_vsnprintf.c:696
      #7  0x000056106c3f1896 in my_error (nr=nr@entry=1396, MyFlags=MyFlags@entry=0) at /test/10.4_opt/mysys/my_error.c:121
      #8  0x000056106bc6fec9 in sql_kill_user (state=KILL_CONNECTION_HARD, user=0x1535bc010098, thd=0x1535bc000c48) at /test/10.4_opt/sql/sql_parse.cc:9398
      #9  mysql_execute_command (thd=0x1535bc000c48) at /test/10.4_opt/sql/sql_parse.cc:5617
      #10 0x000056106bc70543 in mysql_parse (thd=thd@entry=0x1535bc000c48, rawbuf=rawbuf@entry=0x1535bc00fff0 "kill USER test@localhost", length=length@entry=24, parser_state=parser_state@entry=0x1535f57e64d0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_opt/sql/sql_parse.cc:7995
      #11 0x000056106bc70eba in wsrep_mysql_parse (thd=0x1535bc000c48, rawbuf=0x1535bc00fff0 "kill USER test@localhost", length=24, parser_state=0x1535f57e64d0, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_parse.cc:7799
      #12 0x000056106bc74a92 in dispatch_command (command=COM_QUERY, thd=0x1535bc000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_class.h:1201
      #13 0x000056106bc752b0 in do_command (thd=0x1535bc000c48) at /test/10.4_opt/sql/sql_parse.cc:1373
      #14 0x000056106bd6b19e in do_handle_one_connection (connect=connect@entry=0x56106e070e98) at /test/10.4_opt/sql/sql_connect.cc:1420
      #15 0x000056106bd6b2cf in handle_one_connection (arg=0x56106e070e98) at /test/10.4_opt/sql/sql_connect.cc:1316
      #16 0x0000153639294609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #17 0x0000153638e82293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.5.16 a1965b80e1ba7811a52fe54fc62a74879551598e (Debug)

      mysqld: /test/10.5_dbg/sql/sql_class.cc:1552: void THD::cleanup(): Assertion `open_tables == __null' failed.
      

      10.5.16 a1965b80e1ba7811a52fe54fc62a74879551598e (Debug)

      Core was generated by `/test/GAL_MD020322-mariadb-10.5.16-linux-x86_64-dbg/bin/mysqld --defaults-file='.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x151810245800 (LWP 3845401))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000056074dcf6eb6 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:424
      #2  0x000056074d441871 in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:344
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000151810422859 in __GI_abort () at abort.c:79
      #6  0x0000151810422729 in __assert_fail_base (fmt=0x1518105b8588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x56074de8d4d1 "open_tables == __null", file=0x56074de8ad98 "/test/10.5_dbg/sql/sql_class.cc", line=1552, function=<optimized out>) at assert.c:92
      #7  0x0000151810433f36 in __GI___assert_fail (assertion=assertion@entry=0x56074de8d4d1 "open_tables == __null", file=file@entry=0x56074de8ad98 "/test/10.5_dbg/sql/sql_class.cc", line=line@entry=1552, function=function@entry=0x56074de8d29e "void THD::cleanup()") at assert.c:101
      #8  0x000056074d0fffdf in THD::cleanup (this=this@entry=0x560751c35bb8) at /test/10.5_dbg/sql/sql_class.cc:1552
      #9  0x000056074d101588 in THD::free_connection (this=this@entry=0x560751c35bb8) at /test/10.5_dbg/sql/sql_class.cc:1619
      #10 0x000056074d10af1f in THD::~THD (this=0x560751c35bb8, __in_chrg=<optimized out>) at /test/10.5_dbg/sql/sql_class.cc:1698
      #11 0x000056074d10b211 in THD::~THD (this=0x560751c35bb8, __in_chrg=<optimized out>) at /test/10.5_dbg/sql/sql_class.cc:1668
      #12 0x000056074d0b6917 in grant_init () at /test/10.5_dbg/sql/sql_acl.cc:7811
      #13 0x000056074d05eeed in mysqld_main (argc=<optimized out>, argv=<optimized out>) at /test/10.5_dbg/sql/mysqld.cc:5521
      #14 0x000056074d050b36 in main (argc=<optimized out>, argv=<optimized out>) at /test/10.5_dbg/sql/main.cc:25
      

      Bug confirmed present in:
      MariaDB: 10.4.25 (dbg), 10.4.25 (opt), 10.5.16 (dbg)

      Attachments

        Activity

          People

            janlindstrom Jan Lindström
            ramesh Ramesh Sivaraman
            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.