[jboss-jira] [JBoss JIRA] Commented: (JBCACHE-1355) java.util.ConcurrentModificationException under load in JBoss Cache 2.0.0.GA
Manik Surtani (JIRA)
jira-events at lists.jboss.org
Thu May 29 09:49:46 EDT 2008
[ http://jira.jboss.com/jira/browse/JBCACHE-1355?page=comments#action_12414784 ]
Manik Surtani commented on JBCACHE-1355:
----------------------------------------
This is a race condition between the PLI and CLI. Consider:
T1: attempts to lock FQN for a get() call. FQN has been evicted, so nothing is locked.
T2: attempts to lock FQN for a put(). This is loaded by the CLI and locked by T2.
T1: now gets to the CLI and in mustLoad(), attempts to peek() into the node to see if the required keys are available. Now FQN *does* exist, since T2 has loaded it, but T1 doesn't have any locks on it.
T1: Calls node.getKeysDirect() to test keys and check if loading is needed. getKeysDirect() defensively copies the keyset. Still no locks for T1!!
T2: Now puts data into the node.
T1: Comod exception!!
Created ConcurrentPutRemoveEvictTest in trunk for this.
> java.util.ConcurrentModificationException under load in JBoss Cache 2.0.0.GA
> ----------------------------------------------------------------------------
>
> Key: JBCACHE-1355
> URL: http://jira.jboss.com/jira/browse/JBCACHE-1355
> Project: JBoss Cache
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 2.0.0.GA
> Environment: JDK 1.6.0_5
> Reporter: Anton Spirkov
> Assigned To: Manik Surtani
> Priority: Critical
> Fix For: 2.2.0.GA
>
>
> Concurrent Modification Exception appears under load (~500 TPS). We Add, Read and Remove same objects all the time during the tests.
> The Exception:
> java.util.ConcurrentModificationException
> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
> at java.util.HashMap$KeyIterator.next(HashMap.java:828)
> at java.util.AbstractCollection.addAll(AbstractCollection.java:305)
> at java.util.HashSet.<init>(HashSet.java:100)
> at org.jboss.cache.UnversionedNode.getKeysDirect(UnversionedNode.java:433)
> at org.jboss.cache.interceptors.CacheLoaderInterceptor.mustLoad(CacheLoaderInterceptor.java:303)
> at org.jboss.cache.interceptors.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:168)
> at org.jboss.cache.interceptors.CacheLoaderInterceptor.invoke(CacheLoaderInterceptor.java:157)
> at org.jboss.cache.interceptors.ActivationInterceptor.invoke(ActivationInterceptor.java:67)
> at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
> at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:37)
> at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
> at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:203)
> at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
> at org.jboss.cache.interceptors.NotificationInterceptor.invoke(NotificationInterceptor.java:32)
> at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
> at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:298)
> at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:131)
> at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
> at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:81)
> at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
> at org.jboss.cache.interceptors.InvocationContextInterceptor.invoke(InvocationContextInterceptor.java:62)
> at org.jboss.cache.CacheImpl.invokeMethod(CacheImpl.java:3939)
> at org.jboss.cache.CacheImpl.get(CacheImpl.java:1441)
> at org.jboss.cache.CacheImpl.get(CacheImpl.java:1415)
> Please don't hesitate to contact me for additional information. We use jboss cache at the production site, so it's quite critical for us to solve this issue. Thanks!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list