Bug #90637 innodb assertion failure at !trx_commit_disallowed when async io turned off

Submitted: 26 Apr 2018 2:54 Modified: 27 Apr 2018 13:08
Reporter: Wei Zhao (OCA) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.7.17 OS:Any
Assigned to: CPU Architecture:Any

[26 Apr 2018 2:54] Wei Zhao
Description:
This is a follow up bug of https://bugs.mysql.com/bug.php?id=90402  , because of that bug, I tried to turn off linux async io by setting innodb_use_native_aio=false in config file and restarted mysqld, then after some time mysqld crashes at:

(gdb) bt
#0  0x00007f7e495cc741 in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000018d74d8 in my_write_core (sig=6) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/mysys/stacktrace.c:249
#2  0x0000000000ec4926 in handle_fatal_signal (sig=6) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/signal_handler.cc:223
#3  <signal handler called>
#4  0x00007f7e47fb81d7 in raise () from /lib64/libc.so.6
#5  0x00007f7e47fb98c8 in abort () from /lib64/libc.so.6
#6  0x0000000001be26f7 in ut_dbg_assertion_failed (expr=0x2339c73 "!trx_commit_disallowed", file=0x2339a00 "/data/home/tdengine/davie/latest/percona-server-5.7.17-11/storage/innobase/trx/trx0purge.cc", line=382)
    at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/storage/innobase/ut/ut0dbg.cc:67
#7  0x0000000001ba8890 in trx_purge_add_update_undo_to_history (trx=0x7f7e3a80d860, undo_ptr=0x7f7e3a80dc80, undo_page=0x7f7e30a18000 ">\210\030T", update_rseg_history_len=true, n_added_logs=1, mtr=0x7f7e458cfc60)
    at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/storage/innobase/trx/trx0purge.cc:382
#8  0x0000000001be0296 in trx_undo_update_cleanup (trx=0x7f7e3a80d860, undo_ptr=0x7f7e3a80dc80, undo_page=0x7f7e30a18000 ">\210\030T", update_rseg_history_len=true, n_added_logs=1, mtr=0x7f7e458cfc60)
    at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/storage/innobase/trx/trx0undo.cc:1962
#9  0x0000000001bce870 in trx_write_serialisation_history (trx=0x7f7e3a80d860, mtr=0x7f7e458cfc60) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/storage/innobase/trx/trx0trx.cc:1697
#10 0x0000000001bcfe3b in trx_commit_low (trx=0x7f7e3a80d860, mtr=0x7f7e458cfc60) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/storage/innobase/trx/trx0trx.cc:2203
#11 0x0000000001bcffb1 in trx_commit (trx=0x7f7e3a80d860) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/storage/innobase/trx/trx0trx.cc:2273
#12 0x0000000001bd0930 in trx_commit_for_mysql (trx=0x7f7e3a80d860) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/storage/innobase/trx/trx0trx.cc:2559
#13 0x000000000199648d in innobase_commit_low (trx=0x7f7e3a80d860) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/storage/innobase/handler/ha_innodb.cc:4583
#14 0x0000000001996d62 in innobase_commit (hton=0x7f7e477831e0, thd=0x7f7d8ec17000, commit_trx=false) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/storage/innobase/handler/ha_innodb.cc:4872
#15 0x0000000000f50d0d in ha_commit_low (thd=0x7f7d8ec17000, all=false, run_after_commit=false) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/handler.cc:2054
#16 0x0000000001844a62 in MYSQL_BIN_LOG::process_commit_stage_queue (this=0x2e42400 <mysql_bin_log>, thd=0x7f7d8ec17000, first=0x7f7d8ec17000) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/binlog.cc:8733
#17 0x0000000001846249 in MYSQL_BIN_LOG::ordered_commit (this=0x2e42400 <mysql_bin_log>, thd=0x7f7d8ec17000, all=false, skip_commit=false) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/binlog.cc:9432
#18 0x00000000018442ea in MYSQL_BIN_LOG::commit (this=0x2e42400 <mysql_bin_log>, thd=0x7f7d8ec17000, all=false) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/binlog.cc:8503
#19 0x0000000000f5092c in ha_commit_trans (thd=0x7f7d8ec17000, all=false, ignore_global_read_lock=false) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/handler.cc:1933
#20 0x000000000168bca0 in trans_commit_stmt (thd=0x7f7d8ec17000) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/transaction.cc:462
#21 0x000000000157c46a in mysql_execute_command (thd=0x7f7d8ec17000, first_level=true) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/sql_parse.cc:5555
#22 0x000000000157dcc7 in mysql_parse (thd=0x7f7d8ec17000, parser_state=0x7f7e458d2bd0) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/sql_parse.cc:6153
#23 0x00000000015720ab in dispatch_command (thd=0x7f7d8ec17000, com_data=0x7f7e458d3c70, command=COM_QUERY) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/sql_parse.cc:1616
#24 0x0000000001570e99 in do_command (thd=0x7f7d8ec17000) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/sql_parse.cc:1136
#25 0x000000000168a983 in threadpool_process_request (thd=0x7f7d8ec17000) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/threadpool_common.cc:284
#26 0x00000000016ae5b4 in handle_event (connection=0x7f7d30beb3e0) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/threadpool_unix.cc:2279
#27 0x00000000016ae8f8 in worker_main (param=0x7f7e4767ac20) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/threadpool_unix.cc:2404
#28 0x00000000018fb093 in pfs_spawn_thread (arg=0x7f7e45414820) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/storage/perfschema/pfs.cc:2188
#29 0x00007f7e495c7dc5 in start_thread () from /lib64/libpthread.so.0
#30 0x00007f7e4807a74d in clone () from /lib64/libc.so.6
(gdb) f 22
#22 0x000000000157dcc7 in mysql_parse (thd=0x7f7d8ec17000, parser_state=0x7f7e458d2bd0) at /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/sql_parse.cc:6153
6153    /data/home/tdengine/davie/latest/percona-server-5.7.17-11/sql/sql_parse.cc: No such file or directory.
(gdb) p thd->m_query_string 
$1 = {str = 0x7f7d31399030 "the statement is omitted, it's a replace into stmt, but not limited to a single stmt."..., 
  length = 207}
(gdb) 

however, trx_commit_disallowed is only set to true when the purge coordinator
thread is exiting(and mysqld is shutting down).apparently this bug only exist in debug build.

and the thd->m_query_string can be any writing stmt, not a specific stmt.

How to repeat:

it doesn't seem to relate to specific data or query, it happens in case of storage media block corruption.
[27 Apr 2018 13:08] MySQL Verification Team
Hi,

Thank you for your bug report.

I am sorry, but I can not verify this bug report, since it is not created with our binary.

If you manage to repeat this behaviour with our binary, please send us a full stacktrace and we shall start processing your report.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.