[infinispan-issues] [JBoss JIRA] Commented: (ISPN-1258) IllegalMonitorStateException when prepare/commit sequence happens in diff threads
Mircea Markus (JIRA)
jira-events at lists.jboss.org
Fri Jul 29 07:11:23 EDT 2011
[ https://issues.jboss.org/browse/ISPN-1258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617501#comment-12617501 ]
Mircea Markus commented on ISPN-1258:
-------------------------------------
@galderz the log shows that the test did a put ("a", "value1"). The only test in the suite that does that is TransactionsSpanningReplicatedCachesTest.
As it is not possible to inject the TM into the cache after it has stared, the only scenario in which this can happen in when the cluster is not symmetric: a TM is configured on one node and it is not configured on the other. Looking at git's history for TransactionsSpanningReplicatedCachesTest, this was indeed the case and was fixed by Dan with ISPN-1123. So this was a test issue and it is not fixed.
> IllegalMonitorStateException when prepare/commit sequence happens in diff threads
> ---------------------------------------------------------------------------------
>
> Key: ISPN-1258
> URL: https://issues.jboss.org/browse/ISPN-1258
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.0.0.CR8
> Reporter: Galder Zamarreño
> Assignee: Mircea Markus
> Fix For: 5.0.0.FINAL
>
> Attachments: IllegalMonitor_issue.patch
>
>
> There's no guarantees at the JGroups level that in a sequence of prepare+commit calls, both will be handled by the same thread as shown in the logs:
> Here's a prepare call:
> {code}2011-07-20 21:01:44,400 2011 TRACE [org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher] (OOB-1,Infinispan-Cluster,NodeB-10116:)
> Attempting to execute command: PrepareCommand {gtx=GlobalTransaction:<NodeA-32281>:1:local, modifications=[PutKeyValueCommand{key=a, value=value1,
> flags=null, putIfAbsent=false, lifespanMillis=-1, maxIdleTimeMillis=-1}], onePhaseCommit=false, gtx=GlobalTransaction:<NodeA-32281>:1:local,
> cacheName='cache1'} [sender=NodeA-32281]
> ...
> 2011-07-20 21:01:44,404 2015 TRACE [org.infinispan.util.concurrent.locks.containers.AbstractPerEntryLockContainer] (OOB-1,Infinispan-Cluster,NodeB-
> 10116:cache1) Acquired lock java.util.concurrent.locks.ReentrantLock at 7cd1a1ab[Locked by thread OOB-1,Infinispan-Cluster,NodeB-10116]{code}
> And the commit:
> {code}2011-07-20 21:01:44,418 2029 TRACE [org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher] (OOB-2,Infinispan-Cluster,NodeB-10116:)
> Attempting to execute command: CommitCommand {gtx=GlobalTransaction:<NodeA-32281>:1:local, cacheName='cache1'} [sender=NodeA-32281]
> ...
> 2011-07-20 21:01:44,423 2034 TRACE [org.infinispan.util.concurrent.locks.containers.AbstractPerEntryLockContainer] (OOB-2,Infinispan-Cluster,NodeB-
> 10116:cache1) Unlock lock java.util.concurrent.locks.ReentrantLock at 7cd1a1ab[Locked by thread OOB-1,Infinispan-Cluster,NodeB-10116]{code}
> The end result?
> {code}
> 2011-07-20 21:01:44,424 2035 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (OOB-2,Infinispan-Cluster,NodeB-10116:cache1) ISPN000136:
> Execution error
> java.lang.IllegalMonitorStateException
> at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:127)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1239)
> at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)
> at org.infinispan.util.concurrent.locks.containers.AbstractPerEntryLockContainer.releaseLock(AbstractPerEntryLockContainer.java:113)
> at org.infinispan.util.concurrent.locks.LockManagerImpl.unlock(LockManagerImpl.java:113)
> at org.infinispan.interceptors.LockingInterceptor.cleanupLocks(LockingInterceptor.java:375)
> at org.infinispan.interceptors.LockingInterceptor.visitCommitCommand(LockingInterceptor.java:98)
> {code}
> Mircea, could you have a look?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list