Bug 1303483 - Clear command causing deadlock when lock time out happens
Summary: Clear command causing deadlock when lock time out happens
Keywords:
Status: CLOSED WONTFIX
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
unspecified
unspecified
Target Milestone: ER1
: 6.6.1
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks: 1309749 1311083
TreeView+ depends on / blocked
 
Reported: 2016-02-01 00:50 UTC by Osamu Nagano
Modified: 2020-09-16 06:06 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1311083 (view as bug list)
Environment:
Last Closed: 2020-09-16 06:03:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-5370 0 Major Closed Make clear() non-transactional and lock free 2020-09-16 06:03:08 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.

core/src/main/java/org/infinispan/interceptors/locking/NonTransactionalLockingInterceptor.java
~~~
     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 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.