Databases 7 min read

Debugging MySQL MGR Failover: Assertion Failure in row0pread.cc (MySQL 8.0.18)

The article walks through a MySQL MGR failover incident, analyzes the InnoDB assertion failure shown in the error log, pinpoints the problematic code at row0pread.cc line 727, compares the fix in MySQL 8.0.28, and references the related bug report for future troubleshooting.

Aikesheng Open Source Community
Aikesheng Open Source Community
Aikesheng Open Source Community
Debugging MySQL MGR Failover: Assertion Failure in row0pread.cc (MySQL 8.0.18)

During a MySQL MGR failover reported by a user, the operations engineer examined the error log and identified an InnoDB assertion failure that caused the crash. The log indicated that mysqld got signal 6 , suggesting a logical processing issue within MySQL.

The relevant error‑log excerpt is shown below:

2022-04-12T03:03:36.435579+08:00 0 [ERROR][MY-013183][InnoDB]Assertion failure: row0pread.cc:727:!page_cur_is_after_last(&page_cursor) thread 140441717634816
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even immediately after the mysqld startup, there may be corruption in the InnoDB tablespace. Please refer to http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html about forcing recovery.
19:03:36 UTC-mysqld got signal 6;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer:0x0
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=0 thread_stack 0x46000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x41) [0xlefdd01]
/usr/sbin/mysqld(handle_fatal_signal+0x333)[0xfadec3]
/lib64/libpthread.so.0(+0x12ddo)[0x7fc70518cdd0]
/lib64/libc.so.6(gsignal+0x10f)[0x7fc7030b099f]
/lib64/libc.so.6(abort+0x127)[0x7fc70309acf5]
/usr/sbin/mysqld()[0xd15c02]
... (stack trace continues)

From the message "mysqld got signal 6" the engineer concluded that the failure was related to MySQL's logical processing. The stack trace points to the source file row0pread.cc at line 727, which indeed contains the failing assertion.

A GDB breakpoint was set at the exact address to verify the location:

(gdb) b *0x211502b
Breakpoint 1 at 0x211502b: file /usr/src/debug/mysql-community-8.0.18-1.el8.x86_64/mysql-8.0.18/storage/innobase/row/row0pread.cc, line 727.

In MySQL 8.0.18 the code at that line includes the macro call ut_a(!page_cur_is_after_last(&page_cursor)); . A comparison with later versions (e.g., MySQL 8.0.28) shows that this assertion has been removed.

The change is documented in MySQL Bug #30060690, which explains that the bug was triggered in version 8.0.18 because parallel reads did not correctly handle certain tree‑structure changes. The bug was fixed in subsequent releases, eliminating the problematic assertion.

This case study is provided as a reference for engineers who encounter similar InnoDB assertion failures during MySQL MGR failovers.

debuggingInnoDBMySQLMGRassertion-failurebug-30060690version-difference
Aikesheng Open Source Community
Written by

Aikesheng Open Source Community

The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.