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

Galera node crashes when inserting rows to a virtual column created with the DAYNAME function

    XMLWordPrintable

Details

    Description

      Galera node crashes when inserting rows to a virtual column created with the DAYNAME function.

      PS: This stack is almost similar to MDEV-24176, but the crash occurs on the secondary node, and the primary node becomes unstable.

      CREATE TABLE t1 (c1 INT NOT NULL, c2 CHAR(10) AS (CONCAT('',DAYNAME('2020-02-05')))) COLLATE utf8_bin;
      INSERT INTO t1 (c1) VALUES (0);
      INSERT INTO t1 (c1) VALUES (1);
      SELECT SLEEP(10);
      show status like '%wsrep%st%';
      

      Leads to:

      10.8.1 307b2991d61ff6734d858bdb211a88d1c8607a36 (Debug)

      Core was generated by `/test/GAL_MD070222-mariadb-10.8.1-linux-x86_64-dbg/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 0x150cc8132700 (LWP 4048716))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055922301d5ed in my_write_core (sig=sig@entry=11) at /test/10.8_dbg/mysys/stacktrace.c:424
      #2  0x0000559222803ce3 in handle_fatal_signal (sig=11) at /test/10.8_dbg/sql/signal_handler.cc:345
      #3  <signal handler called>
      #4  0x00005592223e0893 in Item_args::walk_args (arg=0x0, walk_subquery=false, processor=<optimized out>, this=0x150cb40306a0) at /test/10.8_dbg/sql/item.h:2741
      #5  Item_func_or_sum::walk (this=0x150cb4030630, processor=<optimized out>, walk_subquery=false, arg=0x0) at /test/10.8_dbg/sql/item.h:5437
      #6  0x0000559222625bf7 in fix_session_vcol_expr (thd=thd@entry=0x150c5c000ff8, vcol=0x150cb40306f8) at /test/10.8_dbg/sql/table.cc:3622
      #7  0x0000559222464e9a in TABLE::fix_vcol_exprs (this=0x150cb402eb98, thd=thd@entry=0x150c5c000ff8) at /test/10.8_dbg/sql/sql_base.cc:5442
      #8  0x000055922246556a in fix_all_session_vcol_exprs (tables=0x150c5c0233a8, thd=0x150c5c000ff8) at /test/10.8_dbg/sql/sql_base.cc:5478
      #9  lock_tables (thd=thd@entry=0x150c5c000ff8, tables=0x150c5c0233a8, count=<optimized out>, flags=flags@entry=0) at /test/10.8_dbg/sql/sql_base.cc:5662
      #10 0x000055922246735f in open_and_lock_tables (thd=0x150c5c000ff8, options=..., tables=<optimized out>, derived=derived@entry=false, flags=flags@entry=0, 
          prelocking_strategy=prelocking_strategy@entry=0x150cc8130220) at /test/10.8_dbg/sql/sql_base.cc:5274
      #11 0x000055922299bbb2 in open_and_lock_tables (flags=0, derived=false, tables=<optimized out>, thd=<optimized out>) at /test/10.8_dbg/sql/sql_base.h:509
      #12 Rows_log_event::do_apply_event (this=0x150c5c025318, rgi=0x150c5c021640) at /test/10.8_dbg/sql/log_event_server.cc:5820
      #13 0x0000559222b80d78 in Log_event::apply_event (rgi=0x150c5c021640, this=0x150c5c025318) at /test/10.8_dbg/sql/log_event.h:1566
      #14 wsrep_apply_events (thd=thd@entry=0x150c5c000ff8, rli=<optimized out>, events_buf=<optimized out>, buf_len=0) at /test/10.8_dbg/sql/wsrep_applier.cc:208
      #15 0x0000559222b63b91 in apply_events (thd=thd@entry=0x150c5c000ff8, rli=<optimized out>, data=..., err=...) at /test/10.8_dbg/wsrep-lib/include/wsrep/buffer.hpp:48
      #16 0x0000559222b6479e in Wsrep_applier_service::apply_write_set (this=0x150cc8131d10, ws_meta=..., data=..., err=...) at /test/10.8_dbg/sql/wsrep_high_priority_service.cc:577
      #17 0x0000559223183753 in apply_write_set (server_state=..., high_priority_service=..., ws_handle=..., ws_meta=..., data=...) at /test/10.8_dbg/wsrep-lib/src/server_state.cpp:327
      #18 0x000055922318469f in wsrep::server_state::on_apply (this=<optimized out>, high_priority_service=..., ws_handle=..., ws_meta=..., data=...) at /test/10.8_dbg/wsrep-lib/src/server_state.cpp:1114
      #19 0x00005592231949a2 in wsrep::high_priority_service::apply (data=..., ws_meta=..., ws_handle=..., this=0x150cc8131d10) at /test/10.8_dbg/wsrep-lib/include/wsrep/high_priority_service.hpp:47
      #20 (anonymous namespace)::apply_cb (ctx=ctx@entry=0x150cc8131d10, wsh=wsh@entry=0x150cc8130d20, flags=flags@entry=65, buf=buf@entry=0x150cc8130d30, meta=meta@entry=0x150cc8130fe0, 
          exit_loop=exit_loop@entry=0x150cc8130f9f) at /test/10.8_dbg/wsrep-lib/src/wsrep_provider_v26.cpp:507
      #21 0x0000150cd3db99b5 in galera::TrxHandleSlave::apply (this=this@entry=0x150c5c0275e0, recv_ctx=recv_ctx@entry=0x150cc8131d10, 
          apply_cb=0x55922319481f <(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=@0x150cc8130f9f: false) at /test/10.4_galera/galera/src/trx_handle.cpp:396
      #22 0x0000150cd3dd014e in galera::ReplicatorSMM::apply_trx (this=0x559224c651b0, recv_ctx=0x150cc8131d10, ts=...) at /test/10.4_galera/galera/src/replicator_smm.cpp:516
      #23 0x0000150cd3dd4378 in galera::ReplicatorSMM::process_trx (this=0x559224c651b0, recv_ctx=0x150cc8131d10, ts_ptr=...) at /test/10.4_galera/galera/src/replicator_smm.cpp:2136
      #24 0x0000150cd3e05e59 in galera::GcsActionSource::process_writeset (this=0x559224c5dd40, recv_ctx=0x150cc8131d10, act=..., exit_loop=@0x150cc813191f: false)
          at /test/10.4_galera/galera/src/gcs_action_source.cpp:62
      #25 0x0000150cd3e068a3 in galera::GcsActionSource::dispatch (this=0x559224c5dd40, recv_ctx=0x150cc8131d10, act=..., exit_loop=<optimized out>) at /test/10.4_galera/galera/src/gcs_action_source.cpp:110
      #26 0x0000150cd3e06e62 in galera::GcsActionSource::process (this=0x559224c5dd40, recv_ctx=0x150cc8131d10, exit_loop=@0x150cc813191f: false) at /test/10.4_galera/galera/src/gcs_action_source.cpp:186
      #27 0x0000150cd3dd17f0 in galera::ReplicatorSMM::async_recv (this=0x559224c651b0, recv_ctx=0x150cc8131d10) at /test/10.4_galera/galera/src/replicator_smm.cpp:402
      #28 0x0000150cd3da5e91 in galera_recv (gh=<optimized out>, recv_ctx=<optimized out>) at /test/10.4_galera/galera/src/wsrep_provider.cpp:263
      #29 0x000055922319567a in wsrep::wsrep_provider_v26::run_applier (this=<optimized out>, applier_ctx=<optimized out>) at /test/10.8_dbg/wsrep-lib/src/wsrep_provider_v26.cpp:858
      #30 0x0000559222b833c3 in wsrep_replication_process (thd=0x150c5c000ff8, arg=<optimized out>) at /test/10.8_dbg/sql/wsrep_server_state.h:51
      #31 0x0000559222b7071d in start_wsrep_THD (arg=arg@entry=0x5592252ef1e0) at /test/10.8_dbg/sql/wsrep_mysqld.h:573
      #32 0x0000559222b015dd in pfs_spawn_thread (arg=0x5592253dbc98) at /test/10.8_dbg/storage/perfschema/pfs.cc:2201
      #33 0x0000150cd89b5609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #34 0x0000150cd85a3293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.8.1 (dbg)

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              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.