Debug assertion failure on shutdown if XA PREPAREd transactions exist

Bug #1468326 reported by Laurynas Biveinis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Low
Laurynas Biveinis
5.1
Invalid
Undecided
Unassigned
5.5
Invalid
Undecided
Unassigned
5.6
Fix Released
Low
Laurynas Biveinis

Bug Description

2015-06-24 14:58:42 13653 [Note] InnoDB: Starting shutdown...
2015-06-24 14:58:44 11865a000 InnoDB: Assertion failure in thread 4704280576 in file trx0trx.cc line 186
InnoDB: Failing assertion: mutex_own(&trx_sys->mutex)

  thread #3: tid = 0x0002, 0x00007fff8f36a286 libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGSTOP
    frame #0: 0x00007fff8f36a286 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff8c5c242f libsystem_pthread.dylib`pthread_kill + 90
    frame #2: 0x00000001102a9cc1 mysqld-debug`my_write_core(sig=6) + 49 at stacktrace.c:422
    frame #3: 0x000000010febd01d mysqld-debug`handle_fatal_signal(sig=6) + 1773 at signal_handler.cc:236
    frame #4: 0x00007fff9615cf1a libsystem_platform.dylib`_sigtramp + 26
    frame #5: 0x00007fff8f36a287 libsystem_kernel.dylib`__pthread_kill + 11
    frame #6: 0x00000001186594a0
    frame #7: 0x00007fff8d318b53 libsystem_c.dylib`abort + 129
    frame #8: 0x000000011066f13d mysqld-debug`trx_release_descriptor(trx=0x00007fe4e29e4678) + 93 at trx0trx.cc:186
    frame #9: 0x00000001106702ae mysqld-debug`trx_free_prepared(trx=0x00007fe4e29e4678) + 878 at trx0trx.cc:486
    frame #10: 0x000000011066d3f1 mysqld-debug`trx_sys_close() + 545 at trx0sys.cc:1205
    frame #11: 0x0000000110638bd7 mysqld-debug`innobase_shutdown_for_mysql() + 663 at srv0start.cc:3113
    frame #12: 0x0000000110469879 mysqld-debug`innobase_end(hton=0x00007fe4e1d06da0, type=HA_PANIC_CLOSE) + 201 at ha_innodb.cc:3805
    frame #13: 0x000000010fd0b761 mysqld-debug`ha_finalize_handlerton(plugin=0x00007fe4e29239c8) + 225 at handler.cc:643
    frame #14: 0x00000001100432fb mysqld-debug`plugin_deinitialize(plugin=0x00007fe4e29239c8, ref_check=true) + 235 at sql_plugin.cc:944
    frame #15: 0x000000011004094d mysqld-debug`reap_plugins() + 477 at sql_plugin.cc:1023
    frame #16: 0x0000000110043825 mysqld-debug`plugin_shutdown() + 181 at sql_plugin.cc:1721
    frame #17: 0x000000011018a3df mysqld-debug`clean_up(print_message=true) + 399 at mysqld.cc:1943
    frame #18: 0x000000011018a22e mysqld-debug`unireg_end() + 14 at mysqld.cc:1811
    frame #19: 0x000000011018a1b9 mysqld-debug`kill_server(sig_ptr=0x0000000000000000) + 425 at mysqld.cc:1739
    frame #20: 0x0000000110189ff3 mysqld-debug`kill_server_thread(arg=0x000000011853de50) + 35 at mysqld.cc:1762
    frame #21: 0x0000000110711b4c mysqld-debug`pfs_spawn_thread(arg=0x00007fe4e1e16020) + 412 at pfs.cc:1860
    frame #22: 0x00007fff8c5c0268 libsystem_pthread.dylib`_pthread_body + 131
    frame #23: 0x00007fff8c5c01e5 libsystem_pthread.dylib`_pthread_start + 176
    frame #24: 0x00007fff8c5be41d libsystem_pthread.dylib`thread_start + 13

This is visible on the new upstream testcase innodb.xa_recovery on 5.6.25. The reason is that the trx sys mutex is not taken in trx_free_prepared, which is only used the single-threaded InnoDB shutdown, but trx_release_descriptor expects the mutex locked unconditionally.

tags: added: ci xtradb
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-2116

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints