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

Galera: Assertion `0' fails in tdc_remove_table on creating a trigger

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 5.5.28a-galera
    • 5.5.34-galera
    • None

    Description

      mysqld: maria-5.5-galera/sql/sql_base.cc:9451: void tdc_remove_table(THD*, enum_tdc_remove_table_type, const char*, c
      onst char*, bool): Assertion `0' failed.
      [ERROR] mysqld got signal 6 ;

      #6  0x00007f24f0577d4d in __GI___assert_fail (assertion=0xd58a10 "0", file=<optimized out>, line=9451, function=<optimized out>) at assert.c:81
      #7  0x00000000005c736c in tdc_remove_table (thd=0x3b95dd0, remove_type=TDC_RT_REMOVE_NOT_OWN, db=0x394e8f8 "test", table_name=0x394e8fd "B", has_lock=false) at maria-5.5-galera/sql/sql_base.cc:9451
      #8  0x00000000005b842c in wait_while_table_is_used (thd=0x3b95dd0, table=0x3993c00, function=HA_EXTRA_FORCE_REOPEN) at maria-5.5-galera/sql/sql_base.cc:2353
      #9  0x00000000006c548f in mysql_create_or_drop_trigger (thd=0x3b95dd0, tables=0x3ba3b58, create=true) at maria-5.5-galera/sql/sql_trigger.cc:540
      #10 0x000000000062086d in mysql_execute_command (thd=0x3b95dd0) at maria-5.5-galera/sql/sql_parse.cc:4688
      #11 0x0000000000625224 in mysql_parse (thd=0x3b95dd0, rawbuf=0x3ba39a8 "CREATE TRIGGER c AFTER INSERT ON `B` FOR EACH ROW BEGIN DELETE FROM `D` LIMIT 1 ; END", length=85, parser_state=0x7f24c1617550) at maria-5.5-galera/sql/sql_parse.cc:6305
      #12 0x00000000006242ea in wsrep_mysql_parse (thd=0x3b95dd0, rawbuf=0x3ba39a8 "CREATE TRIGGER c AFTER INSERT ON `B` FOR EACH ROW BEGIN DELETE FROM `D` LIMIT 1 ; END", length=85, parser_state=0x7f24c1617550) at maria-5.5-galera/sql/sql_parse.cc:6070
      #13 0x00000000006167b9 in dispatch_command (command=COM_QUERY, thd=0x3b95dd0, packet=0x3b9b291 "CREATE TRIGGER c AFTER INSERT ON `B` FOR EACH ROW BEGIN DELETE FROM `D` LIMIT 1 ; END", packet_length=85) at maria-5.5-galera/sql/sql_parse.cc:1245
      #14 0x0000000000615598 in do_command (thd=0x3b95dd0) at maria-5.5-galera/sql/sql_parse.cc:891
      #15 0x000000000071e143 in do_handle_one_connection (thd_arg=0x3b95dd0) at maria-5.5-galera/sql/sql_connect.cc:1291
      #16 0x000000000071db1b in handle_one_connection (arg=0x3b95dd0) at maria-5.5-galera/sql/sql_connect.cc:1199
      #17 0x00007f24f0e7eefc in start_thread (arg=0x7f24c1618700) at pthread_create.c:304
      #18 0x00007f24f062df4d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x3ba39a8): CREATE TRIGGER c AFTER INSERT ON `B` FOR EACH ROW BEGIN DELETE FROM `D` LIMIT 1 ; END
      Connection ID (thread ID): 9
      Status: NOT_KILLED

      I run a single Galera node, server command line:

       $HOME/maria-5.5-galera/sql/mysqld --no-defaults --basedir=$HOME/maria-5.5-galera --lc-messages-dir=$HOME/maria-5.5-galera/sql/share/ --core --datadir=$HOME/maria-5.5-galera/data1 --tmpdir=$HOME/maria-5.5-galera/data1/tmp --port=8306 --socket=$HOME/maria-5.5-galera/data1/tmp/node1.sock --wsrep-provider=$HOME/galera/libgalera_smm.so --wsrep-cluster-address=gcomm:// --binlog-format=row --wsrep-sst-method=rsync --log-error=$HOME/maria-5.5-galera/data1/log.err --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1

      RQG grammar (assertion0.yy):

      query:
      	binlog_event | binlog_event | binlog_event | binlog_event | binlog_event |
      	binlog_event | binlog_event | binlog_event | binlog_event | binlog_event |
      	binlog_event | binlog_event | binlog_event | binlog_event | binlog_event |
      	binlog_event | binlog_event | binlog_event | binlog_event | binlog_event | trigger ;
       
      binlog_event:
      	delete | insert | trx | FLUSH LOGS ;
       
      trx:
      	SAVEPOINT A | ROLLBACK TO SAVEPOINT A | RELEASE SAVEPOINT A | SET AUTOCOMMIT = OFF ;
       
      insert:
      	INSERT INTO _table ( _field ) VALUES ( NULL ) ;
       
      delete:
      	DELETE FROM _table LIMIT 1 ;
       
      trigger:
      	CREATE TRIGGER _letter trigger_time trigger_event ON _table FOR EACH ROW BEGIN procedure_body ; END ;
       
      trigger_time:
              BEFORE | AFTER ;
       
      trigger_event:
              INSERT | UPDATE ;
       
      procedure_body:
      	delete | insert ;

      RQG command line:

      perl ./gentest.pl --dsn=dbi:mysql:host=127.0.0.1:port=8306:user=root:database=test --duration=300 --queries=100M --engine=InnoDB --grammar=assertion0.yy --gendata --threads=4

      Sometimes server crashes with an InnoDB mutex problem before it hits the assertion failure, just try again then.

      Attachments

        Activity

          People

            jplindst Jan Lindström (Inactive)
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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