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
- duplicates
-
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if()
-
- Closed
-
- relates to
-
MDEV-28034 SIGSEGV in Item_args::walk_args and libstdc++ __cxa_pure_virtual terminate/SIGABRT in Item::check_type_scalar
-
- Closed
-
Slightly different stack using following test case.
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
56 ../sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory.
[Current thread is 1 (Thread 0x14d1c5545700 (LWP 16356))]
(gdb) bt
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1 0x000055a405e305c1 in my_write_core (sig=sig@entry=11) at /test/10.8_dbg/mysys/stacktrace.c:424
#2 0x000055a405616ce3 in handle_fatal_signal (sig=11) at /test/10.8_dbg/sql/signal_handler.cc:345
#3 <signal handler called>
#4 0x000055a4051f3893 in Item_args::walk_args (arg=0x14d1c553f6b0, walk_subquery=false, processor=<optimized out>, this=0x14d1ec0301f0) at /test/10.8_dbg/sql/item.h:2741
#5 Item_func_or_sum::walk (this=0x14d1ec030180, processor=<optimized out>, walk_subquery=false, arg=0x14d1c553f6b0) at /test/10.8_dbg/sql/item.h:5437
#6 0x000055a4053f8da7 in mysql_prepare_create_table (thd=thd@entry=0x14d1a0000ff8, create_info=create_info@entry=0x14d1c5542810, alter_info=alter_info@entry=0x14d1c5542720,
db_options=db_options@entry=0x14d1c553f7d8, file=file@entry=0x14d1a00103c0, key_info_buffer=key_info_buffer@entry=0x14d1c55401f0, key_count=0x14d1c55401e0, create_table_mode=-2, db=..., table_name=...)
at /test/10.8_dbg/sql/sql_table.cc:3689
#7 0x000055a4053fa460 in mysql_create_frm_image (thd=thd@entry=0x14d1a0000ff8, db=..., table_name=..., create_info=create_info@entry=0x14d1c5542810, alter_info=alter_info@entry=0x14d1c5542720,
create_table_mode=create_table_mode@entry=-2, key_info=0x14d1c55401f0, key_count=0x14d1c55401e0, frm=0x14d1c5540210) at /test/10.8_dbg/sql/sql_table.cc:4275
#8 0x000055a4053fb8fd in create_table_impl (thd=thd@entry=0x14d1a0000ff8, ddl_log_state_create=ddl_log_state_create@entry=0x0, ddl_log_state_rm=<optimized out>, ddl_log_state_rm@entry=0x0, orig_db=...,
orig_table_name=..., db=..., table_name=..., path=..., options=..., create_info=0x14d1c5542810, alter_info=0x14d1c5542720, create_table_mode=-2, is_trans=0x0, key_info=0x14d1c55401f0,
key_count=0x14d1c55401e0, frm=0x14d1c5540210) at /test/10.8_dbg/sql/sql_table.cc:4587
#9 0x000055a405401dcd in mysql_alter_table (thd=thd@entry=0x14d1a0000ff8, new_db=new_db@entry=0x14d1a0005ca0, new_name=new_name@entry=0x14d1a00060b8, create_info=create_info@entry=0x14d1c5542810,
table_list=<optimized out>, table_list@entry=0x14d1a000f728, alter_info=alter_info@entry=0x14d1c5542720, order_num=0, order=0x0, ignore=false, if_exists=false) at /test/10.8_dbg/sql/sql_alter.h:302
#10 0x000055a4054934c7 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x14d1a0000ff8) at /test/10.8_dbg/sql/structs.h:568
#11 0x000055a40531664f in mysql_execute_command (thd=thd@entry=0x14d1a0000ff8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.8_dbg/sql/sql_parse.cc:5988
#12 0x000055a4052fd08f in mysql_parse (thd=0x14d1a0000ff8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14d1c55436c0) at /test/10.8_dbg/sql/sql_parse.cc:8027
#13 0x000055a4057b6e4d in Query_log_event::do_apply_event (this=0x14d1a0022908, rgi=0x14d1a0021640, query_arg=0x14d1a0027ae3 "ALTER TABLE t ADD KEY(a)", q_len_arg=<optimized out>)
at /test/10.8_dbg/sql/sql_class.h:1362
#14 0x000055a4057b7ad4 in Query_log_event::do_apply_event (this=<optimized out>, rgi=<optimized out>) at /test/10.8_dbg/sql/log_event_server.cc:1613
#15 0x000055a405993d78 in Log_event::apply_event (rgi=0x14d1a0021640, this=0x14d1a0022908) at /test/10.8_dbg/sql/log_event.h:1566
#16 wsrep_apply_events (thd=thd@entry=0x14d1a0000ff8, rli=<optimized out>, events_buf=<optimized out>, buf_len=0) at /test/10.8_dbg/sql/wsrep_applier.cc:208
#17 0x000055a405976b91 in apply_events (thd=thd@entry=0x14d1a0000ff8, rli=<optimized out>, data=..., err=...) at /test/10.8_dbg/wsrep-lib/include/wsrep/buffer.hpp:48
#18 0x000055a4059772b1 in Wsrep_high_priority_service::apply_toi (this=0x14d1c5544d10, ws_meta=..., data=..., err=...) at /test/10.8_dbg/sql/wsrep_high_priority_service.cc:416
#19 0x000055a405f97519 in apply_toi (data=..., ws_meta=..., ws_handle=..., high_priority_service=..., provider=...) at /test/10.8_dbg/wsrep-lib/src/server_state.cpp:461
#20 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:1103
#21 0x000055a405fa7972 in wsrep::high_priority_service::apply (data=..., ws_meta=..., ws_handle=..., this=0x14d1c5544d10) at /test/10.8_dbg/wsrep-lib/include/wsrep/high_priority_service.hpp:47
#22 (anonymous namespace)::apply_cb (ctx=ctx@entry=0x14d1c5544d10, wsh=wsh@entry=0x14d1c5543d20, flags=flags@entry=69, buf=buf@entry=0x14d1c5543d30, meta=meta@entry=0x14d1c5543fe0,
exit_loop=exit_loop@entry=0x14d1c5543f9f) at /test/10.8_dbg/wsrep-lib/src/wsrep_provider_v26.cpp:507
#23 0x000014d2127bc9b5 in galera::TrxHandleSlave::apply (this=this@entry=0x14d1a00274b0, recv_ctx=recv_ctx@entry=0x14d1c5544d10,
apply_cb=0x55a405fa77ef <(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=@0x14d1c5543f9f: false) at /test/10.4_galera/galera/src/trx_handle.cpp:396
#24 0x000014d2127d314e in galera::ReplicatorSMM::apply_trx (this=0x55a40827f1b0, recv_ctx=0x14d1c5544d10, ts=...) at /test/10.4_galera/galera/src/replicator_smm.cpp:516
#25 0x000014d2127d7378 in galera::ReplicatorSMM::process_trx (this=0x55a40827f1b0, recv_ctx=0x14d1c5544d10, ts_ptr=...) at /test/10.4_galera/galera/src/replicator_smm.cpp:2136
#26 0x000014d212808e59 in galera::GcsActionSource::process_writeset (this=0x55a408277d40, recv_ctx=0x14d1c5544d10, act=..., exit_loop=@0x14d1c554491f: false)
at /test/10.4_galera/galera/src/gcs_action_source.cpp:62
#27 0x000014d2128098a3 in galera::GcsActionSource::dispatch (this=0x55a408277d40, recv_ctx=0x14d1c5544d10, act=..., exit_loop=<optimized out>) at /test/10.4_galera/galera/src/gcs_action_source.cpp:110
#28 0x000014d212809e62 in galera::GcsActionSource::process (this=0x55a408277d40, recv_ctx=0x14d1c5544d10, exit_loop=@0x14d1c554491f: false) at /test/10.4_galera/galera/src/gcs_action_source.cpp:186
#29 0x000014d2127d47f0 in galera::ReplicatorSMM::async_recv (this=0x55a40827f1b0, recv_ctx=0x14d1c5544d10) at /test/10.4_galera/galera/src/replicator_smm.cpp:402
#30 0x000014d2127a8e91 in galera_recv (gh=<optimized out>, recv_ctx=<optimized out>) at /test/10.4_galera/galera/src/wsrep_provider.cpp:263
#31 0x000055a405fa864a 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
#32 0x000055a4059963c3 in wsrep_replication_process (thd=0x14d1a0000ff8, arg=<optimized out>) at /test/10.8_dbg/sql/wsrep_server_state.h:51
#33 0x000055a40598371d in start_wsrep_THD (arg=arg@entry=0x55a4089093c0) at /test/10.8_dbg/sql/wsrep_mysqld.h:573
#34 0x000055a4059145dd in pfs_spawn_thread (arg=0x55a4089f5c88) at /test/10.8_dbg/storage/perfschema/pfs.cc:2201
#35 0x000014d213269609 in start_thread (arg=<optimized out>) at pthread_create.c:477
--Type <RET> for more, q to quit, c to continue without paging--
#36 0x000014d212e57293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95