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

CTAS with non-empty table is crashing Galera secondary nodes

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.5
    • N/A
    • Galera
    • None

    Description

      CREATE TABLE  t1(id int);
      INSERT INTO t1 SELECT seq FROM seq_1_to_10 ;
      CREATE TABLE t2 AS SELECT * FROM t1;
      

      Leads to

      10.5.24 de31ca6a212118bd29876f964497050e446bda02 (Debug)

      Core was generated by `/test/GAL_MD221123-mariadb-10.5.24-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 0x14659c1ae700 (LWP 1977427))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      56	../sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory.
      [Current thread is 1 (Thread 0x14659c1ae700 (LWP 1977427))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000558c1e6ade37 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:424
      #2  0x0000558c1dee8d44 in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:357
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x00001465f81d6859 in __GI_abort () at abort.c:79
      #6  0x00001465f81d6729 in __assert_fail_base (fmt=0x1465f836c588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
          assertion=0x558c1ed8bb88 "state() == s_executing || state() == s_preparing || state() == s_prepared || state() == s_must_abort || state() == s_aborting || state() == s_cert_failed || state() == s_must_replay", file=0x558c1ed8b3a8 "/test/10.5_dbg/wsrep-lib/src/transaction.cpp", line=659, function=<optimized out>) at assert.c:92
      #7  0x00001465f81e7fd6 in __GI___assert_fail (
          assertion=assertion@entry=0x558c1ed8bb88 "state() == s_executing || state() == s_preparing || state() == s_prepared || state() == s_must_abort || state() == s_aborting || state() == s_cert_failed || state() == s_must_replay", file=file@entry=0x558c1ed8b3a8 "/test/10.5_dbg/wsrep-lib/src/transaction.cpp", line=line@entry=659, function=function@entry=0x558c1ed8bb58 "int wsrep::transaction::before_rollback()")
          at assert.c:101
      #8  0x0000558c1e816504 in wsrep::transaction::before_rollback (this=this@entry=0x146520007300) at /test/10.5_dbg/wsrep-lib/src/transaction.cpp:738
      #9  0x0000558c1e7fce87 in wsrep::client_state::before_rollback (this=this@entry=0x146520007298) at /test/10.5_dbg/wsrep-lib/src/client_state.cpp:411
      #10 0x0000558c1deed7bc in wsrep_before_rollback (all=false, thd=0x146520000f88) at /test/10.5_dbg/sql/sql_class.h:5261
      #11 ha_rollback_trans (thd=thd@entry=0x146520000f88, all=all@entry=false) at /test/10.5_dbg/sql/handler.cc:2094
      #12 0x0000558c1deee45a in ha_commit_trans (thd=thd@entry=0x146520000f88, all=all@entry=false) at /test/10.5_dbg/sql/handler.cc:1887
      #13 0x0000558c1dda3f44 in trans_commit_stmt (thd=thd@entry=0x146520000f88) at /test/10.5_dbg/sql/transaction.cc:472
      #14 0x0000558c1e062e19 in rows_event_stmt_cleanup (thd=0x146520000f88, rgi=0x1465200204b0) at /test/10.5_dbg/sql/log_event_server.cc:5909
      #15 Rows_log_event::do_apply_event (this=0x146520024568, rgi=0x1465200204b0) at /test/10.5_dbg/sql/log_event_server.cc:5833
      #16 0x0000558c1e1fb96b in Log_event::apply_event (rgi=0x1465200204b0, this=0x146520024568) at /test/10.5_dbg/sql/log_event.h:1488
      #17 wsrep_apply_events (thd=thd@entry=0x146520000f88, rli=<optimized out>, events_buf=<optimized out>, buf_len=0) at /test/10.5_dbg/sql/wsrep_applier.cc:208
      #18 0x0000558c1e1e1365 in apply_events (thd=thd@entry=0x146520000f88, rli=<optimized out>, data=..., err=...) at /test/10.5_dbg/wsrep-lib/include/wsrep/buffer.hpp:48
      #19 0x0000558c1e1e1dea in Wsrep_applier_service::apply_write_set (this=0x14659c1adc00, ws_meta=..., data=..., err=...) at /test/10.5_dbg/sql/wsrep_high_priority_service.cc:595
      #20 0x0000558c1e8108be in apply_write_set (server_state=..., high_priority_service=..., ws_handle=..., ws_meta=..., data=...) at /test/10.5_dbg/wsrep-lib/src/server_state.cpp:332
      #21 0x0000558c1e81180b in wsrep::server_state::on_apply (this=<optimized out>, high_priority_service=..., ws_handle=..., ws_meta=..., data=...) at /test/10.5_dbg/wsrep-lib/src/server_state.cpp:1128
      #22 0x0000558c1e81ed9c in wsrep::high_priority_service::apply (data=..., ws_meta=..., ws_handle=..., this=0x14659c1adc00) at /test/10.5_dbg/wsrep-lib/include/wsrep/high_priority_service.hpp:47
      #23 (anonymous namespace)::apply_cb (ctx=ctx@entry=0x14659c1adc00, wsh=wsh@entry=0x14659c1acc30, flags=flags@entry=65, buf=buf@entry=0x14659c1acc40, meta=meta@entry=0x14659c1acef0, 
          exit_loop=exit_loop@entry=0x14659c1aceaf) at /test/10.5_dbg/wsrep-lib/src/wsrep_provider_v26.cpp:507
      #24 0x00001465f7c398f5 in galera::TrxHandleSlave::apply (this=this@entry=0x146520021000, recv_ctx=recv_ctx@entry=0x14659c1adc00, 
          apply_cb=0x558c1e81ec19 <(anonymous namespace)::apply_cb(void*, wsrep_ws_handle_t const*, uint32_t, wsrep_buf_t const*, wsrep_trx_meta_t const*, wsrep_bool_t*)>, meta=..., 
          exit_loop=exit_loop@entry=@0x14659c1aceaf: false) at /test/mtest/11.3_galera/galera/src/trx_handle.cpp:396
      #25 0x00001465f7c4f9de in galera::ReplicatorSMM::apply_trx (this=0x558c20a66240, recv_ctx=0x14659c1adc00, ts=...) at /test/mtest/11.3_galera/galera/src/replicator_smm.cpp:516
      #26 0x00001465f7c53ff8 in galera::ReplicatorSMM::process_trx (this=0x558c20a66240, recv_ctx=0x14659c1adc00, ts_ptr=...) at /test/mtest/11.3_galera/galera/src/replicator_smm.cpp:2124
      #27 0x00001465f7c859f9 in galera::GcsActionSource::process_writeset (this=0x558c20a5f1f0, recv_ctx=0x14659c1adc00, act=..., exit_loop=@0x14659c1ad82f: false)
          at /test/mtest/11.3_galera/galera/src/gcs_action_source.cpp:62
      #28 0x00001465f7c86453 in galera::GcsActionSource::dispatch (this=0x558c20a5f1f0, recv_ctx=0x14659c1adc00, act=..., exit_loop=<optimized out>) at /test/mtest/11.3_galera/galera/src/gcs_action_source.cpp:110
      #29 0x00001465f7c86a12 in galera::GcsActionSource::process (this=0x558c20a5f1f0, recv_ctx=0x14659c1adc00, exit_loop=@0x14659c1ad82f: false) at /test/mtest/11.3_galera/galera/src/gcs_action_source.cpp:186
      #30 0x00001465f7c51080 in galera::ReplicatorSMM::async_recv (this=0x558c20a66240, recv_ctx=0x14659c1adc00) at /test/mtest/11.3_galera/galera/src/replicator_smm.cpp:402
      #31 0x00001465f7c26031 in galera_recv (gh=<optimized out>, recv_ctx=<optimized out>) at /test/mtest/11.3_galera/galera/src/wsrep_provider.cpp:264
      #32 0x0000558c1e81fa74 in wsrep::wsrep_provider_v26::run_applier (this=<optimized out>, applier_ctx=<optimized out>) at /test/10.5_dbg/wsrep-lib/src/wsrep_provider_v26.cpp:858
      #33 0x0000558c1e1fe344 in wsrep_replication_process (thd=0x146520000f88, arg=<optimized out>) at /test/10.5_dbg/sql/wsrep_server_state.h:51
      #34 0x0000558c1e1ebc64 in start_wsrep_THD (arg=0x558c212c2130) at /test/10.5_dbg/sql/wsrep_mysqld.h:524
      #35 0x00001465f86e7609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #36 0x00001465f82d3133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Issue Links

          Activity

            People

              janlindstrom Jan Lindström
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.