[MDEV-17026] Assertion srv_undo_sources || ... failed on slow shutdown Created: 2018-08-21  Updated: 2018-08-21  Resolved: 2018-08-21

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Storage Engine - XtraDB
Affects Version/s: 10.1.36
Fix Version/s: 10.1.36, 10.2.18, 10.3.10

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: debug

Issue Links:
Relates
relates to MDEV-14905 Assertion `srv_undo_sources || <....>... Closed

 Description   

The assertion in trx_purge_add_update_undo_to_history() that was relaxed in MDEV-14905 is still too strict in the innodb_fast_shutdown=0 case:

./mtr --mysqld=--innodb-fast-shutdown=0 innodb.recovery_shutdown

This can randomly crash on shutdown upon completion of the rollback of a resurrected transaction:

#5  0x00007f3575bd62f1 in __GI_abort () at abort.c:79
#6  0x000055faf93394a7 in trx_purge_add_update_undo_to_history (trx=0x55fafb129e78, undo_page=0x7f3574a00000 "\346\353\305[", mtr=0x7f356c3bb8a0) at /mariadb/10.1/storage/xtradb/trx/trx0purge.cc:257
#7  0x000055faf935e637 in trx_undo_update_cleanup (trx=0x55fafb129e78, undo_page=0x7f3574a00000 "\346\353\305[", mtr=0x7f356c3bb8a0) at /mariadb/10.1/storage/xtradb/trx/trx0undo.cc:1938
#8  0x000055faf93548bb in trx_write_serialisation_history (trx=0x55fafb129e78, mtr=0x7f356c3bb8a0) at /mariadb/10.1/storage/xtradb/trx/trx0trx.cc:1217
#9  0x000055faf93559f2 in trx_commit_low (trx=0x55fafb129e78, mtr=0x7f356c3bb8a0) at /mariadb/10.1/storage/xtradb/trx/trx0trx.cc:1620
#10 0x000055faf9355ab7 in trx_commit (trx=0x55fafb129e78) at /mariadb/10.1/storage/xtradb/trx/trx0trx.cc:1667
#11 0x000055faf934908d in trx_rollback_finish (trx=0x55fafb129e78) at /mariadb/10.1/storage/xtradb/trx/trx0roll.cc:1369
#12 0x000055faf9347855 in trx_rollback_active (trx=0x55fafb129e78) at /mariadb/10.1/storage/xtradb/trx/trx0roll.cc:603
#13 0x000055faf9347c08 in trx_rollback_resurrected (trx=0x55fafb129e78, all=0x7f356c3bbe38) at /mariadb/10.1/storage/xtradb/trx/trx0roll.cc:711
#14 0x000055faf934822f in trx_rollback_or_clean_recovered (all=1) at /mariadb/10.1/storage/xtradb/trx/trx0roll.cc:833
#15 0x000055faf93482f7 in trx_rollback_or_clean_all_recovered (arg=0x0) at /mariadb/10.1/storage/xtradb/trx/trx0roll.cc:873

During slow shutdown, we can allow any rollback, and thus the condition && srv_fast_shutdown must be removed.



 Comments   
Comment by Marko Mäkelä [ 2018-08-21 ]

In 10.2, the assertion was different.

Generated at Thu Feb 08 08:33:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.