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
- relates to
-
MDEV-19801 Change defaults for CHANGE MASTER TO so that GTID-based replication is used by default if master supports it
- Closed