]
Manik Surtani updated JBCACHE-1166:
-----------------------------------
Fix Version/s: 1.4.1.SP5
Affects Version/s: 1.4.1.SP4
Complexity: High
See org.jboss.cache.lock.pessimistic.LockUpgradeTest
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, 1.4.1.SP4
Environment: Windows XP, Sun jdk150_06
Reporter: Jacek Halat
Assigned To: Manik Surtani
Fix For: 2.1.0.GA, 1.4.1.SP5
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: