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

Previously Binlog Encrypted Master Segfaults on Binlog Dump with Using_Gtid=Slave_Pos

    XMLWordPrintable

Details

    Description

      A master can segfault if it can't set up decryption for its binary log during a binlog dump with Using_Gtid=Slave_Pos. Reproduction can be done by running binlog_encryption.encrypted_master_switch_to_unencrypted with the slave configured with Using_Gtid=Slave_Pos.

      Initial analysis:
      If slave connects using GTID mode, the master will call into log.cc::get_gtid_list_event(), which iterate through binlog events looking for a Gtid_list_log_event. On an encrypted binlog that the master cannot decrypt, the first event will be a START_ENCRYPTION_EVENT which will call into the following decryption branch

      if (fdle->start_decryption((Start_encryption_log_event*) ev))
        errormsg= "Could not set up decryption for binlog.";

      The event iteration however, does not stop in spite of this error. The master will try to read the next event, but segfault while trying to decrypt it because decryption failed to initialize.

      Attachments

        Issue Links

          Activity

            People

              bnestere Brandon Nesterenko
              bnestere Brandon Nesterenko
              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.