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

Server crashes when execute shutdown statement after starting an XA transaction

    XMLWordPrintable

Details

    Description

      SET SESSION wsrep_on = OFF;
      XA START 'xatest';
      SHUTDOWN;
      SELECT SLEEP(3);
      

      Leads to

      10.6.5 b0d38448a176dc990554c7dd5b184c3ebe64be8b (Optimized)

      mysqld: /test/10.6_opt/wsrep-lib/include/wsrep/client_state.hpp:169: virtual wsrep::client_state::~client_state(): Assertion `transaction_.active() == false' failed.
      

      10.6.5 b0d38448a176dc990554c7dd5b184c3ebe64be8b (Optimized)

      Core was generated by `/test/GAL_MD210821-mariadb-10.6.5-linux-x86_64-opt/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 0x1492e0682700 (LWP 1886215))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055ec2815774f in my_write_core (sig=sig@entry=6) at /test/10.6_opt/mysys/stacktrace.c:424
      #2  0x000055ec27be6fd0 in handle_fatal_signal (sig=6) at /test/10.6_opt/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  0x0000149314788859 in __GI_abort () at abort.c:79
      #6  0x0000149314788729 in __assert_fail_base (fmt=0x14931491e588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55ec282186b0 "transaction_.active() == false", file=0x55ec28218678 "/test/10.6_opt/wsrep-lib/include/wsrep/client_state.hpp", line=169, function=<optimized out>) at assert.c:92
      #7  0x0000149314799f36 in __GI___assert_fail (assertion=assertion@entry=0x55ec282186b0 "transaction_.active() == false", file=file@entry=0x55ec28218678 "/test/10.6_opt/wsrep-lib/include/wsrep/client_state.hpp", line=line@entry=169, function=function@entry=0x55ec28218648 "virtual wsrep::client_state::~client_state()") at assert.c:101
      #8  0x000055ec2796a795 in wsrep::client_state::~client_state (this=0x14929c0070e0, __in_chrg=<optimized out>) at /test/10.6_opt/include/mysql/psi/mysql_thread.h:1046
      #9  Wsrep_client_state::~Wsrep_client_state (this=0x14929c0070e0, __in_chrg=<optimized out>) at /test/10.6_opt/sql/wsrep_client_state.h:25
      #10 THD::~THD (this=0x14929c000c58, __in_chrg=<optimized out>) at /test/10.6_opt/sql/sql_class.cc:1673
      #11 0x000055ec2796a7d6 in THD::~THD (this=0x14929c000c58, __in_chrg=<optimized out>) at /test/10.6_opt/sql/sql_class.cc:1673
      #12 0x000055ec27aca709 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/10.6_opt/sql/sql_connect.cc:1459
      #13 0x000055ec27aca8bd in handle_one_connection (arg=arg@entry=0x55ec2a13e058) at /test/10.6_opt/sql/sql_connect.cc:1312
      #14 0x000055ec27e52e6d in pfs_spawn_thread (arg=0x55ec2a7135f8) at /test/10.6_opt/storage/perfschema/pfs.cc:2201
      #15 0x0000149314c97609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #16 0x0000149314885293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.7.0 76149650764ea9660ae05d4987ea6c91534851ab (Debug)

      mysqld: /test/10.7_dbg/wsrep-lib/include/wsrep/client_state.hpp:169: virtual wsrep::client_state::~client_state(): Assertion `transaction_.active() == false' failed.
      

      10.7.0 76149650764ea9660ae05d4987ea6c91534851ab (Debug)

      Core was generated by `/test/GAL_MD080921-mariadb-10.7.0-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 0x149030672700 (LWP 1851106))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055e06d445774 in my_write_core (sig=sig@entry=6) at /test/10.7_dbg/mysys/stacktrace.c:424
      #2  0x000055e06cc3cd3f in handle_fatal_signal (sig=6) at /test/10.7_dbg/sql/signal_handler.cc:345
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x00001490414d7859 in __GI_abort () at abort.c:79
      #6  0x00001490414d7729 in __assert_fail_base (fmt=0x14904166d588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55e06d51a598 "transaction_.active() == false", file=0x55e06d51a560 "/test/10.7_dbg/wsrep-lib/include/wsrep/client_state.hpp", line=169, function=<optimized out>) at assert.c:92
      #7  0x00001490414e8f36 in __GI___assert_fail (assertion=assertion@entry=0x55e06d51a598 "transaction_.active() == false", file=file@entry=0x55e06d51a560 "/test/10.7_dbg/wsrep-lib/include/wsrep/client_state.hpp", line=line@entry=169, function=function@entry=0x55e06d51a530 "virtual wsrep::client_state::~client_state()") at assert.c:101
      #8  0x000055e06c8d630c in wsrep::client_state::~client_state (this=0x148fcc007508, __in_chrg=<optimized out>) at /test/10.7_dbg/sql/sql_class.h:1047
      #9  Wsrep_client_state::~Wsrep_client_state (this=0x148fcc007508, __in_chrg=<optimized out>) at /test/10.7_dbg/sql/wsrep_client_state.h:25
      #10 THD::~THD (this=0x148fcc000db8, __in_chrg=<optimized out>) at /test/10.7_dbg/sql/sql_class.cc:1672
      #11 0x000055e06c8d65f1 in THD::~THD (this=0x148fcc000db8, __in_chrg=<optimized out>) at /test/10.7_dbg/sql/sql_class.cc:1672
      #12 0x000055e06caba79c in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55e07021f338, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1459
      #13 0x000055e06caba8d2 in handle_one_connection (arg=arg@entry=0x55e07021f338) at /test/10.7_dbg/sql/sql_connect.cc:1312
      #14 0x000055e06cf26e45 in pfs_spawn_thread (arg=0x55e070276d78) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201
      #15 0x00001490419e6609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #16 0x00001490415d4293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt), 10.6.5 (dbg), 10.6.5 (opt), 10.7.0 (dbg), 10.7.0 (opt)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt)

      Attachments

        Activity

          People

            jplindst Jan Lindström (Inactive)
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.