You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jean-Marc Spaggiari (JIRA)" <ji...@apache.org> on 2012/10/24 17:34:12 UTC

[jira] [Created] (JCS-100) JCS never going out of the dispose methode

Jean-Marc Spaggiari created JCS-100:
---------------------------------------

             Summary: JCS never going out of the dispose methode
                 Key: JCS-100
                 URL: https://issues.apache.org/jira/browse/JCS-100
             Project: Commons JCS
          Issue Type: Bug
          Components: Composite Cache
    Affects Versions: jcs-1.3
         Environment: Windows
            Reporter: Jean-Marc Spaggiari


I have an application using many threads all calling JCS. When I close the application, the cache is usually working fine, but sometime, it stays stucked on the dispose methode.

The cacheEventQueue never going empty. Then it's looping on while ( keepGoing ) and never ending. I have to kill the application to exit.

It's difficult to reproduce. There is no fixed pattern so far.





--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JCS-100) JCS never going out of the dispose methode

Posted by "Jean-Marc Spaggiari (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCS-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495238#comment-13495238 ] 

Jean-Marc Spaggiari commented on JCS-100:
-----------------------------------------

Hi Thomas,

Application is running under Windows. 

Here is the application configuration:
{code}
			Properties props = new Properties();
			//# DEFAULT CACHE REGION
			//# sets the default aux value for any non configured caches
			props.put("jcs.default", "");
			props.put("jcs.default.cacheattributes", "org.apache.jcs.engine.CompositeCacheAttributes");
			props.put("jcs.default.cacheattributes.MaxObjects", "10000");
			props.put("jcs.default.cacheattributes.MemoryCacheName", "org.apache.jcs.engine.memory.lru.LRUMemoryCache");
			props.put("jcs.default.elementattributes.IsEternal", "false");
			props.put("jcs.default.elementattributes.MaxLifeSeconds", "86400");
			props.put("jcs.default.elementattributes.IdleTime", "1800");
			//props.put("jcs.default.elementattributes.IsSpool", "true");
			//props.put("jcs.default.elementattributes.IsRemote", "false");
			//props.put("jcs.default.elementattributes.IsLateral", "false");
			//# CACHE REGIONS AVAILABLE
			//# Regions preconfigured for caching
			props.put("jcs.region.robotCache", "DC");
			props.put("jcs.region.robotCache.cacheattributes", "org.apache.jcs.engine.CompositeCacheAttributes");
			props.put("jcs.region.robotCache.cacheattributes.MaxObjects", "131072");
			props.put("jcs.region.robotCache.cacheattributes.MemoryCacheName", "org.apache.jcs.engine.memory.lru.LRUMemoryCache");
			props.put("jcs.region.robotCache.cacheattributes.UseMemoryShrinker", "true");
			props.put("jcs.region.robotCache.elementattributes.IsEternal", "false");
			props.put("jcs.region.robotCache.elementattributes.MaxLifeSeconds", "604800");
			props.put("jcs.region.robotCache.elementattributes.IdleTime", "1800");
			props.put("jcs.region.robotCache.elementattributes.IsSpool", "true");
			props.put("jcs.region.robotCache.elementattributes.IsRemote", "false");
			props.put("jcs.region.robotCache.elementattributes.IsLateral", "false");
			props.put("jcs.region.lastDomainAccessCache", "");
			props.put("jcs.region.lastDomainAccessCache.cacheattributes", "org.apache.jcs.engine.CompositeCacheAttributes");
			props.put("jcs.region.lastDomainAccessCache.cacheattributes.MaxObjects", "1000");
			props.put("jcs.region.lastDomainAccessCache.cacheattributes.MemoryCacheName", "org.apache.jcs.engine.memory.lru.LRUMemoryCache");
			props.put("jcs.region.lastDomainAccessCache.elementattributes.IsEternal", "false");
			props.put("jcs.region.lastDomainAccessCache.elementattributes.MaxLifeSeconds", "60");
			props.put("jcs.region.lastDomainAccessCache.elementattributes.IdleTime", "1800");
			props.put("jcs.region.lastDomainAccessCache.elementattributes.IsSpool", "true");
			props.put("jcs.region.lastDomainAccessCache.elementattributes.IsRemote", "false");
			props.put("jcs.region.lastDomainAccessCache.elementattributes.IsLateral", "false");
			//# AUXILIARY CACHES AVAILABLE
			//# Primary Disk Cache -- faster than the rest because of memory key storage
			props.put("jcs.auxiliary.DC", "org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory");
			props.put("jcs.auxiliary.DC.attributes", "org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes");
			props.put("jcs.auxiliary.DC.attributes.DiskPath", "robotCache");
			props.put("jcs.auxiliary.DC.attributes.MaxPurgatorySize", "131072");
			props.put("jcs.auxiliary.DC.attributes.MaxKeySize", "131072");
			props.put("jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount", "32768");
			props.put("jcs.auxiliary.DC.attributes.MaxRecycleBinSize", "32768");
			props.put("jcs.auxiliary.DC.attributes.OptimizeOnShutdown", "true");

			ccm.configure(props);
{code}

