[MDEV-30817] Assertion `state_ == s_exec' failed in int wsrep::client_state::append_key(const wsrep::key&) Created: 2023-03-09  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.8, 10.9, 10.10, 10.11
Fix Version/s: 10.4, 10.5, 10.6, 10.11

Type: Bug Priority: Major
Reporter: Ramesh Sivaraman Assignee: Julius Goryavsky
Resolution: Unresolved Votes: 0
Labels: None


 Description   

SET sql_mode=0;
SET SESSION enforce_storage_engine=InnoDB;
SET unique_checks=0;
SET SESSION slow_query_log=ON;
ALTER TABLE mysql.slow_log ENGINE=MyISAM;
START TRANSACTION;
SET SESSION log_slow_filter='not_using_index';
SET foreign_key_checks=OFF;
SET GLOBAL slow_query_log=ON;
SET GLOBAL log_output='TABLE';
SELECT * FROM information_schema.global_status;

Leads to:

10.6.13 3e2ad0e918d5d38322994ec9e08fc5dda3a80707 (Optimized)

mysqld: /test/10.6_opt/wsrep-lib/include/wsrep/client_state.hpp:352: int wsrep::client_state::append_key(const wsrep::key&): Assertion `state_ == s_exec' failed.

10.6.13 3e2ad0e918d5d38322994ec9e08fc5dda3a80707 (Optimized)

Core was generated by `/test/GAL_MD010323-mariadb-10.6.13-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 0x151580a7d700 (LWP 895700))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x000056441bc76b7f in my_write_core (sig=sig@entry=6) at /test/10.6_opt/mysys/stacktrace.c:424
#2  0x000056441b7b76e0 in handle_fatal_signal (sig=6) at /test/10.6_opt/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  0x00001515b6a97859 in __GI_abort () at abort.c:79
#6  0x00001515b6a97729 in __assert_fail_base (fmt=0x1515b6c2d588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x56441be1a888 "state_ == s_exec", 
    file=0x56441be19c18 "/test/10.6_opt/wsrep-lib/include/wsrep/client_state.hpp", line=352, function=<optimized out>) at assert.c:92
#7  0x00001515b6aa8fd6 in __GI___assert_fail (assertion=assertion@entry=0x56441be1a888 "state_ == s_exec", file=file@entry=0x56441be19c18 "/test/10.6_opt/wsrep-lib/include/wsrep/client_state.hpp", 
    line=line@entry=352, function=function@entry=0x56441bfa3950 "int wsrep::client_state::append_key(const wsrep::key&)") at assert.c:101
#8  0x000056441ba37d2a in wsrep::client_state::append_key (key=..., this=0x151540006f20) at /test/10.6_opt/sql/service_wsrep.cc:328
#9  wsrep_thd_append_key (thd=0x151540000c58, key=<optimized out>, n_keys=1, key_type=<optimized out>) at /test/10.6_opt/sql/service_wsrep.cc:318
#10 0x000056441ba381f5 in wsrep_thd_append_table_key (thd=0x151540000c58, db=db@entry=0x151580a7aa10 "mysql", table=table@entry=0x151580a7ae50 "slow_log", key_type=key_type@entry=WSREP_SERVICE_KEY_EXCLUSIVE)
    at /test/10.6_opt/sql/service_wsrep.cc:431
#11 0x000056441b44dcae in row_ins_wsrep_start_bulk (trx=<optimized out>, trx=<optimized out>, index=...) at /test/10.6_opt/storage/innobase/row/row0ins.cc:2599
#12 row_ins_clust_index_entry_low (flags=0, mode=BTR_MODIFY_LEAF, index=0x1515400324e8, n_uniq=0, entry=0x151540033988, n_ext=0, thr=0x1515400391c8) at /test/10.6_opt/storage/innobase/row/row0ins.cc:2775
#13 0x000056441baf1843 in row_ins_clust_index_entry (index=0x1515400324e8, entry=0x151540033988, thr=0x1515400391c8, n_ext=0) at /test/10.6_opt/storage/innobase/row/row0ins.cc:3271
#14 0x000056441baf215e in row_ins_index_entry (thr=0x1515400391c8, entry=<optimized out>, index=<optimized out>) at /test/10.6_opt/storage/innobase/row/row0ins.cc:3397
#15 row_ins_index_entry_step (thr=0x1515400391c8, node=<optimized out>) at /test/10.6_opt/storage/innobase/row/row0ins.cc:3565
#16 row_ins (thr=0x1515400391c8, node=<optimized out>) at /test/10.6_opt/storage/innobase/row/row0ins.cc:3690
#17 row_ins_step (thr=thr@entry=0x1515400391c8) at /test/10.6_opt/storage/innobase/row/row0ins.cc:3819
#18 0x000056441baff7b5 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x15154002fc70 "d\txX\a\367\217\031", prebuilt=0x151540038168, ins_mode=ROW_INS_NORMAL)
    at /test/10.6_opt/storage/innobase/row/row0mysql.cc:1308
#19 0x000056441ba604fa in ha_innobase::write_row (this=0x15154002bd80, record=0x15154002fc70 "d\txX\a\367\217\031") at /test/10.6_opt/storage/innobase/handler/ha_innodb.cc:7910
#20 0x000056441b7c5272 in handler::ha_write_row (this=0x15154002bd80, buf=0x15154002fc70 "d\txX\a\367\217\031") at /test/10.6_opt/sql/handler.cc:7614
#21 0x000056441b8b1a29 in Log_to_csv_event_handler::log_slow (this=<optimized out>, thd=0x151540000c58, current_time=..., user_host=0x151580a7c0c0 "root[root] @ localhost []", user_host_len=25, 
    query_utime=<optimized out>, lock_utime=52, is_command=false, sql_text=0x151540010690 "SELECT * FROM information_schema.global_status", sql_text_len=46) at /test/10.6_opt/sql/log.cc:983
#22 0x000056441b8ac7aa in LOGGER::slow_log_print (this=this@entry=0x56441c6287e0 <logger>, thd=thd@entry=0x151540000c58, query=0x151540010690 "SELECT * FROM information_schema.global_status", query_length=46, 
    current_utime=<optimized out>) at /test/10.6_opt/sql/log.cc:1350
#23 0x000056441b8b2e0b in slow_log_print (thd=thd@entry=0x151540000c58, query=<optimized out>, query_length=<optimized out>, current_utime=<optimized out>) at /test/10.6_opt/sql/log.cc:6881
#24 0x000056441b58bf0e in log_slow_statement (thd=thd@entry=0x151540000c58) at /test/10.6_opt/sql/sql_class.h:1388
#25 0x000056441b591767 in dispatch_command (command=COM_QUERY, thd=0x151540000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/10.6_opt/sql/sql_parse.cc:2428
#26 0x000056441b59409e in do_command (thd=0x151540000c58, blocking=blocking@entry=true) at /test/10.6_opt/sql/sql_parse.cc:1409
#27 0x000056441b69c067 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x56441d3c65c8, put_in_cache=put_in_cache@entry=true) at /test/10.6_opt/sql/sql_connect.cc:1416
#28 0x000056441b69c34d in handle_one_connection (arg=0x56441d3c65c8) at /test/10.6_opt/sql/sql_connect.cc:1318
#29 0x00001515b6fa8609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#30 0x00001515b6b94133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

10.6.13 3e2ad0e918d5d38322994ec9e08fc5dda3a80707 (Debug)

mysqld: /test/10.6_dbg/wsrep-lib/include/wsrep/client_state.hpp:352: int wsrep::client_state::append_key(const wsrep::key&): Assertion `state_ == s_exec' failed.

