[ 
https://issues.apache.org/jira/browse/VFS-480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bernd Eckenfels resolved VFS-480.
---------------------------------
       Resolution: Fixed
         Assignee: Bernd Eckenfels
    Fix Version/s: 2.1

Fixed with a simple double checked lock in commit 
http://svn.apache.org/viewvc?rev=1704932&view=rev

> [VFS] SoftRefFilesCache Doesn't Ever Clear Cache
> ------------------------------------------------
>
>                 Key: VFS-480
>                 URL: https://issues.apache.org/jira/browse/VFS-480
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: BELUGA BEHR
>            Assignee: Bernd Eckenfels
>            Priority: Critical
>             Fix For: 2.1
>
>         Attachments: AtomicRefThreadTest.java
>
>
> The SoftRefFilesCache doesn't ever clear its cache.  I found this out when I 
> notice my JVM was sucking up hundreds of megs as it load, processed, and 
> unloaded, thousands of files.
> I have attached an example program that demonstrates the problem with 
> SoftRefFilesCache.java#startThread().  The thread is never actually launched. 
>  I have only tried it on Java 1.7.   Basically, I am trying to demonstrate 
> that calling AtomicReference#compareAndSet never returns true when "expected" 
> is a null value.  So what happens is that the call returns false, the loop is 
> re-entered, newThread gets blown away, the thread is found, and the loop 
> exits, so the thread is never launched.  I'm using VFS in a singleton 
> fashion.  Well, I was using it before this issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to