• Bug
  • Status: Open
  • 2 Major
  • Resolution:
  • abroszni
  • Reporter: foshea
  • January 28, 2013
  • 0
  • Watchers: 6
  • February 10, 2015

Description

From comments in EHC-973 We are getting similar exception with Java String as cache keys. we are using plain ehcahe with diskpersistent=”true” and eternal=”true”. Version : BigMemory G0 3.7.2 net.sf.ehcache.CacheException: Failure while decoding key java.nio.HeapByteBuffer[pos=0 lim=0 cap=0] at net.sf.ehcache.store.offheap.portability.EhcacheKeyPortability.decode(EhcacheKeyPortability.java:55) at net.sf.ehcache.store.offheap.portability.EhcacheKeyPortability.equals(EhcacheKeyPortability.java:60) at com.terracottatech.offheapstore.storage.PortabilityBasedStorageEngine.equalsKey(PortabilityBasedStorageEngine.java:108) at com.terracottatech.offheapstore.OffHeapHashMap.keyEquals(OffHeapHashMap.java:914) at com.terracottatech.offheapstore.OffHeapHashMap.put(OffHeapHashMap.java:466) at com.terracottatech.offheapstore.OffHeapHashMap.put(OffHeapHashMap.java:408) at com.terracottatech.offheapstore.AbstractLockedOffHeapHashMap.put(AbstractLockedOffHeapHashMap.java:121) at com.terracottatech.offheapstore.concurrent.AbstractConcurrentOffHeapMap.put(AbstractConcurrentOffHeapMap.java:188) at net.sf.ehcache.store.offheap.disk.OffHeapDiskStore.put(OffHeapDiskStore.java:129) at net.sf.ehcache.store.FrontEndCacheTier.put(FrontEndCacheTier.java:261) at net.sf.ehcache.Cache.putInternal(Cache.java:1459) at net.sf.ehcache.Cache.put(Cache.java:1387) at net.sf.ehcache.Cache.put(Cache.java:1352) at in.co.test.cache.Cache.put(Cache.java:47) Caused by: java.io.EOFException at java.io.DataInputStream.readByte(DataInputStream.java:261) at net.sf.ehcache.store.offheap.portability.AbstractEhcachePortability.readObjects(AbstractEhcachePortability.java:72) at net.sf.ehcache.store.offheap.portability.EhcacheKeyPortability.decode(EhcacheKeyPortability.java:51) … 19 more

Comments

Fiona OShea 2013-01-28

I believe this may be resolved in 3.7.3, as it seems to have been updated in a later 3.7.2 *which this user may not have access to. Can you confirm?

Gautam Jayaprakash 2013-01-29

Can you take a look?

Tim Wu 2013-02-21

Chris is seeing some monkey issue that looks similar. However it only happens on solaris. What OS was the exception seen on?

Kumar Reddy 2013-02-21

We observed this issue on IBM AIX.

Deepak R 2013-02-22

Mitigated to a large extent by increasing the maxElementsInMemory setting to cover the count of all the objects you will ever put into the cache.

rakesh joshi 2013-06-13

Hi,

Do we have any update on this , one of our customer is facing this issue . Is it fixed or do we have any workaround.

Fiona OShea 2013-06-17

GTS Team - EHC is a public Jira. Please do not add any Customer information here and make sure that the Comment is only viewable to Terracotta_Internal. thanks btw AIX was not a supported platform for 3.7.2

Kumar Reddy 2015-02-10

Any update on this? We are getting this exception on BigMemory GO 4.2 also.

net.sf.ehcache.CacheException: Failure while decoding key
java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]
        at net.sf.ehcache.store.offheap.portability.EhcacheKeyPortability.decode(EhcacheKeyPortability.java:57)
        at net.sf.ehcache.store.offheap.portability.EhcacheKeyPortability.equals(EhcacheKeyPortability.java:62)
        at 
com.terracottatech.offheapstore.storage.PortabilityBasedStorageEngine.equalsKey(PortabilityBasedStorageEngine.java:114)
        at
com.terracottatech.offheapstore.OffHeapHashMap.keyEquals(OffHeapHashMap.java:921)

        at com.terracottatech.offheapstore.OffHeapHashMap.get(OffHeapHashMap.java:269)
        at