10.6.13 3e2ad0e918d5d38322994ec9e08fc5dda3a80707 (Debug)

Core was generated by `/test/GAL_MD010323-mariadb-10.6.13-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 0x150900053700 (LWP 78580))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x000055ba08fb9712 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
#2  0x000055ba0886c62f in handle_fatal_signal (sig=6) at /test/10.6_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  0x0000150913227859 in __GI_abort () at abort.c:79
#6  0x0000150913227729 in __assert_fail_base (fmt=0x1509133bd588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55ba09150b54 "state_ == s_exec", 
    file=0x55ba0914e600 "/test/10.6_dbg/wsrep-lib/include/wsrep/client_state.hpp", line=352, function=<optimized out>) at assert.c:92
#7  0x0000150913238fd6 in __GI___assert_fail (assertion=assertion@entry=0x55ba09150b54 "state_ == s_exec", file=file@entry=0x55ba0914e600 "/test/10.6_dbg/wsrep-lib/include/wsrep/client_state.hpp", 
    line=line@entry=352, function=function@entry=0x55ba09357190 "int wsrep::client_state::append_key(const wsrep::key&)") at assert.c:101
#8  0x000055ba08b6de95 in wsrep::client_state::append_key (key=..., this=0x15089c0072d8) at /test/10.6_dbg/wsrep-lib/include/wsrep/exception.hpp:38
#9  wsrep_thd_append_key (thd=thd@entry=0x15089c000d48, key=<optimized out>, n_keys=1, key_type=key_type@entry=WSREP_SERVICE_KEY_EXCLUSIVE) at /test/10.6_dbg/sql/service_wsrep.cc:318
#10 0x000055ba08b6e416 in wsrep_thd_append_table_key (thd=0x15089c000d48, db=db@entry=0x1509000508b0 "mysql", table=table@entry=0x150900050d10 "slow_log", key_type=key_type@entry=WSREP_SERVICE_KEY_EXCLUSIVE)
    at /test/10.6_dbg/sql/service_wsrep.cc:431
#11 0x000055ba08cf2c0b in row_ins_wsrep_start_bulk (index=..., trx=0x150903bff680) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:2599
#12 row_ins_clust_index_entry_low (flags=flags@entry=0, mode=mode@entry=BTR_MODIFY_LEAF, index=index@entry=0x15089c042b40, n_uniq=n_uniq@entry=0, entry=entry@entry=0x15089c03ef40, n_ext=n_ext@entry=0, 
    thr=0x15089c02cfb0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:2775
#13 0x000055ba08cf4ca6 in row_ins_clust_index_entry (index=index@entry=0x15089c042b40, entry=entry@entry=0x15089c03ef40, thr=thr@entry=0x15089c02cfb0, n_ext=n_ext@entry=0)
    at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3271
#14 0x000055ba08cf671f in row_ins_index_entry (thr=0x15089c02cfb0, entry=0x15089c03ef40, index=0x15089c042b40) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3397
#15 row_ins_index_entry_step (thr=0x15089c02cfb0, node=<optimized out>) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3565
#16 row_ins (thr=0x15089c02cfb0, node=<optimized out>) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3690
#17 row_ins_step (thr=thr@entry=0x15089c02cfb0) at /test/10.6_dbg/storage/innobase/row/row0ins.cc:3819
#18 0x000055ba08d16b55 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x15089c036680 "d\tvg\r:U\031", prebuilt=0x15089c02bf30, ins_mode=ROW_INS_NORMAL)
    at /test/10.6_dbg/storage/innobase/row/row0mysql.cc:1308
#19 0x000055ba08ba41ed in ha_innobase::write_row (this=0x15089c039f50, record=0x15089c036680 "d\tvg\r:U\031") at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:7910
#20 0x000055ba0887cb4f in handler::ha_write_row (this=0x15089c039f50, buf=0x15089c036680 "d\tvg\r:U\031") at /test/10.6_dbg/sql/handler.cc:7614
#21 0x000055ba089b1e9f in Log_to_csv_event_handler::log_slow (this=<optimized out>, thd=0x15089c000d48, current_time=..., user_host=0x150900051fd0 "root[root] @ localhost []", user_host_len=25, 
    query_utime=<optimized out>, lock_utime=78, is_command=false, sql_text=0x15089c013010 "SELECT * FROM information_schema.global_status", sql_text_len=46) at /test/10.6_dbg/sql/log.cc:983
#22 0x000055ba089abce3 in LOGGER::slow_log_print (this=this@entry=0x55ba09a5c6e0 <logger>, thd=thd@entry=0x15089c000d48, query=0x15089c013010 "SELECT * FROM information_schema.global_status", query_length=46, 
    current_utime=<optimized out>) at /test/10.6_dbg/sql/log.cc:1350
#23 0x000055ba089b328e in slow_log_print (thd=thd@entry=0x15089c000d48, query=<optimized out>, query_length=<optimized out>, current_utime=<optimized out>) at /test/10.6_dbg/sql/log.cc:6881
#24 0x000055ba085ac579 in log_slow_statement (thd=thd@entry=0x15089c000d48) at /test/10.6_dbg/sql/sql_class.h:1388
#25 0x000055ba085b560a in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x15089c000d48, packet=<optimized out>, packet@entry=0x15089c00ac79 "T", packet_length=packet_length@entry=46, 
    blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:2428
#26 0x000055ba085b5a80 in do_command (thd=0x15089c000d48, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1409
#27 0x000055ba086faf72 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55ba0af17e98, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1416
#28 0x000055ba086fb444 in handle_one_connection (arg=0x55ba0af17e98) at /test/10.6_dbg/sql/sql_connect.cc:1318
#29 0x0000150913738609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#30 0x0000150913324133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Bug confirmed present in:
MariaDB: 10.4.29 (dbg), 10.4.29 (opt), 10.5.20 (dbg), 10.5.20 (opt), 10.6.13 (dbg), 10.6.13 (opt), 10.7.8 (dbg), 10.7.8 (opt), 10.8.8 (dbg), 10.8.8 (opt), 10.9.6 (dbg), 10.9.6 (opt), 10.10.4 (dbg), 10.10.4 (opt), 10.11.3 (dbg), 10.11.3 (opt), 11.0.1 (dbg), 11.0.1 (opt)


Generated at Thu Feb 08 10:19:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.