[MDEV-14903] Slave applier segfaults after reconnect skipped already retrieved rows event Created: 2018-01-09  Updated: 2023-08-26

Status: Open
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.1, 10.2, 10.3
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Andrei Elkin Assignee: Andrei Elkin
Resolution: Unresolved Votes: 0
Labels: crash, slave_reconnect_skip_events

Issue Links:
Duplicate
is duplicated by MDEV-20095 MariaDB server replication crashing Open
Relates
relates to MDEV-20095 MariaDB server replication crashing Open
relates to MDEV-24336 replica in crash loop on mariadb 10.5.7 Closed

 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.



 Comments   
Comment by Elena Stepanova [ 2018-02-06 ]

Setting a fix version because it's supposed to be set to something. Please feel free to adjust as needed.

Generated at Thu Feb 08 08:17:10 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.