[jboss-user] [JBoss Cache Users] - org.jboss.cache.lock.UpgradeException: upgrade lock for /lpr
ravendra.gupta
do-not-reply at jboss.com
Thu Sep 10 03:31:03 EDT 2009
Hi All, I am using Jboss cache 'Implementation-Version: 1.4.1.SP9'
I needed simple functionality to store and retrive objects into cache because of memory constraints.
my design is, two threads putting objects on a node concurrently after putting few thousands objects it throws org.jboss.cache.lock.UpgradeException exception
| 08:48:27,987 ERROR [LocalCache] cache put error. Key: [187885DataLoaderThread-27]. Cache: [/lpr/DataLoaderThread-27]
| org.jboss.cache.lock.UpgradeException: failure upgrading lock: fqn=/lpr, caller=Thread[DataLoaderThread-27,5,jboss], lock=read owners=[Thread[DataLoad
| erThread-28,5,jboss]] (activeReaders=1, activeWriter=null, waitingReaders=0, waitingWriters=0, waitingUpgrader=0)
| at org.jboss.cache.Node.acquire(Node.java:517)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.acquireNodeLock(PessimisticLockInterceptor.java:410)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.lock(PessimisticLockInterceptor.java:322)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:189)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:32)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:379)
| at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:174)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:157)
| at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5919)
| at org.jboss.cache.TreeCache.put(TreeCache.java:3858)
| at org.jboss.cache.TreeCache.put(TreeCache.java:3799)
| at sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy185.put(Unknown Source)
| at com.logica.heca.lpr.cache.LocalCache.put(LocalCache.java:99)
| at com.logica.heca.lpr.cache.ContactVOCache.put(ContactVOCache.java:45)
| at com.logica.heca.lpr.dataLoader.DataLoaderThread.run(DataLoaderThread.java:169)
| Caused by: org.jboss.cache.lock.UpgradeException: upgrade lock for /lpr could not be acquired after 50000 ms. Lock map ownership Read lock owners: [Th
| read[DataLoaderThread-28,5,jboss]]
| Write lock owner: null
| (caller=Thread[DataLoaderThread-27,5,jboss], lock info: read owners=[] (activeReaders=1, activeWriter=null, waitingReaders=0, waitingWriters=0, waiti
| ngUpgrader=0))
| at org.jboss.cache.lock.IdentityLock.acquireWriteLock(IdentityLock.java:187)
| at org.jboss.cache.Node.acquireWriteLock(Node.java:562)
| at org.jboss.cache.Node.acquire(Node.java:509)
| ... 26 more
| 08:48:27,987 ERROR [DataLoaderThread] What happend? ... we got an unexpected Exception in the worker thread [DataLoaderThread-27]. The thread termina
| tes
| com.logica.heca.lpr.common.exception.FatalException: Could not store object
| at com.logica.heca.lpr.cache.LocalCache.put(LocalCache.java:102)
| at com.logica.heca.lpr.cache.ContactVOCache.put(ContactVOCache.java:45)
| at com.logica.heca.lpr.dataLoader.DataLoaderThread.run(DataLoaderThread.java:169)
| Caused by: org.jboss.cache.lock.UpgradeException: failure upgrading lock: fqn=/lpr, caller=Thread[DataLoaderThread-27,5,jboss], lock=read owners=[Thre
| ad[DataLoaderThread-28,5,jboss]] (activeReaders=1, activeWriter=null, waitingReaders=0, waitingWriters=0, waitingUpgrader=0)
| at org.jboss.cache.Node.acquire(Node.java:517)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.acquireNodeLock(PessimisticLockInterceptor.java:410)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.lock(PessimisticLockInterceptor.java:322)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:189)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:32)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:379)
| at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:174)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:157)
| at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5919)
| at org.jboss.cache.TreeCache.put(TreeCache.java:3858)
| at org.jboss.cache.TreeCache.put(TreeCache.java:3799)
| at sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy185.put(Unknown Source)
| at com.logica.heca.lpr.cache.LocalCache.put(LocalCache.java:99)
| ... 2 more
| Caused by: org.jboss.cache.lock.UpgradeException: upgrade lock for /lpr could not be acquired after 50000 ms. Lock map ownership Read lock owners: [Th
| read[DataLoaderThread-28,5,jboss]]
| Write lock owner: null
| (caller=Thread[DataLoaderThread-27,5,jboss], lock info: read owners=[] (activeReaders=1, activeWriter=null, waitingReaders=0, waitingWriters=0, waiti
| ngUpgrader=0))
| at org.jboss.cache.lock.IdentityLock.acquireWriteLock(IdentityLock.java:187)
| at org.jboss.cache.Node.acquireWriteLock(Node.java:562)
| at org.jboss.cache.Node.acquire(Node.java:509)
| ... 26 more
|
|
cache config file :
<mbean code="org.jboss.cache.TreeCache" name="logica_lpr:service=LocalCache">
| <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
| <attribute name="LockParentForChildInsertRemove">true</attribute>
| <attribute name="LockAcquisitionTimeout">50000</attribute>
|
|
| <attribute name="CacheMode">LOCAL</attribute>
| <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.ElementSizePolicy</attribute>
| <!-- Specific eviction policy configurations. This is LRU -->
| <attribute name="EvictionPolicyConfig">
| <config>
| <attribute name="wakeUpIntervalSeconds">1</attribute>
| <!-- Cache wide default -->
| <region name="/_default_">
| <attribute name="maxNodes">2</attribute>
| <attribute name="maxElementsPerNode">15000</attribute>
| </region>
|
| </config>
| </attribute>
| </mbean>
any help from anybody would be highly appreciable
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254336#4254336
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254336
More information about the jboss-user
mailing list