handle_fatal_signal (sig=6) in galera::FSM<galera::Replicator::State, galera::ReplicatorSMM::Transition, galera::EmptyGuard, galera::ReplicatorSMM::StateAction>::shift_to | galera/src/fsm.hpp:81
Description
Environment
Smart Checklist
Activity
Krunal Bauskar November 30, 2017 at 1:35 PM
commit 12a9e13401b4d9e7b781034eddf04ffe957c07d0
Author: Krunal Bauskar <krunal.bauskar@percona.com>
Date: Wed Nov 29 17:17:22 2017 +0530
PXC#806: Early read of query-id result in stale trx handle assignment.
During an execution of a Stored Procedure (SP) as a background
action (say through event scheduler), query-id get assigned at
later stage, before PXC captures it to derive wsrep_next_trx_id.
PXC uses this wsrep_next_trx_id as unique id to maintain
TrxHandle and thread mapping.
This early capture of query-id resulted in assigning an invalid
wsrep_next_trx_id (read 0). Problem starts if multiple threads
gets the same invalid (read 0) id as their unique id to look
for TrxHandle that eventually cause sharing of TrxHandle.
Solution:
--------
Fixed by ensuring that when PXC reads query_id, it is a valid id.
If not, then a valid query_id is generated.
(MySQL flow anyway generates it but at later stage).
We could have also corrected it by skipping setting of
wsrep_next_trx_id at the said stage and waiting for MySQL to
generate it but that means a drill-down code inside
the main logic. So keeping it at outer layer
makes it more manageable.
Sveta Smirnova November 24, 2017 at 10:57 AM
Details
Details
Assignee
Reporter
Labels
Fix versions
Affects versions
Priority
Smart Checklist
Open Smart Checklist
Smart Checklist

GDB info