Bug #96108 To run mtr "innodb.log_flush_order" MySql Server would be always core down
Submitted: 5 Jul 2019 12:45 Modified: 8 Jul 2019 12:15
Reporter: juncai meng Email Updates:
Status: Verified Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S7 (Test Cases)
Version:8.0.16 OS:CentOS
Assigned to: CPU Architecture:Any

[5 Jul 2019 12:45] juncai meng
Description:
Run mtr innodb.log_flush_order , mysql server core down:

2019-07-05T12:27:45.457029Z 0 [ERROR] [MY-013183] [InnoDB] Assertion failure: srv0srv.cc:2906:purge_sys->n_stop == 0 thread 140106706843392
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.
12:27:45 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7f6c94002890
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 = 7f6d227deb98 thread_stack 0x46000
/data/taurus/mysql-8.0.16/install/bin/mysqld(my_print_stacktrace(unsigned char*, unsigned long)+0x43) [0x40596c8]
/data/taurus/mysql-8.0.16/install/bin/mysqld(handle_fatal_signal+0x291) [0x2e1ea05]
/lib64/libpthread.so.0(+0xf5e0) [0x7f6d2fd695e0]
/lib64/libc.so.6(gsignal+0x37) [0x7f6d2e16d1f7]
/lib64/libc.so.6(abort+0x148) [0x7f6d2e16e8e8]
/data/taurus/mysql-8.0.16/install/bin/mysqld(ut_dbg_assertion_failed(char const*, char const*, unsigned long)+0x183) [0x45a2ee0]
/data/taurus/mysql-8.0.16/install/bin/mysqld() [0x4517e7c]
/data/taurus/mysql-8.0.16/install/bin/mysqld(srv_purge_coordinator_thread()+0x1ca) [0x45181dc]
/data/taurus/mysql-8.0.16/install/bin/mysqld(void std::__invoke_impl<void, void (*&)()>(std::__invoke_other, void (*&)())+0x1d) [0x4309e0e]
/data/taurus/mysql-8.0.16/install/bin/mysqld(std::__invoke_result<void (*&)()>::type std::__invoke<void (*&)()>(void (*&)())+0x20) [0x4308a53]
/data/taurus/mysql-8.0.16/install/bin/mysqld(void std::_Bind<void (*())()>::__call<void>(std::tuple<>&&, std::_Index_tuple<>)+0x1c) [0x4306c7c]
/data/taurus/mysql-8.0.16/install/bin/mysqld(void std::_Bind<void (*())()>::operator()<, void>()+0x24) [0x4304de4]
/data/taurus/mysql-8.0.16/install/bin/mysqld(void Runnable::operator()<void (*)()>(void (*&&)())+0x46) [0x4302a76]
/data/taurus/mysql-8.0.16/install/bin/mysqld(void std::__invoke_impl<void, Runnable, void (*)()>(std::__invoke_other, Runnable&&, void (*&&)())+0x37) [0x42fe16c]
/data/taurus/mysql-8.0.16/install/bin/mysqld(std::__invoke_result<Runnable, v

How to repeat:
Modify mysqltest.cc 

remove codes on function do_shutdown_server, follow:

//if (ds_timeout.length) {
 //   char *endptr;
 //   timeout = std::strtol(ds_timeout.str, &endptr, 10);
 //   if (*endptr != '\0')
 //     die("Illegal argument for timeout: '%s'", ds_timeout.str);
 // }

make an make install, run command:
./mtr --parallel=1 --skip-rpl innodb.log_flush_order

Suggested fix:
  "set innodb_purge_stop_now = 1" and "mysqld shutdown" concurrent execution can exists some problem.
[8 Jul 2019 12:15] MySQL Verification Team
Hello juncai meng,

Thank you for the report.

regards,
Umesh