[jboss-user] [JBoss Cache: Core Edition] - Re: BerkeleyDB Deadlock Exception from JBoss Cache Loader: B

niuxuetao_fiserv do-not-reply at jboss.com
Mon Jun 22 14:40:57 EDT 2009


Hi Galder,

Thanks for the hints to probe the problem!

The size of a Pojo is between 5k and 100k by estimate.

I did not track the lock-holder thread's behavior, cuz I do not know how to do it, could you give some tips on this?

I disabled the preloading and I haven't seen the berkeleyDb deadlock exception, but often see jboss cache lock exception as below if I set the lockAcquisitionTimeout to smaller values.


  | org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn [/RTDE/pattern-matching-threshold/663330655] after [100] milliseconds for requestor [GlobalTransaction:<null>:2]! Lock held by [GlobalTransaction:<null>:1]
  | 	at org.jboss.cache.mvcc.MVCCNodeHelper.acquireLock(MVCCNodeHelper.java:170)
  | 	at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodeForWriting(MVCCNodeHelper.java:203)
  | 	at org.jboss.cache.interceptors.MVCCLockingInterceptor.handlePutKeyValueCommand(MVCCLockingInterceptor.java:98)
  | 	at org.jboss.cache.interceptors.base.PrePostProcessingCommandInterceptor.visitPutKeyValueCommand(PrePostProcessingCommandInterceptor.java:88)
  | 	at org.jboss.cache.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:100)
  | 	at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
  | 	at org.jboss.cache.interceptors.CacheLoaderInterceptor.visitPutKeyValueCommand(CacheLoaderInterceptor.java:130)
  | 	at org.jboss.cache.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:100)
  | 	at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
  | 	at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
  | 	at org.jboss.cache.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:65)
  | 	at org.jboss.cache.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:100)
  | 	at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
  | 	at org.jboss.cache.interceptors.TxInterceptor.attachGtxAndPassUpChain(TxInterceptor.java:284)
  | 	at org.jboss.cache.interceptors.TxInterceptor.handleDefault(TxInterceptor.java:271)
  | 	at org.jboss.cache.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:65)
  | 	at org.jboss.cache.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:100)
  | 	at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
  | 	at org.jboss.cache.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:178)
  | 	at org.jboss.cache.interceptors.InvocationContextInterceptor.visitPutKeyValueCommand(InvocationContextInterceptor.java:82)
  | 	at org.jboss.cache.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:100)
  | 	at org.jboss.cache.interceptors.InterceptorChain.invoke(InterceptorChain.java:265)
  | 	at org.jboss.cache.invocation.CacheInvocationDelegate.put(CacheInvocationDelegate.java:560)
  | 	at org.jboss.cache.pojo.impl.InternalHelper.lockPojo(InternalHelper.java:342)
  | 	at org.jboss.cache.pojo.impl.PojoCacheDelegate.putObject(PojoCacheDelegate.java:101)
  | 	at org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.java:102)
  | 

What I am also wondering are these:
- Does the lockAcquisitionTimeout configuration of jboss cache also change Berkeley DB's such configuration?
- If I set the lockAcquisitionTimeout to a the largest available figure, is there a true deadlock possibility in JBoss cache (when using either of the READ_COMMITED or REPEATABLE_READ isolation levels)? By "true deadlock" I mean even if someone can let the lock requester wait for any amount of longer time, the requester will NEVER get the lock.

Thanks a lot!

Xuetao

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4239181#4239181

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4239181



More information about the jboss-user mailing list