[MDEV-24120] Assertion `thd_killed(current_thd) || !active_tranxs_ || !active_tranxs_->is_tranx_end_pos(trx_wait_binlog_name, trx_wait_binlog_pos)' failed in ReplSemiSyncMaster::commitTrx Created: 2020-11-04  Updated: 2023-04-27

Status: Confirmed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Andrei Elkin
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-17948 Assertion `thd_killed(thd) || !m_acti... Closed
Relates
relates to MDEV-24118 rpl.rpl_semi_sync failed in bb, Asser... Open
relates to MDEV-27839 Assertion `thd_killed(thd) || !m_act... Open

 Description   

Test case from MDEV-17948 fails:

--source include/have_semisync.inc # for 10.1-10.2
--source include/master-slave.inc
 
SET @@GLOBAL.rpl_semi_sync_master_enabled = 1;
 
--connection slave
source include/stop_slave.inc;
SET @@GLOBAL. rpl_semi_sync_slave_enabled = 1;
source include/start_slave.inc;
 
--connection master
SET @@GLOBAL.debug_dbug= "d,dbug_master_binlog_over_2GB";
CREATE TABLE t1 (a INT);
INSERT INTO t1 SET a=0;
 
--sync_slave_with_master

10.1 da9081d14f2de7bb655ce

Thread 1 (Thread 0x7f2e0e5b3700 (LWP 65107)):
#3  <signal handler called>
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#5  0x00007f2e16a3d535 in __GI_abort () at abort.c:79
#6  0x00007f2e16a3d40f in __assert_fail_base (fmt=0x7f2e16b9fee0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7f2e16a0e790 "thd_killed(current_thd) || !active_tranxs_ || !active_tranxs_->is_tranx_end_pos(trx_wait_binlog_name, trx_wait_binlog_pos)", file=0x7f2e16a0e428 "/git/10.1/plugin/semisync/semisync_master.cc", line=754, function=<optimized out>) at assert.c:92
#7  0x00007f2e16a4b102 in __GI___assert_fail (assertion=0x7f2e16a0e790 "thd_killed(current_thd) || !active_tranxs_ || !active_tranxs_->is_tranx_end_pos(trx_wait_binlog_name, trx_wait_binlog_pos)", file=0x7f2e16a0e428 "/git/10.1/plugin/semisync/semisync_master.cc", line=754, function=0x7f2e16a0ed20 <ReplSemiSyncMaster::commitTrx(char const*, unsigned long long)::__PRETTY_FUNCTION__> "int ReplSemiSyncMaster::commitTrx(const char*, my_off_t)") at assert.c:101
#8  0x00007f2e16a0b36a in ReplSemiSyncMaster::commitTrx (this=0x7f2e16a12620 <repl_semisync>, trx_wait_binlog_name=0x7f2e09c3a2f8 "master-bin.000001", trx_wait_binlog_pos=630) at /git/10.1/plugin/semisync/semisync_master.cc:752
#9  0x00007f2e16a0cb2f in repl_semi_report_commit (param=0x7f2e0e5affd0) at /git/10.1/plugin/semisync/semisync_master_plugin.cc:78
#10 0x0000556b5d31dea5 in Trans_delegate::after_commit (this=0x556b5e309ea0 <delegates_init()::trans_mem>, thd=0x7f2e0fdff6b0, all=false) at /git/10.1/sql/rpl_handler.cc:201
#11 0x0000556b5d41d98f in ha_commit_trans (thd=0x7f2e0fdff6b0, all=false) at /git/10.1/sql/handler.cc:1521
#12 0x0000556b5d32b7d0 in trans_commit_stmt (thd=0x7f2e0fdff6b0) at /git/10.1/sql/transaction.cc:431
#13 0x0000556b5d1e7c9e in mysql_execute_command (thd=0x7f2e0fdff6b0) at /git/10.1/sql/sql_parse.cc:5534
#14 0x0000556b5d1ec13e in mysql_parse (thd=0x7f2e0fdff6b0, rawbuf=0x7f2e09c13c48 "INSERT INTO t1 SET a=0", length=22, parser_state=0x7f2e0e5b0e20) at /git/10.1/sql/sql_parse.cc:7228
#15 0x0000556b5d1db2ec in dispatch_command (command=COM_QUERY, thd=0x7f2e0fdff6b0, packet=0x7f2e0fe06831 "INSERT INTO t1 SET a=0", packet_length=22) at /git/10.1/sql/sql_parse.cc:1492
#16 0x0000556b5d1da1d8 in do_command (thd=0x7f2e0fdff6b0) at /git/10.1/sql/sql_parse.cc:1124
#17 0x0000556b5d3170ef in do_handle_one_connection (thd_arg=0x7f2e0fdff6b0) at /git/10.1/sql/sql_connect.cc:1331
#18 0x0000556b5d316e2a in handle_one_connection (arg=0x7f2e0fdff6b0) at /git/10.1/sql/sql_connect.cc:1242
#19 0x0000556b5d72fd64 in pfs_spawn_thread (arg=0x7f2e0fd35870) at /git/10.1/storage/perfschema/pfs.cc:1868
#20 0x00007f2e1744ffa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#21 0x00007f2e16b144cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95



 Comments   
Comment by Alice Sherepa [ 2022-02-15 ]

10.7 33fd136c61baf79b01a760

mariadbd: /10.7/src/sql/semisync_master.cc:929: int Repl_semi_sync_master::commit_trx(const char*, my_off_t): Assertion `thd_killed(thd) || !m_active_tranxs || !m_active_tranxs->is_tranx_end_pos(trx_wait_binlog_name, trx_wait_binlog_pos)' failed.
220215 11:09:53 [ERROR] mysqld got signal 6 ;
 
Server version: 10.7.4-MariaDB-debug-log
 
??:0(__assert_fail)[0x7fb7a7177f36]
sql/semisync_master.cc:807(Repl_semi_sync_master::commit_trx(char const*, unsigned long long))[0x5624bdde5ab0]
sql/semisync_master.cc:699(Repl_semi_sync_master::wait_after_commit(THD*, bool))[0x5624bdde4937]
sql/handler.cc:1904(ha_commit_trans(THD*, bool))[0x5624be0762a3]
sql/transaction.cc:472(trans_commit_stmt(THD*))[0x5624bdc9a8bd]
sql/sql_parse.cc:6049(mysql_execute_command(THD*, bool))[0x5624bd7d3aa3]
sql/sql_parse.cc:8027(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x5624bd7e09df]
sql/sql_parse.cc:1896(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x5624bd7b6c16]
sql/sql_parse.cc:1402(do_command(THD*, bool))[0x5624bd7b393a]
sql/sql_connect.cc:1418(do_handle_one_connection(CONNECT*, bool))[0x5624bdc556af]
sql/sql_connect.cc:1314(handle_one_connection)[0x5624bdc54f3b]
perfschema/pfs.cc:2203(pfs_spawn_thread)[0x5624be8ff6c4]
nptl/pthread_create.c:478(start_thread)[0x7fb7a7690609]
??:0(clone)[0x7fb7a7263293]
 
Query (0x6290002c62a8): INSERT INTO t1 SET a=0

Generated at Thu Feb 08 09:27:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.