[jboss-jira] [JBoss JIRA] Commented: (JBCACHE-1166) UpgradeException on concurent put/remove operation

Jacek Halat (JIRA) jira-events at lists.jboss.org
Wed Aug 22 16:47:21 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBCACHE-1166?page=comments#action_12373401 ] 
            
Jacek Halat commented on JBCACHE-1166:
--------------------------------------

Stack trace for core cache:

org.jboss.cache.lock.TimeoutException: failure acquiring lock: fqn=/a/b/c/d, caller=GlobalTransaction:<null>:4, lock=write owner=GlobalTransaction:<null>:3 (activeReaders=0, activeWriter=Thread[Thread-2,5,main], waitingReaders=0, waitingWriters=0, waitingUpgrader=0)
	at org.jboss.cache.lock.IdentityLock.acquire(IdentityLock.java:528)
	at org.jboss.cache.interceptors.PessimisticLockInterceptor$LockManager.acquire(PessimisticLockInterceptor.java:579)
	at org.jboss.cache.interceptors.PessimisticLockInterceptor.acquireNodeLock(PessimisticLockInterceptor.java:393)
	at org.jboss.cache.interceptors.PessimisticLockInterceptor.lock(PessimisticLockInterceptor.java:329)
	at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:187)
	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:97)
	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.put(CacheImpl.java:1598)
	at org.jboss.cache.CacheImpl.put(CacheImpl.java:1581)
	at org.jboss.cache.aop.ConcurentOperationTestPojo$WorkThread.run(ConcurentOperationTestPojo.java:83)
Caused by: org.jboss.cache.lock.TimeoutException: write lock for /a/b/c/d could not be acquired after 10000 ms. Locks: Read lock owners: []
Write lock owner: GlobalTransaction:<null>:3
 (caller=GlobalTransaction:<null>:4, lock info: write owner=GlobalTransaction:<null>:3 (activeReaders=0, activeWriter=Thread[Thread-2,5,main], waitingReaders=0, waitingWriters=0, waitingUpgrader=0))
	at org.jboss.cache.lock.IdentityLock.acquireWriteLock0(IdentityLock.java:244)
	at org.jboss.cache.lock.IdentityLock.acquireWriteLock(IdentityLock.java:167)
	at org.jboss.cache.lock.IdentityLock.acquire(IdentityLock.java:497)
	... 17 more



> UpgradeException on concurent put/remove operation
> --------------------------------------------------
>
>                 Key: JBCACHE-1166
>                 URL: http://jira.jboss.com/jira/browse/JBCACHE-1166
>             Project: JBoss Cache
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 2.0.0.GA
>         Environment: Windows XP, Sun jdk150_06 
>            Reporter: Jacek Halat
>         Assigned To: Manik Surtani
>             Fix For: 2.1.0.GA
>
>         Attachments: ConcurentOperationTest.java, ConcurentOperationTestCore.java
>
>
> When 2 Threads simultanous are attaching/detaching object from this same region sometimes TreeCache fails with Exception:
> upgradeLockAttempt(): more than one reader trying to simultaneously upgrade to write lock
> Full StackTrace:
> org.jboss.cache.pojo.PojoCacheException: detach /a/b/c/d failed
> 	at org.jboss.cache.pojo.impl.PojoCacheImpl.detach(PojoCacheImpl.java:158)
> 	at org.jboss.cache.pojo.impl.PojoCacheDelegate.putObjectII(PojoCacheDelegate.java:143)
> 	at org.jboss.cache.pojo.impl.PojoCacheImpl.putObject(PojoCacheImpl.java:136)
> 	at org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.java:101)
> 	at org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.java:93)
> 	at org.jboss.cache.aop.ConcurentOperationTest$WorkThread.run(ConcurentOperationTest.java:80)
> Caused by: org.jboss.cache.lock.UpgradeException: failure upgrading lock: fqn=/__JBossInternal__/a/b/c/d/_ID_/a1170-d7nvs9-f5gejrti-1-f5gejrti-2, caller=GlobalTransaction:<10.1.1.252:4508>:19, lock=read owners=[GlobalTransaction:<10.1.1.252:4508>:18, GlobalTransaction:<10.1.1.252:4508>:19] (activeReaders=1, activeWriter=null, waitingReaders=0, waitingWriters=1, waitingUpgrader=1)
> 	at org.jboss.cache.lock.IdentityLock.acquire(IdentityLock.java:508)
> 	at org.jboss.cache.interceptors.PessimisticLockInterceptor$LockManager.acquire(PessimisticLockInterceptor.java:579)
> 	at org.jboss.cache.interceptors.PessimisticLockInterceptor.acquireNodeLock(PessimisticLockInterceptor.java:393)
> 	at org.jboss.cache.interceptors.PessimisticLockInterceptor.lock(PessimisticLockInterceptor.java:329)
> 	at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:187)
> 	at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
> 	at org.jboss.cache.interceptors.ReplicationInterceptor.invoke(ReplicationInterceptor.java:34)
> 	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:97)
> 	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.put(CacheImpl.java:1598)
> 	at org.jboss.cache.pojo.impl.PojoCacheDelegate.removeObject(PojoCacheDelegate.java:273)
> 	at org.jboss.cache.pojo.impl.PojoCacheImpl.removeObject(PojoCacheImpl.java:170)
> 	at org.jboss.cache.pojo.impl.PojoCacheImpl.detach(PojoCacheImpl.java:153)
> 	... 5 more
> Caused by: org.jboss.cache.lock.UpgradeException: acquireWriteLock(): lock upgrade failed for /__JBossInternal__/a/b/c/d/_ID_/a1170-d7nvs9-f5gejrti-1-f5gejrti-2 (caller=GlobalTransaction:<10.1.1.252:4508>:19, lock info: read owners=[GlobalTransaction:<10.1.1.252:4508>:18, GlobalTransaction:<10.1.1.252:4508>:19] (activeReaders=1, activeWriter=null, waitingReaders=0, waitingWriters=1, waitingUpgrader=1))
> 	at org.jboss.cache.lock.IdentityLock.acquireWriteLock0(IdentityLock.java:209)
> 	at org.jboss.cache.lock.IdentityLock.acquireWriteLock(IdentityLock.java:167)
> 	at org.jboss.cache.lock.IdentityLock.acquire(IdentityLock.java:497)
> 	... 25 more
> Caused by: org.jboss.cache.lock.UpgradeException: upgradeLockAttempt(): more than one reader trying to simultaneously upgrade to write lock
> 	at org.jboss.cache.lock.ReadWriteLockWithUpgrade.upgradeLockAttempt(ReadWriteLockWithUpgrade.java:107)
> 	at org.jboss.cache.lock.LockStrategyRepeatableRead.upgradeLockAttempt(LockStrategyRepeatableRead.java:43)
> 	at org.jboss.cache.lock.IdentityLock.acquireWriteLock0(IdentityLock.java:203)
> 	... 27 more

-- 
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