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

Assertion `m_status == DA_ERROR || m_status == DA_OK' fails on slave after truncating rpl_slave_state table

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.0.2
    • Fix Version/s: 10.0.3
    • Component/s: None
    • Labels:
      None

      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
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              elenst Elena Stepanova added a comment -

              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.

              Show
              elenst Elena Stepanova added a comment - 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.
              Hide
              elenst Elena Stepanova added a comment -

              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;

              Show
              elenst Elena Stepanova added a comment - 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;
              Hide
              knielsen Kristian Nielsen added a comment -

              Pushed to 10.0-base.

              Show
              knielsen Kristian Nielsen added a comment - Pushed to 10.0-base.

                People

                • Assignee:
                  knielsen Kristian Nielsen
                  Reporter:
                  elenst Elena Stepanova
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: