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

replica in crash loop on mariadb 10.5.7

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Cannot Reproduce
    • 10.5.7
    • N/A
    • Replication
    • amazon RDS mariadb 10.5.7

    Description

      After setting up replication on mariadb 10.5.7, run the following SQL statements on the source database (master) will lead the replica (slave) into a crash loop. The source database works fine, but on the replica, whenever the SQL thread starts to apply the binlog, it will crash the instance. The binlog format is MIXED.

      The factors involved:

      • 2 tables with FK relationship
      • 1 trigger on the child table

      CREATE TABLE `parent` (
        `id` int(11) NOT NULL AUTO_INCREMENT,
        `tax` decimal(11,0) DEFAULT 0,
        PRIMARY KEY (`id`)
      ) ENGINE=InnoDB ;
       
      create table child ( 
        `id` int(11) NOT NULL AUTO_INCREMENT,
        `id_parent` int(11) DEFAULT NULL,
        `name` text DEFAULT NULL,
        `age` float(12,2) DEFAULT NULL,
         PRIMARY KEY (`id`),
        CONSTRAINT `fk_1` FOREIGN KEY (`id_parent`) REFERENCES `parent` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
      ) ENGINE=InnoDB;
       
      DELIMITER $$
      CREATE TRIGGER insert_trg 
          AFTER INSERT ON child
          FOR EACH ROW 
      begin
      if(new.name='Bob')
      then
       update parent set tax=tax+new.age where id = new.id_parent;
      end if;
       END$$
      DELIMITER ;
       
      insert into parent (tax) values (10.1);
      insert into  `child` (`id_parent`, `name`, `age`) values ('1', 'Bob', 9);
      

      201202  7:00:00 [ERROR] mysqld got signal 11 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
       
      Server version: 10.5.7-MariaDB
      key_buffer_size=16777216
      read_buffer_size=262144
      max_used_connections=1
      max_threads=156
      thread_count=4
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 379517 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x2addcc050e98
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x2add348e1e78 thread_stack 0x40000
      mysys/stacktrace.c:213(my_print_stacktrace)[0x564714a975de]
      sql/signal_handler.cc:208(handle_fatal_signal)[0x56471440d345]
      sigaction.c:0(__restore_rt)[0x2add35923100]
      mysys/my_malloc.c:196(my_free)[0x564714a939ac]
      sql/rpl_rli.cc:2364(rpl_group_info::clear_tables_to_lock())[0x5647142fa546]
      sql/rpl_rli.cc:2318(rpl_group_info::cleanup_context(THD*, bool))[0x5647142fa661]
      sql/log_event_server.cc:5787(Rows_log_event::do_apply_event(rpl_group_info*))[0x56471450f509]
      sql/log_event.h:1499(Log_event::apply_event(rpl_group_info*))[0x5647141743dc]
      sql/slave.cc:4489(exec_relay_log_event)[0x5647141765fe]
      perfschema/pfs.cc:2204(pfs_spawn_thread)[0x56471471480c]
      pthread_create.c:0(start_thread)[0x2add3591bdc5]
      ??:0(__clone)[0x2add35c26c9d]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x2addcc0ae02b): INSERT INTO `child` (`id_parent`, `name`, `age`) VALUES ('1', 'Bob', 9)
       
      Connection ID (thread ID): 5
      Status: NOT_KILLED
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              leizeng Lei Zeng
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.