[jboss-dev-forums] [Design of JBossCache] - Re: Eviction thread behaviour

manik.surtani@jboss.com do-not-reply at jboss.com
Thu Oct 26 09:13:56 EDT 2006


anonymous wrote : 
  | 
  | What I don't understand is still the cause of the problem. I understand you can't reproduce it reading from the Jira, right?
  | 
  | 

I couldn't reproduce it because of a timing problem, but I do completely understand the cause of the problem.  Consider (LIFO):

1)  Eviction queue is close to full, cache region is full.
2)  Start a tx
3)  Add stuff to the cache
4)  Causes older items in the region to be queued for eviction
5)  tx reads item in cache, which was queued for eviction
6)  Node visited event in 5) not yet received, Eviction Thread attemps to process queue.  Waiting on RL in 5)
7) tx attempts to write more stuff, but blocks because this triggers more evictions and the eviction queue is now full.

The tx doesn't get a chance to commit and release the RL in 5), because 7) blocks.  The eviction thread cannot empty the quete because it is waiting n 5).  Deadlock, until lock timeout!

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

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



More information about the jboss-dev-forums mailing list