I'm usually running about 50 threads accessing the cache at the same time. It's not easy to reproduce because sometime it's working fine, sometime it's not. I don't know what's making it failing. When it's blocked, is there any variable I should look at to help? I'm usually running the application in debug mode on Eclipse.

Thanks.
                
> JCS never going out of the dispose methode
> ------------------------------------------
>
>                 Key: JCS-100
>                 URL: https://issues.apache.org/jira/browse/JCS-100
>             Project: Commons JCS
>          Issue Type: Bug
>          Components: Composite Cache
>    Affects Versions: jcs-1.3
>         Environment: Windows
>            Reporter: Jean-Marc Spaggiari
>
> I have an application using many threads all calling JCS. When I close the application, the cache is usually working fine, but sometime, it stays stucked on the dispose methode.
> The cacheEventQueue never going empty. Then it's looping on while ( keepGoing ) and never ending. I have to kill the application to exit.
> It's difficult to reproduce. There is no fixed pattern so far.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JCS-100) JCS never going out of the dispose methode

Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCS-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494906#comment-13494906 ] 

Thomas Vandahl commented on JCS-100:
------------------------------------

There is not much we can do with this issue description. Any more information on the environment, the configuration etc?
                
> JCS never going out of the dispose methode
> ------------------------------------------
>
>                 Key: JCS-100
>                 URL: https://issues.apache.org/jira/browse/JCS-100
>             Project: Commons JCS
>          Issue Type: Bug
>          Components: Composite Cache
>    Affects Versions: jcs-1.3
>         Environment: Windows
>            Reporter: Jean-Marc Spaggiari
>
> I have an application using many threads all calling JCS. When I close the application, the cache is usually working fine, but sometime, it stays stucked on the dispose methode.
> The cacheEventQueue never going empty. Then it's looping on while ( keepGoing ) and never ending. I have to kill the application to exit.
> It's difficult to reproduce. There is no fixed pattern so far.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JCS-100) JCS never going out of the dispose methode

Posted by "Jean-Marc Spaggiari (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCS-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508031#comment-13508031 ] 

Jean-Marc Spaggiari commented on JCS-100:
-----------------------------------------

I got the issue again today.

This time, I was able to capture some other logs before the dispose goes in close loop.

Can this be because the IndexedDiskCache failed to write one key that the cacheEventQueue is never cleared?


2012-12-01 10:56:53,588 [CacheEventQueue.QProcessor-robotCache] ERROR org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache - Region [robotCache] Failure updating element, key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa old: null
java.lang.InterruptedException
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:503)
        at EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$WriterLock.acquire(WriterPreferenceReadWriteLock.java:240)
        at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.doUpdate(IndexedDiskCache.java:433)
        at org.apache.jcs.auxiliary.disk.AbstractDiskCache$MyCacheListener.handlePut(AbstractDiskCache.java:603)
        at org.apache.jcs.engine.CacheEventQueue$PutEvent.doRun(CacheEventQueue.java:688)
        at org.apache.jcs.engine.CacheEventQueue$AbstractCacheEvent.run(CacheEventQueue.java:607)
        at org.apache.jcs.engine.CacheEventQueue$QProcessor.run(CacheEventQueue.java:575)
2012-12-01 10:56:53,867 [IndexedDiskCache-OptimizationThread] INFO org.apache.jcs.auxiliary.disk.indexed.IndexedDisk - Trucating file [C:\workspace\bbbbbbbbbb\robotCache\robotCache.data] to 367498133
                
> JCS never going out of the dispose methode
> ------------------------------------------
>
>                 Key: JCS-100
>                 URL: https://issues.apache.org/jira/browse/JCS-100
>             Project: Commons JCS
>          Issue Type: Bug
>          Components: Composite Cache
>    Affects Versions: jcs-1.3
>         Environment: Windows
>            Reporter: Jean-Marc Spaggiari
>
> I have an application using many threads all calling JCS. When I close the application, the cache is usually working fine, but sometime, it stays stucked on the dispose methode.
> The cacheEventQueue never going empty. Then it's looping on while ( keepGoing ) and never ending. I have to kill the application to exit.
> It's difficult to reproduce. There is no fixed pattern so far.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira