Bug 1303483 - Clear command causing deadlock when lock time out happens [NEEDINFO]
Summary: Clear command causing deadlock when lock time out happens
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan
Version: 6.4.1,6.5.0,6.6.0,6.5.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: ER1
: 6.6.1
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
Depends On:
Blocks: 1309749 1311083
TreeView+ depends on / blocked
Reported: 2016-02-01 00:50 UTC by Osamu Nagano
Modified: 2019-10-10 11:03 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1311083 (view as bug list)
Last Closed:
Type: Bug
myoshida: needinfo? (ttarrant)

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
JBoss Issue Tracker ISPN-5370 Major Resolved Make clear() non-transactional and lock free 2017-02-21 04:24:19 UTC

Description Osamu Nagano 2016-02-01 00:50:07 UTC
TimeoutException thrown at line 46 is not caught and the lock never released.  Hot Rod client will retry the same clear command on a different node, leading to a deadlock.

     39    @Override
     40    public Object visitClearCommand(InvocationContext ctx, ClearCommand command) throws Throwable {
     41       assertNonTransactional(ctx);
     42       boolean skipLocking = hasSkipLocking(command);
     43       long lockTimeout = getLockAcquisitionTimeout(command, skipLocking);
     44       for (Object key: dataContainer.keySet()) {
     45          if (shouldLock(key, command)) {
     46             lockKey(ctx, key, lockTimeout, skipLocking);
     47          }
     48       }
     49       try {
     50          return invokeNextInterceptor(ctx, command);
     51       } finally {
     52          lockManager.unlockAll(ctx);
     53       }
     54    }

Comment 7 Mike McCune 2016-03-28 23:42:22 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions

Comment 8 Anna Manukyan 2016-08-17 08:56:28 UTC
Verified, thanks!

Note You need to log in before you can comment on or make changes to this bug.