The problem is, as the crash states, is due to X-lock.
sys_header = trx_sysf_get(&mtr); is called twice in the code:
a) first in trx_sys_read_wsrep_checkpoint(XID* xid)
b) second in trx_sys_update_wsrep_checkpoint(xid, &mtr); while the first X-lock is still held which causes the crash.
Hence, the fix above works. Tested with SST.
>>./run.sh -c galera55 -d /pxc56 -t t/xb_galera_sst.sh
Detecting server version...
Running against Percona Server 5.6.13-24.0-debug (XtraDB 5.6.13-rc60.5)
Using 'xtrabackup_55' as xtrabackup binary
Using 8 parallel workers
==============================================================================
TEST WORKER RESULT TIME(s) or COMMENT
------------------------------------------------------------------------------
xb_galera_sst w1 [passed] 52
==============================================================================
Spent 52 of 68 seconds executing testcases
SUMMARY: 1 run, 1 successful, 0 skipped, 0 failed
See results/ for detailed output
./run.sh -c galera55 -d /pxc56 -t t/xb_galera_sst.sh 8.03s user 2.92s system 16% cpu 1:07.86 total
This affects codership tree as well, just that due to UNIV_SYNC_DEBUG being disabled, it is masked.
=== modified file 'Percona- Server/ storage/ innobase/ trx/trx0sys. cc' Server/ storage/ innobase/ trx/trx0sys. cc 2013-09-05 13:50:58 +0000 Server/ storage/ innobase/ trx/trx0sys. cc 2013-09-30 12:22:41 +0000
mtr_start( &mtr);
--- Percona-
+++ Percona-
@@ -358,12 +358,14 @@
sys_header = trx_sysf_get(&mtr); from_4( sys_header + TRX_SYS_ WSREP_XID_ INFO WSREP_XID_ MAGIC_N_ FLD)) WSREP_XID_ MAGIC_N) { from_4( sys_header + TRX_SYS_ WSREP_XID_ INFO + TRX_SYS_ WSREP_XID_ MAGIC_N_ FLD); WSREP_XID_ MAGIC_N) {
memset( xid, 0, sizeof(*xid));
xid- >formatID = -1;
trx_ sys_update_ wsrep_checkpoin t(xid, &mtr);
mtr_ commit( &mtr);
return;
-
- if ((magic = mach_read_
- + TRX_SYS_
- != TRX_SYS_
+ magic = mach_read_
+
+ mtr_commit(&mtr);
+
+ if (magic != TRX_SYS_
+ mtr_start(&mtr);
fixes it, but a better fix will also do.
The problem is, as the crash states, is due to X-lock.
sys_header = trx_sysf_get(&mtr); is called twice in the code:
a) first in trx_sys_ read_wsrep_ checkpoint( XID* xid)
b) second in trx_sys_ update_ wsrep_checkpoin t(xid, &mtr); while the first X-lock is still held which causes the crash.
Hence, the fix above works. Tested with SST.
>>./run.sh -c galera55 -d /pxc56 -t t/xb_galera_sst.sh
Detecting server version...
Running against Percona Server 5.6.13-24.0-debug (XtraDB 5.6.13-rc60.5)
Using 'xtrabackup_55' as xtrabackup binary
Using 8 parallel workers
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= = ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- - ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= =
TEST WORKER RESULT TIME(s) or COMMENT
-------
xb_galera_sst w1 [passed] 52
=======
Spent 52 of 68 seconds executing testcases
SUMMARY: 1 run, 1 successful, 0 skipped, 0 failed
See results/ for detailed output
./run.sh -c galera55 -d /pxc56 -t t/xb_galera_sst.sh 8.03s user 2.92s system 16% cpu 1:07.86 total