[MDEV-4484] Assertion `m_status == DA_ERROR || m_status == DA_OK' fails on slave after truncating rpl_slave_state table Created: 2013-05-05  Updated: 2013-05-29  Resolved: 2013-05-29

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.2
Fix Version/s: 10.0.3

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-26 Global transaction ID Closed

 Description   

mysqld: /home/elenst/bzr/10.0-base/sql/sql_error.h:73: const char* Diagnostics_area::message() const: Assertion `m_status == DA_ERROR || m_status == DA_OK' failed.
130505  3:46:35 [ERROR] mysqld got signal 6 ;

#7  0x00007f151f953192 in __GI___assert_fail (assertion=0xd3d690 "m_status == DA_ERROR || m_status == DA_OK", file=0xd3d660 "/home/elenst/bzr/10.0-base/sql/sql_error.h", line=73, function=0xd3e500 "const char* Diagnostics_area::message() const") at assert.c:103
#8  0x0000000000579f75 in Diagnostics_area::message (this=0x7f14d4004510) at /home/elenst/bzr/10.0-base/sql/sql_error.h:73
#9  0x00000000008d2e99 in Xid_log_event::do_apply_event (this=0x7f14d401bd00, rli=0x4833bb8) at /home/elenst/bzr/10.0-base/sql/log_event.cc:6851
#10 0x0000000000593970 in Log_event::apply_event (this=0x7f14d401bd00, rli=0x4833bb8) at /home/elenst/bzr/10.0-base/sql/log_event.h:1295
#11 0x000000000058ae9e in apply_event_and_update_pos (ev=0x7f14d401bd00, thd=0x7f14d4000b00, rli=0x4833bb8) at /home/elenst/bzr/10.0-base/sql/slave.cc:2936
#12 0x000000000058b43a in exec_relay_log_event (thd=0x7f14d4000b00, rli=0x4833bb8) at /home/elenst/bzr/10.0-base/sql/slave.cc:3096
#13 0x000000000058dd88 in handle_slave_sql (arg=0x48324c0) at /home/elenst/bzr/10.0-base/sql/slave.cc:3990
#14 0x000000000098322e in pfs_spawn_thread (arg=0x7f14e814f7a0) at /home/elenst/bzr/10.0-base/storage/perfschema/pfs.cc:1015
#15 0x00007f1520723e9a in start_thread (arg=0x7f1514164700) at pthread_create.c:308
#16 0x00007f151fa17cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

Test case:

--source include/master-slave.inc
--source include/have_innodb.inc
 
CREATE TABLE t1 (i int) ENGINE=InnoDB;
 
--sync_slave_with_master
 
TRUNCATE TABLE mysql.rpl_slave_state;
 
--connection master
INSERT INTO t1 VALUES (1);
--sync_slave_with_master
 

bzr version-info

revision-id: knielsen@knielsen-hq.org-20130503092729-gedp152b19k5wdnj
revno: 3626
branch-nick: 10.0-base



 Comments   
Comment by Elena Stepanova [ 2013-05-27 ]

Still reproducible with the new implementation (on 10.0-base revno 3635), the test case needs to be adjusted due to the new table name.

Comment by Elena Stepanova [ 2013-05-28 ]

Same assertion, different test case (just a lock instead of truncate):

--source include/master-slave.inc
--source include/have_innodb.inc

--connection slave
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
SET GLOBAL innodb_lock_wait_timeout = 1;
--source include/stop_slave.inc
--source include/start_slave.inc

--connection master
CREATE TABLE t1 (i int) ENGINE=InnoDB;

--sync_slave_with_master

--connection slave1
BEGIN;
SELECT * FROM mysql.gtid_slave_pos FOR UPDATE;

--connection master
INSERT INTO t1 VALUES (1);

--sync_slave_with_master
SELECT * FROM t1;

Comment by Kristian Nielsen [ 2013-05-29 ]

Pushed to 10.0-base.

Generated at Thu Feb 08 06:56:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.