[infinispan-issues] [JBoss JIRA] (ISPN-1936) FileCacheStore does not seem to close open files on Windows

Matthew Farwell (JIRA) jira-events at lists.jboss.org
Wed Mar 21 06:24:47 EDT 2012


     [ https://issues.jboss.org/browse/ISPN-1936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew Farwell updated ISPN-1936:
----------------------------------

    Attachment: console-1000.out
                console-10000.out
                config.xml
                Test.java

    
> FileCacheStore does not seem to close open files on Windows
> -----------------------------------------------------------
>
>                 Key: ISPN-1936
>                 URL: https://issues.jboss.org/browse/ISPN-1936
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Core API
>    Affects Versions: 5.1.2.FINAL
>         Environment: Windows 7
>            Reporter: Matthew Farwell
>            Assignee: Manik Surtani
>         Attachments: config.xml, console-1000.out, console-10000.out, Test.java
>
>
> Using the following java (see Test.java):
> 	public static void main(String[] args) throws Exception {
> 		DefaultCacheManager manager = new DefaultCacheManager("config/config.xml");
> 		Cache<String, String> cache = manager.getCache("evictionCache");
> 		for (int i = 0; i < 10000; i++) {
> 			cache.put("key" + i, "value" + i);
> 		}
> 		
> 		cache.stop();
> 		manager.stop();
> 	}
> with the following config (see config.xml):
> <infinispan>
> 	<namedCache name="evictionCache">
> 		<loaders passivation="false" shared="false" preload="true">
> 			<loader class="org.infinispan.loaders.file.FileCacheStore"
> 				fetchPersistentState="true" ignoreModifications="false"
> 				purgeOnStartup="false">
> 				<properties>
> 					<property name="location" value="d:\code\infinispan\store" />
> 				</properties>
> 			</loader>
> 		</loaders>
> 		<eviction maxEntries="5000" strategy="LRU" />
> 		<expiration lifespan="60000" maxIdle="10000" wakeUpInterval="500" />
> 	</namedCache>
> </infinispan>
> running under Windows 7, there are two problems:
> 1) There are lots INFO: Unable to remove empty file
> d:\code\infinispan\store\evictionCache\-1134715904 - will try again
> later. I'm running under windows, so this may have something to do
> with it, but the process which is holding on to the file handles is
> the jvm. Is it possible that something somewhere is holding the files
> open somewhere? Looking at the code in FileCacheStore, there doesn't
> seem to be anything obvious.
> 2) This may be related to the above, but the process eventually falls
> over with java.nio.channels.ClosedByInterruptException (with
> iterations = 1000) see console-1000.txt or a java.io.EOFException: The
> stream ended unexpectedly. for iterations = 10000 (see
> console-10000.txt).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the infinispan-issues mailing list