Re: Deadlock in oscache 2.0

"Chris Miller" <[email protected]> Sat, 18 Oct 2003 19:06:49 +0100
Newsgroups gmane.comp.java.open-symphony.devel
Message-ID <[email protected]>
I checked in a fix for a deadlock problem a couple of days ago. The only
time it occurs is when there are more than two threads waiting on a new
cache entry to be built, AND you call cancelUpdate(). So give the current
CVS head a try, if that still doesn't solve the problem then file a Jira
issue and I'll investigate further. If you still see deadlocks then a test
case would be very helpful in tracking down the problem.

(As an aside, there was a nasty threading problem in 1.7.5 that caused a
memory leak and gradual performance degradation, bear that in mind if you
roll back to 1.7.5 in the meantime).

Chris


"David Rees" <[email protected]> wrote in message
news:[email protected]...
I'm seeing deadlocks in my application with multiple threads getting suck
with the following stack trace:

"Thread-60" daemon prio=1 tid=0x08ca7af0 nid=0x5290 in Object.wait()
[b71ff000..b71ffb6c]
  at java.lang.Object.wait(Native Method)
  - waiting on <0x472ccac8> (a
com.opensymphony.oscache.base.EntryUpdateState)
  at java.lang.Object.wait(Object.java:429)
  at com.opensymphony.oscache.base.Cache.getFromCache(Cache.java:238) -
locked <0x472ccac8> (a com.opensymphony.oscache.base.EntryUpdateState)
at com.opensymphony.oscache.base.Cache.getFromCache(Cache.java:183) at
com.opensymphony.oscache.general.GeneralCacheAdministrator.getFromCache(Gene
ralCacheAdministrator.java:128)

Here's my oscache.properties:

cache.useHostDomainInKey=true
# Not needed but was left in when I used to use a cache.persistence.class
cache.path=/usr/local/web/jakarta-tomcat/oscache
cache.algorithm=com.opensymphony.oscache.base.algorithm.LRUCache
cache.capacity=500

Is this a known issue?  It seemed to be worse when I a
cache.persistence.class was specified. (DiskPersistenceListener)

I never had this issue with oscache 1.7.5 before upgrading to 2.0.

-Dave





-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise
Linux in the Boardroom; in the Front Office; & in the Server Room
http://www.enterpriselinuxforum.com





-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com