• Bug
  • Status: Resolved
  • 2 Major
  • Resolution: Not a Bug
  • ehcache-core
  • alexsnaps
  • Reporter: xpoinsar
  • June 22, 2012
  • 0
  • Watchers: 2
  • October 17, 2012
  • October 04, 2012

Description

I have encountered several times the same blocking situation. Here is the stack trace : “http-8080-exec-3” daemon prio=10 tid=0x00000000052f1000 nid=0x103b runnable [0x00000000453f4000] java.lang.Thread.State: RUNNABLE at net.sf.ehcache.store.chm.SelectableConcurrentHashMap.getRandomValues(SelectableConcurrentHashMap.java:84) at net.sf.ehcache.store.MemoryStore.sampleElements(MemoryStore.java:621) at net.sf.ehcache.store.MemoryStore.findEvictionCandidate(MemoryStore.java:606) at net.sf.ehcache.store.MemoryStore.removeElementChosenByEvictionPolicy(MemoryStore.java:578) at net.sf.ehcache.store.MemoryStore.checkCapacity(MemoryStore.java:561) at net.sf.ehcache.store.MemoryStore.put(MemoryStore.java:261) at net.sf.ehcache.store.FrontEndCacheTier.put(FrontEndCacheTier.java:257) at net.sf.ehcache.Cache.putInternal(Cache.java:1489) at net.sf.ehcache.Cache.put(Cache.java:1417) at net.sf.ehcache.Cache.put(Cache.java:1382) at net.sf.ehcache.hibernate.regions.EhcacheTransactionalDataRegion.put(EhcacheTransactionalDataRegion.java:142) at net.sf.ehcache.hibernate.regions.EhcacheTransactionalDataRegion.putPinned(EhcacheTransactionalDataRegion.java:134) at net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy.putLock(AbstractReadWriteEhcacheAccessStrategy.java:171) at net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy.lockItem(AbstractReadWriteEhcacheAccessStrategy.java:115) at net.sf.ehcache.hibernate.nonstop.NonstopAwareCollectionRegionAccessStrategy.lockItem(NonstopAwareCollectionRegionAccessStrategy.java:106) at org.hibernate.action.CollectionAction.beforeExecutions(CollectionAction.java:88) at org.hibernate.engine.ActionQueue.prepareActions(ActionQueue.java:293) at org.hibernate.engine.ActionQueue.prepareActions(ActionQueue.java:200) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:320) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1185) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1261) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)

Comments

Xavier Poinsard 2012-06-23

In fact, it is not blocked but deadly slow.

Fiona OShea 2012-06-25

WE probably need to get additional information from the reporter before delving any deeper.

Xavier Poinsard 2012-06-25

I found why it was so slow : the cache size wasn’t big enough to contain all the (sub) objects loaded by the query. Ehcache was trying desperately to find some objects to evict.

Alexander Snaps 2012-06-26

So, basically, every element added to the cache, because returned by the query, was triggering eviction, is that it ? Can we consider this a non-issues ?

Xavier Poinsard 2012-06-27

Well, this isn’t a bug. But I think there could be some improvements in this area.