com.terracottatech.offheapstore.AbstractLockedOffHeapHashMap.get(AbstractLockedOffHeapHashMap.java:88)
        at
com.terracottatech.offheapstore.AbstractLockedOffHeapHashMap.getAndSetMetadata(AbstractLockedOffHeapHashMap.java:286)
        at  net.sf.ehcache.store.offheap.disk.EhcachePersistentConcurrentOffHeapClockCache.getAndPin(EhcachePersistentConcurrentOffHeapClockCache.java:150)
        at net.sf.ehcache.store.offheap.disk.OffHeapDiskStore.fault(OffHeapDiskStore.java:385)
        at net.sf.ehcache.store.CacheStore$4.call(CacheStore.java:198)
        at net.sf.ehcache.store.CacheStore$4.call(CacheStore.java:192)
        at net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault.get(OnHeapCachingTier.java:334)
        at net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault.access$200(OnHeapCachingTier.java:311)
        at net.sf.ehcache.store.cachingtier.OnHeapCachingTier.get(OnHeapCachingTier.java:175)
        at net.sf.ehcache.store.CacheStore.get(CacheStore.java:192)

Kumar Reddy 2015-02-10

continue..

Caused by: java.io.EOFException
        at java.io.DataInputStream.readByte(DataInputStream.java:267) ~[?:1.7.0_71]
        at
net.sf.ehcache.store.offheap.portability.AbstractEhcachePortability.readObjects(AbstractEhcachePortability.java:72)
~[ehcache-ee-2.9.0.jar:2.9.0]
        at
net.sf.ehcache.store.offheap.portability.EhcacheKeyPortability.decode(EhcacheKeyPortability.java:53)
~[ehcache-ee-2.9.0.jar:2.9.0]
        at
net.sf.ehcache.store.offheap.portability.EhcacheKeyPortability.equals(EhcacheKeyPortability.java:62)
~[ehcache-ee-2.9.0.jar:2.9.0]
        at
com.terracottatech.offheapstore.storage.PortabilityBasedStorageEngine.equalsKey(PortabilityBasedStorageEngine.java:114)
~[ehcache-ee-2.9.0.jar:2.9.0]
        at
com.terracottatech.offheapstore.OffHeapHashMap.keyEquals(OffHeapHashMap.java:921)
~[ehcache-ee-2.9.0.jar:2.9.0]
        at com.terracottatech.offheapstore.OffHeapHashMap.get(OffHeapHashMap.java:269)
~[ehcache-ee-2.9.0.jar:2.9.0]
        at
com.terracottatech.offheapstore.AbstractLockedOffHeapHashMap.get(AbstractLockedOffHeapHashMap.java:88)
~[ehcache-ee-2.9.0.jar:2.9.0]
        at
com.terracottatech.offheapstore.AbstractLockedOffHeapHashMap.getAndSetMetadata(AbstractLockedOffHeapHashMap.java:286)
~[ehcache-ee-2.9.0.jar:2.9.0]
        at
net.sf.ehcache.store.offheap.disk.EhcachePersistentConcurrentOffHeapClockCache.getAndPin(EhcachePersistentConcurrentOffHeapClockCache.java:150)
~[ehcache-ee-2.9.0.jar:2.9.0]
        at
net.sf.ehcache.store.offheap.disk.OffHeapDiskStore.fault(OffHeapDiskStore.java:385)
~[ehcache-ee-2.9.0.jar:2.9.0]
        at net.sf.ehcache.store.CacheStore$4.call(CacheStore.java:198)
~[ehcache-ee-2.9.0.jar:2.9.0]
        at net.sf.ehcache.store.CacheStore$4.call(CacheStore.java:192)
~[ehcache-ee-2.9.0.jar:2.9.0]
        at
net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault.get(OnHeapCachingTier.java:334)
~[ehcache-ee-2.9.0.jar:2.9.0]
        at
net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault.access$200(OnHeapCachingTier.java:311)
~[ehcache-ee-2.9.0.jar:2.9.0]
        at
net.sf.ehcache.store.cachingtier.OnHeapCachingTier.get(OnHeapCachingTier.java:175)
~[ehcache-ee-2.9.0.jar:2.9.0]
        at net.sf.ehcache.store.CacheStore.get(CacheStore.java:192)

Any workaround for this?