Bug #98887 MySQL 5.7.27 stop slave Failing assertion: UT_LIST_GET_LEN
Submitted: 10 Mar 2020 9:08 Modified: 9 Apr 2020 14:12
Reporter: Anthony Qiu Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.7.27 OS:CentOS (CentOS release 6.10 (Final))
Assigned to: MySQL Verification Team CPU Architecture:x86 (Intel(R) Xeon(R) CPU E5-2687W v4 @ 3.00GHz)

[10 Mar 2020 9:08] Anthony Qiu
Description:
5.7.27 slave, an assertion error occurred executing the command "stop slave or shutdown()".

2020-03-10 11:13:04 0x2b1a33ba4300  InnoDB: Assertion failure in thread 47391536988928 in file trx0rseg.cc line 134
InnoDB: Failing assertion: UT_LIST_GET_LEN(rseg->update_undo_list) == 0
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
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
03:13:04 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=8388608
read_buffer_size=16777216
max_used_connections=83
max_threads=3000
thread_count=0
connection_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 147504340 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

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 0x40000
/data/svr/mysql57/bin/mysqld(my_print_stacktrace+0x35)[0xf54815]
/data/svr/mysql57/bin/mysqld(handle_fatal_signal+0x4a4)[0x7d21b4]
/lib64/libpthread.so.0(+0xf7e0)[0x2b1a3220b7e0]
/lib64/libc.so.6(gsignal+0x35)[0x2b1a3363d4f5]
/lib64/libc.so.6(abort+0x175)[0x2b1a3363ecd5]
/data/svr/mysql57/bin/mysqld(_Z18ut_print_timestampP8_IO_FILE+0x0)[0x7c157e]
/data/svr/mysql57/bin/mysqld[0x113dd09]
/data/svr/mysql57/bin/mysqld(_Z13trx_sys_closev+0x1c0)[0x11438c0]
/data/svr/mysql57/bin/mysqld(_Z27innobase_shutdown_for_mysqlv+0x2ea)[0x11104fa]
/data/svr/mysql57/bin/mysqld[0xfefe40]
/data/svr/mysql57/bin/mysqld(_Z22ha_finalize_handlertonP13st_plugin_int+0x2c)[0x819abc]
/data/svr/mysql57/bin/mysqld[0xd39ecb]
/data/svr/mysql57/bin/mysqld[0xd3ea59]
/data/svr/mysql57/bin/mysqld(_Z15plugin_shutdownv+0x238)[0xd42bf8]
/data/svr/mysql57/bin/mysqld[0x7c7828]
/data/svr/mysql57/bin/mysqld(_Z11mysqld_mainiPPc+0x14f9)[0x7cc859]
/lib64/libc.so.6(__libc_start_main+0x100)[0x2b1a33629d20]
/data/svr/mysql57/bin/mysqld[0x7c22e9]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

--- slave configure
#skip-slave-start=1
master_info_repository = TABLE
relay_log_info_repository = TABLE
sync_binlog = 1
gtid_mode = 0
enforce_gtid_consistency = 0
log_slave_updates=1
binlog_format = row
max_binlog_size=1G
binlog_cache_size=32768
max_binlog_cache_size=4G 
relay_log = relay-log
relay_log_recovery = 1
relay_log_purge=1
slave_skip_errors = ddl_exist_errors
slave_pending_jobs_size_max=1G
slave-max-allowed-packet=1G
slave-net-timeout=60
log-bin-trust-function-creators=1
binlog_rows_query_log_events=1
slave-rows-search-algorithms = 'INDEX_SCAN,HASH_SCAN'
performance_schema=OFF
loose_innodb_numa_interleave = 1
innodb_buffer_pool_dump_pct = 40
innodb_page_cleaners = 12
innodb_undo_log_truncate = 1
innodb_max_undo_log_size = 2G
innodb_purge_rseg_truncate_frequency = 128
slave-parallel-type = LOGICAL_CLOCK
slave-parallel-workers = 0
slave_transaction_retries=128

How to repeat:
"stop slave or shutdown()" command
[9 Apr 2020 14:12] MySQL Verification Team
Hi Anthony,

This is not a software bug, this is a memory corruption bug that caused InnoDB to crash. Do you have registered ECC RAM on your server or you are running a plain RAM without any error checking? Chance of this crash happening again is very slim and not much we can do about it. If, on the other hand, you do run your server with error checking RAM then we really need to know what you did and how to reproduce this.

Stay safe
Bogdan