Bug #86248 Assertion in debug build when row event applied in multi-master setup
Submitted: 9 May 2017 20:43 Modified: 28 Nov 2017 6:21
Reporter: Sveta Smirnova (OCA) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.7.18, 8.0.1 OS:Any
Assigned to: CPU Architecture:Any

[9 May 2017 20:43] Sveta Smirnova
Description:
When trying to repeat bug #85158 with debug version of the server I got assertion:

mysqld: /export/home/pb2/build/sb_0-22759043-1489826356.96/mysql-5.7.18/sql/log_event.cc:12965: virtual int Rows_query_log_event::do_apply_event(const Relay_log_info*): Assertion `rli->rows_query_ev == __null' failed.
20:03:22 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.

key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=2
max_threads=151
thread_count=21
connection_count=2
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 61029 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7fd07c000950
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 = 7fd0e604ae58 thread_stack 0x40000
/home/sveta/mysql_packages/mysql-5.7.18-linux-glibc2.5-x86_64/bin/mysqld(my_print_stacktrace+0x35)[0x18c31d2]
/home/sveta/mysql_packages/mysql-5.7.18-linux-glibc2.5-x86_64/bin/mysqld(handle_fatal_signal+0x415)[0xecc706]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7fd0f1c15390]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7fd0f0788428]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7fd0f078a02a]
/lib/x86_64-linux-gnu/libc.so.6(+0x2dbd7)[0x7fd0f0780bd7]
/lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7fd0f0780c82]
/home/sveta/mysql_packages/mysql-5.7.18-linux-glibc2.5-x86_64/bin/mysqld(_ZN20Rows_query_log_event14do_apply_eventEPK14Relay_log_info+0xc9)[0x180f447]
/home/sveta/mysql_packages/mysql-5.7.18-linux-glibc2.5-x86_64/bin/mysqld(_ZN9Log_event21do_apply_event_workerEP12Slave_worker+0x7e)[0x1817dce]
/home/sveta/mysql_packages/mysql-5.7.18-linux-glibc2.5-x86_64/bin/mysqld(_ZN12Slave_worker23slave_worker_exec_eventEP9Log_event+0x49f)[0x188cdc9]
/home/sveta/mysql_packages/mysql-5.7.18-linux-glibc2.5-x86_64/bin/mysqld(_Z27slave_worker_exec_job_groupP12Slave_workerP14Relay_log_info+0x32c)[0x188ee99]
/home/sveta/mysql_packages/mysql-5.7.18-linux-glibc2.5-x86_64/bin/mysqld(handle_slave_worker+0x36e)[0x1866bc5]
/home/sveta/mysql_packages/mysql-5.7.18-linux-glibc2.5-x86_64/bin/mysqld(pfs_spawn_thread+0x170)[0x18f601c]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fd0f1c0b6ba]

There is no crash in release version.

How to repeat:
Run attached test cases against debug server.

Suggested fix:
Don't assert
[9 May 2017 20:44] Sveta Smirnova
test case for MTR

Attachment: rpl_bug85158.test (application/octet-stream, text), 4.25 KiB.

[9 May 2017 20:44] Sveta Smirnova
configuration file

Attachment: rpl_bug85158.cnf (application/octet-stream, text), 13.25 KiB.

[10 May 2017 5:27] MySQL Verification Team
Hello Sveta,

Thank you for the report and test case.

Thanks,
Umesh
[28 Nov 2017 6:21] Venkatesh Venugopal
This bug is a duplicate of
https://bugs.mysql.com/bug.php?id=85371.
The fix is available in MySQL 5.7.21.