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

Async Replica Galera node crashes when executing a DELETE FROM mysql.user event from the async replication master node.

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.11
    • 10.11
    • Galera, Replication
    • None

    Description

      Test case

      GALERA_BASE=/home/ramesh/rpl/GAL_MD080125-mariadb-10.11.11-linux-x86_64-dbg
      RPL_BASE=/home/ramesh/rpl/MD080125-mariadb-10.11.11-linux-x86_64-dbg
      DATADIR=/home/ramesh/rpl
       
      $RPL_BASE/bin/mariadb-admin -uroot --socket=$DATADIR/data/socket.sock shutdown
      $GALERA_BASE/bin/mariadb-admin -uroot --socket=$DATADIR/node2/mysql.sock shutdown
      $GALERA_BASE/bin/mariadb-admin -uroot --socket=$DATADIR/node1/mysql.sock shutdown
       
      rm -Rf $DATADIR/node* $DATADIR/data
       
      $GALERA_BASE/scripts/mariadb-install-db --no-defaults --force --auth-root-authentication-method=normal  --basedir=$GALERA_BASE --datadir=$DATADIR/node1
      $GALERA_BASE/scripts/mariadb-install-db --no-defaults --force --auth-root-authentication-method=normal  --basedir=$GALERA_BASE --datadir=$DATADIR/node2
      $RPL_BASE/scripts/mariadb-install-db --no-defaults --force --auth-root-authentication-method=normal  --basedir=$RPL_BASE --datadir=$DATADIR/data
       
       
      $GALERA_BASE/bin/mariadbd --defaults-file=$DATADIR/n1.cnf --wsrep-new-cluster > $DATADIR/node1/node1.err 2>&1 & 
      sleep 2
      $GALERA_BASE/bin/mariadb-admin  -uroot -S$DATADIR/node1/mysql.sock ping
       
      $GALERA_BASE/bin/mariadbd --defaults-file=$DATADIR/n2.cnf > $DATADIR/node2/node2.err 2>&1 &
       
      $RPL_BASE/bin/mariadbd --defaults-file=$DATADIR/my.cnf  > $DATADIR/data/mysql.err 2>&1 & 
      sleep 2
      $RPL_BASE/bin/mariadb-admin  -uroot -S$DATADIR/data/socket.sock ping
       
      $RPL_BASE/bin/mysql -uroot --socket=$DATADIR/data/socket.sock
       
      delete from mysql.user where user='';
      create user repl@'%' identified by 'repl';
      grant all on *.* to  repl@'%';
      flush privileges;
      \q
       
      $GALERA_BASE/bin/mysql -uroot -S$DATADIR/node1/mysql.sock
      CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=4040, MASTER_USER='repl', MASTER_PASSWORD='repl', MASTER_USE_GTID=slave_pos; START SLAVE; 
      SHOW SLAVE STATUS \G
      

      Leads to

      CS 10.11.11 e5f4806c63230bf8b675f453e3e8a1d70e2c4c07 (Debug)

       
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055999d4386dc in my_write_core (sig=sig@entry=6) at /test/codership/10.11_dbg/mysys/stacktrace.c:424
      #2  0x000055999ccf44b2 in handle_fatal_signal (sig=6) at /test/codership/10.11_dbg/sql/signal_handler.cc:298
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000014b8640db859 in __GI_abort () at abort.c:79
      #6  0x000014b8640db729 in __assert_fail_base (fmt=0x14b864271588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55999d8653b0 "empty || create || aborted || ddl_replay", 
          file=0x55999d8645b8 "/test/codership/10.11_dbg/sql/wsrep_mysqld.cc", line=3995, function=<optimized out>) at assert.c:92
      #7  0x000014b8640ecfd6 in __GI___assert_fail (assertion=assertion@entry=0x55999d8653b0 "empty || create || aborted || ddl_replay", 
          file=file@entry=0x55999d8645b8 "/test/codership/10.11_dbg/sql/wsrep_mysqld.cc", line=line@entry=3995, function=function@entry=0x55999d8653e0 "void wsrep_commit_empty(THD*, bool)") at assert.c:101
      #8  0x000055999cfc4212 in wsrep_commit_empty (thd=thd@entry=0x14b788000f88, all=all@entry=true) at /test/codership/10.11_dbg/sql/wsrep_mysqld.cc:3995
      #9  0x000055999ca10996 in mysql_execute_command (thd=thd@entry=0x14b788000f88, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/codership/10.11_dbg/sql/sql_parse.cc:6323
      #10 0x000055999c9f71ef in mysql_parse (thd=0x14b788000f88, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14b828c368e0) at /test/codership/10.11_dbg/sql/sql_parse.cc:8188
      #11 0x000055999ce8d2a1 in Query_log_event::do_apply_event (this=0x14b7c802e988, rgi=0x14b7c802c790, query_arg=0x14b7c802eaef "COMMIT", q_len_arg=<optimized out>)
          at /test/codership/10.11_dbg/sql/sql_class.h:1400
      #12 0x000055999ce8dd64 in Query_log_event::do_apply_event (this=<optimized out>, rgi=<optimized out>) at /test/codership/10.11_dbg/sql/log_event_server.cc:1633
      #13 0x000055999ce7e0c2 in Log_event::apply_event (this=this@entry=0x14b7c802e988, rgi=rgi@entry=0x14b7c802c790) at /test/codership/10.11_dbg/sql/log_event.cc:4221
      #14 0x000055999c921279 in apply_event_and_update_pos_apply (ev=ev@entry=0x14b7c802e988, thd=thd@entry=0x14b788000f88, rgi=rgi@entry=0x14b7c802c790, reason=reason@entry=0)
          at /test/codership/10.11_dbg/sql/slave.cc:3970
      #15 0x000055999c92d47f in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x14b7c802e988, thd=thd@entry=0x14b788000f88, rgi=rgi@entry=0x14b7c802c790) at /test/codership/10.11_dbg/sql/slave.cc:4177
      #16 0x000055999cbf9fae in rpt_handle_event (qev=qev@entry=0x14b7c802eb78, rpt=rpt@entry=0x14b7c8010a48) at /test/codership/10.11_dbg/sql/rpl_parallel.cc:66
      #17 0x000055999cbfefed in handle_rpl_parallel_thread (arg=<optimized out>) at /test/codership/10.11_dbg/sql/rpl_parallel.cc:1579
      #18 0x000014b864607609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #19 0x000014b8641d8133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      (gdb) 
      

      Attachments

        Activity

          People

            janlindstrom Jan Lindström
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.