Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

EHCache file handle may become invalid, leads to empty file listings with hash=true #42

Open
matthijsln opened this issue Jul 17, 2015 · 2 comments
Assignees
Labels

Comments

@matthijsln
Copy link
Member

2015-07-17 15:53:33 http-bio-8080-exec-185 ERROR net.sourceforge.stripes.exception.DefaultExceptionHandler - Unhandled exception in ex
net.sf.ehcache.CacheException: java.io.IOException: Stale NFS file handle
        at net.sf.ehcache.store.disk.DiskStorageFactory.retrieve(DiskStorageFactory.java:891)
        at net.sf.ehcache.store.disk.Segment.decodeHit(Segment.java:182)
        at net.sf.ehcache.store.disk.Segment.get(Segment.java:225)
        at net.sf.ehcache.store.disk.DiskStore.fault(DiskStore.java:210)
        at net.sf.ehcache.store.CacheStore$3.call(CacheStore.java:183)
        at net.sf.ehcache.store.CacheStore$3.call(CacheStore.java:177)
        at net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault.get(OnHeapCachingTier.java:329)
        at net.sf.ehcache.store.cachingtier.OnHeapCachingTier$Fault.access$200(OnHeapCachingTier.java:306)
        at net.sf.ehcache.store.cachingtier.OnHeapCachingTier.get(OnHeapCachingTier.java:175)
        at net.sf.ehcache.store.CacheStore.get(CacheStore.java:177)
        at net.sf.ehcache.Cache.get(Cache.java:1723)
        at net.sf.ehcache.Cache.get(Cache.java:1696)
        at nl.opengeogroep.filesetsync.server.FileHashCache.getCachedFileHash(FileHashCache.java:180)
        at nl.opengeogroep.filesetsync.server.stripes.FilesetListActionBean$FilesetListingResolution.stream(FilesetListActionBean.java
Caused by: java.io.IOException: Stale NFS file handle
        at java.io.RandomAccessFile.readBytes0(Native Method)
        at java.io.RandomAccessFile.readBytes(RandomAccessFile.java:350)
        at java.io.RandomAccessFile.read(RandomAccessFile.java:385)
        at java.io.RandomAccessFile.readFully(RandomAccessFile.java:444)
        at java.io.RandomAccessFile.readFully(RandomAccessFile.java:424)
        at net.sf.ehcache.store.disk.DiskStorageFactory.read(DiskStorageFactory.java:365)
        at net.sf.ehcache.store.disk.DiskStorageFactory.retrieve(DiskStorageFactory.java:887)

@matthijsln matthijsln added the bug label Jul 17, 2015
@matthijsln matthijsln self-assigned this Jul 17, 2015
@matthijsln
Copy link
Member Author

The empty file list makes the client delete all files, this is of course not the right action in case of an exception. Should return file without hash, client should handle this result

@pandianraman
Copy link

Hi All,

I am also facing the same issues only in clustering environment.

net.sf.ehcache.CacheException: java.io.IOException: Stale NFS file handle
at net.sf.ehcache.store.compound.factories.DiskOverflowStorageFactory.retrieve(DiskOverflowStorageFactory.java:152)
at net.sf.ehcache.store.compound.factories.DiskOverflowStorageFactory.retrieve(DiskOverflowStorageFactory.java:41)
at net.sf.ehcache.store.compound.Segment.decode(Segment.java:168)
at net.sf.ehcache.store.compound.Segment.get(Segment.java:206)
at net.sf.ehcache.store.compound.CompoundStore.get(CompoundStore.java:156)
at net.sf.ehcache.store.compound.CompoundStore.getQuiet(CompoundStore.java:163)
at net.sf.ehcache.Cache.searchInStoreWithoutStats(Cache.java:1720)
at net.sf.ehcache.Cache.get(Cache.java:1375)
at net.sf.ehcache.Cache.get(Cache.java:1335)
at com.googlecode.ehcache.annotations.interceptor.EhCacheInterceptor.invokeCacheable(EhCacheInterceptor.java:119)
at com.googlecode.ehcache.annotations.interceptor.EhCacheInterceptor.invoke(EhCacheInterceptor.java:77)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:625)
at com.excelacom.century.dynamicuipages.helper.LoadSelectedProductCacheUtil$$EnhancerByCGLIB$$ab6022df.loadAvilableProductCatalogUI()
at com.excelacom.century.dynamicuipages.controller.UIProcessController.loadProcessPage(UIProcessController.java:536)
at sun.reflect.GeneratedMethodAccessor590.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:532)
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:826)
at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:61)
at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:860)
at ognl.ASTMethod.getValueBody(ASTMethod.java:73)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.ASTChain.getValueBody(ASTChain.java:109)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.Ognl.getValue(Ognl.java:333)

My Configuration in ehcache.xml:

   <cache name="loadAvilableProductCatalogUI" maxElementsInMemory="1"
          maxElementsOnDisk="100" eternal="false" overflowToDisk="true"
          timeToIdleSeconds="86400" timeToLiveSeconds="172800000" />

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants