Description:
Mysql8.0 bugcheck is observed during stress test on aarch64 server.
Errorlog:
---------
2019-03-20T08:26:35.547378Z 62 [ERROR] [MY-013183] [InnoDB] Assertion failure: sync0rw.ic:499 thread 281471895343344
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/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
08:26:35 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=131072
max_used_connections=64
max_threads=4000
thread_count=65
connection_count=64
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1588879 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0xffe328000db0
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 = ffff48560888 thread_stack 0x46000
/home/linux/mysql-8.0/1-install/bin/mysqld(my_print_stacktrace(unsigned char*, unsigned long)+0x44) [0xaaaac5ec412c]
/home/linux/mysql-8.0/1-install/bin/mysqld(handle_fatal_signal+0x3bc) [0xaaaac52acb44]
linux-vdso.so.1(__kernel_rt_sigreturn+0) [0xffffab8746c0]
/lib/aarch64-linux-gnu/libc.so.6(raise+0xb0) [0xffffab1bc4d8]
How to repeat:
On aarch64 server
- Build and install mysql server 8.0 from latest source code
- Run mysql service
- Server should have at least 128G ram, and db storage should be SSD or NVMe
On x86 client
- Install sysbench 1.0
- Run sysbench for stress testing "sysbench-1.0/bin/sysbench --test=sysbench-1.0-bin/share/sysbench/tests/include/oltp_legacy/parallel_prepare.lua --oltp-tables-count=64 --oltp-table-size=10000000 --mysql-host=huawei-amd --mysql-port=20000 --mysql-db=testdbx --mysql-user=root --mysql-password=root --num-threads=64 --max-requests=64 run"
- Network connection should be at least 1G
Suggested fix:
Same bug for mysql5.7 is reported at https://bugs.mysql.com/bug.php?id=94699
Per out test, the fix for mysql5.7 also works for mysql8.0. Will upstream soon.