[ 
https://issues.apache.org/jira/browse/LUCENENET-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557244#action_12557244
 ] 

Marco Dissel commented on LUCENENET-106:
----------------------------------------

I got another serious memory leak. This is the result from DebugDiag tool. The 
attached patched doesn't solve this one.. Anyone solved this already?

[DEFAULT] [hasThis] Object 
Lucene.Net.Search.FieldCacheImpl/AnonymousClassCache3.CreateValue(Class 
Lucene.Net.Index.IndexReader,Object)      0xC920F4 
[DEFAULT] [hasThis] Object Lucene.Net.Search.FieldCacheImpl/Cache.Get(Class 
Lucene.Net.Index.IndexReader,Object)       
[DEFAULT] [hasThis] Class Lucene.Net.Search.StringIndex 
Lucene.Net.Search.FieldCacheImpl.GetStringIndex(Class 
Lucene.Net.Index.IndexReader,String)       
[DEFAULT] [hasThis] Object 
Lucene.Net.Search.FieldCacheImpl/AnonymousClassCache4.CreateValue(Class 
Lucene.Net.Index.IndexReader,Object)       
[DEFAULT] [hasThis] Object Lucene.Net.Search.FieldCacheImpl/Cache.Get(Class 
Lucene.Net.Index.IndexReader,Object)       
[DEFAULT] [hasThis] Object Lucene.Net.Search.FieldCacheImpl.GetAuto(Class 
Lucene.Net.Index.IndexReader,String)       
[DEFAULT] Class Lucene.Net.Search.ScoreDocComparator 
Lucene.Net.Search.FieldSortedHitQueue.ComparatorAuto(Class 
Lucene.Net.Index.IndexReader,String)       
[DEFAULT] [hasThis] Object 
Lucene.Net.Search.FieldSortedHitQueue/AnonymousClassCache.CreateValue(Class 
Lucene.Net.Index.IndexReader,Object)      [DEFAULT] Class 
Lucene.Net.Search.ScoreDocComparator 
Lucene.Net.Search.FieldSortedHitQueue.ComparatorAuto(Class 
Lucene.Net.Index.IndexReader,String) 
[DEFAULT] [hasThis] Object Lucene.Net.Search.FieldCacheImpl/Cache.Get(Class 
Lucene.Net.Index.IndexReader,Object)       
[DEFAULT] Class Lucene.Net.Search.ScoreDocComparator 
Lucene.Net.Search.FieldSortedHitQueue.GetCachedComparator(Class 
Lucene.Net.Index.IndexReader,String,I4,Class 
System.Globalization.CultureInfo,Class Lucene.Net.Search.SortComparatorSource)  
     
[DEFAULT] [hasThis] Void Lucene.Net.Search.FieldSortedHitQueue..ctor(Class 
Lucene.Net.Index.IndexReader,SZArray Class Lucene.Net.Search.SortField,I4)      
[DEFAULT] Class Lucene.Net.Search.ScoreDocComparator 
Lucene.Net.Search.FieldSortedHitQueue.GetCachedComparator(Class 
Lucene.Net.Index.IndexReader,String,I4,Class 
System.Globalization.CultureInfo,Class Lucene.Net.Search.SortComparatorSource) 
[DEFAULT] [hasThis] Class Lucene.Net.Search.TopFieldDocs 
Lucene.Net.Search.IndexSearcher.Search(Class Lucene.Net.Search.Weight,Class 
Lucene.Net.Search.Filter,I4,Class Lucene.Net.Search.Sort)      [DEFAULT] 
[hasThis] Void Lucene.Net.Search.FieldSortedHitQueue..ctor(Class 
Lucene.Net.Index.IndexReader,SZArray Class Lucene.Net.Search.SortField,I4) 
[DEFAULT] [hasThis] Class Lucene.Net.Search.TopFieldDocs 
Lucene.Net.Search.Searcher.Search(Class Lucene.Net.Search.Query,Class 
Lucene.Net.Search.Filter,I4,Class Lucene.Net.Search.Sort) 


> Lucene.NET (Revision: 603121) is leaking memory
> -----------------------------------------------
>
>                 Key: LUCENENET-106
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-106
>             Project: Lucene.Net
>          Issue Type: Bug
>         Environment: .NET 2.0
>            Reporter: Anton K.
>            Priority: Critical
>         Attachments: DIGY-FieldCacheImpl.patch, Digy.rar, 
> luceneSrc_memUsage.patch, WeakHashTable+FieldCacheImpl.rar, WeakReferences.rar
>
>
> readerCache Hashtable field (see FieldCacheImpl.cs) never releases some hash 
> items that have closed IndexReader object as a key. So a lot of Term 
> instances are never released.
> Java version of Lucene uses WeakHashMap and therefore doesn't have this 
> problem.
> This bug can be reproduced only when Sort functionality used during search. 
> See following link for additional information.
> http://www.gossamer-threads.com/lists/lucene/java-user/55681
> Steps to reproduce:
> 1)Create index
> 2) Modify index by IndexWiter; Close IndexWriter
> 3) Use IndexSearcher for searching with Sort; Close InexSearcher
> 4) Go to step 2
> You'll get OutOfMemoryException after some time of running this algorithm.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to