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

Slave applier segfaults after reconnect skipped already retrieved rows event

    XMLWordPrintable

Details

    Description

      When the gtid-mode Slave receiver thread experiences ER_NET_READ_INTERRUPTED it carries out
      a reconnect protocol that relay-logs an artificial Rotate event in front of events that follow the past break point.

      It all looks like the Rotate causes a premature commit so the post-reconnect transferred Rows-events could not be handled:

      #0  unlock_external (thd=, table=, count=2408550287) at lock.cc:720
      #1  mysql_unlock_tables (thd=, sql_lock=, free_lock=false) at lock.cc:432
      #2  mysql_unlock_tables (thd=, sql_lock=) at lock.cc:418
      #3  close_thread_tables (thd=) at sql_base.cc:840
      #4  rpl_group_info::slave_close_thread_tables (this=, thd=) at rpl_rli.cc:1939
      #5  rpl_group_info::cleanup_context (this=, thd=, error=false) at rpl_rli.cc:1837
      #6  rows_event_stmt_cleanup (rgi=, thd=) at log_event.cc:11614
      #7  Rows_log_event::do_apply_event (this=, rgi=) at log_event.cc:11505
      #8  Log_event::apply_event (this=, rgi=) at log_event.h:1482
      #9  apply_event_and_update_pos_apply (ev=, thd=, rgi=, reason=0) at slave.cc:3579
      #10 apply_event_and_update_pos (ev=, thd=, rgi=) at slave.cc:3727
      #11 exec_relay_log_event (thd=, rli=, serial_rgi=) at slave.cc:4014
      #12 handle_slave_sql (arg=) at slave.cc:5161
      

      because of a table object was already destructed.

      Attachments

        Issue Links

          Activity

            People

              Elkin Andrei Elkin
              Elkin Andrei Elkin
              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.