Deadlock in update ProcessInstanceLog in MariaDB using BPMS 6.4

Solution In Progress - Updated -

Issue

We are running multiple BPMS 6.4 instances using MariaDB for persistence, and found the following deadlock during the execution of the LogCleanupCommand:

------------------------
LATEST DETECTED DEADLOCK
------------------------
*** (1) TRANSACTION:
TRANSACTION 1000, ACTIVE 12 sec fetching rows 
mysql tables in use 2, locked 2 
LOCK WAIT 18580 lock struct(s), heap size 2209320, 747370 row lock(s), undo log entries 60588 
delete from VariableInstanceLog where processInstanceId in (select processins1_.processInstanceId from ProcessInstanceLog processins1_ where processins1_.status in (2 , 3))

*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 250 page no 14265 n bits 184 index `PRIMARY` of table `VariableInstanceLog` trx table locks 2 total table locks 2  trx id 62189144 lock_mode X locks rec but not gap waiting lock hold time 0 wait time before grant 0

*** (2) TRANSACTION:
TRANSACTION 2000, ACTIVE 1 sec starting index read 
mysql tables in use 1, locked 1
6 lock struct(s), heap size 1184, 2 row lock(s), undo log entries 8 
update ProcessInstanceLog set [...], status=2 where id=123456

*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 250 page no 14265 n bits 184 index `PRIMARY` of table `VariableInstanceLog` trx table locks 4 total table locks 2  trx id 62190038 lock_mode X locks rec but not gap lock hold time 0 wait time before grant 0
*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 240 page no 36040 n bits 176 index `PRIMARY` of table `ProcessInstanceLog` trx table locks 4 total table locks 2  trx id 62190038 lock_mode X locks rec but not gap waiting lock hold time 0 wait time before grant 0
*** WE ROLL BACK TRANSACTION (2)

---------------------------------------------------

Environment

  • Red Hat JBoss BPM Suite
    • 6.4.7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content