You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Patric Forsgard (JIRA)" <ji...@apache.org> on 2011/01/21 11:55:44 UTC
[jira] Created: (LUCENENET-388) Exception: will crash and restart
the web-application.
Exception: will crash and restart the web-application.
------------------------------------------------------
Key: LUCENENET-388
URL: https://issues.apache.org/jira/browse/LUCENENET-388
Project: Lucene.Net
Issue Type: Bug
Environment: IIS7, Windows 7, Lucene.Net 2.9.1
Reporter: Patric Forsgard
Priority: Critical
When getting the followin exception, the iis thread is crashing and the site is restarting. I think it should get the exception, but it should not crash the site and restart the application each time.
-------------------------------------------
System.SystemException was unhandled
Message=there are more terms than documents in field "TypeName", but it's impossible to sort on tokenized fields
Source=Lucene.Net
StackTrace:
at Lucene.Net.Search.FieldCacheImpl.StringIndexCache.CreateValue(IndexReader reader, Entry entryKey)
at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key)
at Lucene.Net.Search.FieldCacheImpl.GetStringIndex(IndexReader reader, String field)
at Lucene.Net.Search.FieldComparator.StringOrdValComparator.SetNextReader(IndexReader reader, Int32 docBase)
at Lucene.Net.Search.TopFieldCollector.OneComparatorNonScoringCollector.SetNextReader(IndexReader reader, Int32 docBase)
at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
at Lucene.Net.Search.MultiSearcherThread.Run()
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LUCENENET-388) Exception: will crash and restart
the web-application.
Posted by "Patric Forsgard (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984859#action_12984859 ]
Patric Forsgard commented on LUCENENET-388:
-------------------------------------------
I have try with both try/catch around the call to lucene
try {
// call to lucene
} catch (Exception e) {
// log
}
and also place the try/catch-block inside a new thread
try
{
var t = new System.Threading.Thread(delegate()
{
try
{
// call to lucene
}
catch (Exception ex)
{
// log exeption
}
});
t.Start();
t.Join();
}
catch (Exception ex2)
{
// log exception
}
Why will not lucene use the new thread that is created and maybe crash that thread instead of the full application (IIS)?
// Patric
> Exception: will crash and restart the web-application.
> ------------------------------------------------------
>
> Key: LUCENENET-388
> URL: https://issues.apache.org/jira/browse/LUCENENET-388
> Project: Lucene.Net
> Issue Type: Bug
> Environment: IIS7, Windows 7, Lucene.Net 2.9.1
> Reporter: Patric Forsgard
> Priority: Critical
>
> When getting the followin exception, the iis thread is crashing and the site is restarting. I think it should get the exception, but it should not crash the site and restart the application each time.
> -------------------------------------------
> System.SystemException was unhandled
> Message=there are more terms than documents in field "TypeName", but it's impossible to sort on tokenized fields
> Source=Lucene.Net
> StackTrace:
> at Lucene.Net.Search.FieldCacheImpl.StringIndexCache.CreateValue(IndexReader reader, Entry entryKey)
> at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key)
> at Lucene.Net.Search.FieldCacheImpl.GetStringIndex(IndexReader reader, String field)
> at Lucene.Net.Search.FieldComparator.StringOrdValComparator.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.TopFieldCollector.OneComparatorNonScoringCollector.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
> at Lucene.Net.Search.MultiSearcherThread.Run()
> at System.Threading.ExecutionContext.runTryCode(Object userData)
> at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
> InnerException:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LUCENENET-388) Exception: will crash and restart
the web-application.
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984943#action_12984943 ]
Digy commented on LUCENENET-388:
--------------------------------
As expected. This is all what Lucene.Net can do. Handling of this exception should be done in your code.
If you agree I will make this change in Lucene.Net code base.
DIGY
> Exception: will crash and restart the web-application.
> ------------------------------------------------------
>
> Key: LUCENENET-388
> URL: https://issues.apache.org/jira/browse/LUCENENET-388
> Project: Lucene.Net
> Issue Type: Bug
> Environment: IIS7, Windows 7, Lucene.Net 2.9.1
> Reporter: Patric Forsgard
> Priority: Critical
>
> When getting the followin exception, the iis thread is crashing and the site is restarting. I think it should get the exception, but it should not crash the site and restart the application each time.
> -------------------------------------------
> System.SystemException was unhandled
> Message=there are more terms than documents in field "TypeName", but it's impossible to sort on tokenized fields
> Source=Lucene.Net
> StackTrace:
> at Lucene.Net.Search.FieldCacheImpl.StringIndexCache.CreateValue(IndexReader reader, Entry entryKey)
> at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key)
> at Lucene.Net.Search.FieldCacheImpl.GetStringIndex(IndexReader reader, String field)
> at Lucene.Net.Search.FieldComparator.StringOrdValComparator.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.TopFieldCollector.OneComparatorNonScoringCollector.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
> at Lucene.Net.Search.MultiSearcherThread.Run()
> at System.Threading.ExecutionContext.runTryCode(Object userData)
> at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
> InnerException:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LUCENENET-388) Exception: will crash and restart
the web-application.
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984951#action_12984951 ]
Digy commented on LUCENENET-388:
--------------------------------
Maybe. Feedbacks from Lucene.Net users are always welcome.
Thanks.
DIGY
> Exception: will crash and restart the web-application.
> ------------------------------------------------------
>
> Key: LUCENENET-388
> URL: https://issues.apache.org/jira/browse/LUCENENET-388
> Project: Lucene.Net
> Issue Type: Bug
> Environment: IIS7, Windows 7, Lucene.Net 2.9.1
> Reporter: Patric Forsgard
> Priority: Critical
> Attachments: FieldCacheImpl.patch
>
>
> When getting the followin exception, the iis thread is crashing and the site is restarting. I think it should get the exception, but it should not crash the site and restart the application each time.
> -------------------------------------------
> System.SystemException was unhandled
> Message=there are more terms than documents in field "TypeName", but it's impossible to sort on tokenized fields
> Source=Lucene.Net
> StackTrace:
> at Lucene.Net.Search.FieldCacheImpl.StringIndexCache.CreateValue(IndexReader reader, Entry entryKey)
> at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key)
> at Lucene.Net.Search.FieldCacheImpl.GetStringIndex(IndexReader reader, String field)
> at Lucene.Net.Search.FieldComparator.StringOrdValComparator.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.TopFieldCollector.OneComparatorNonScoringCollector.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
> at Lucene.Net.Search.MultiSearcherThread.Run()
> at System.Threading.ExecutionContext.runTryCode(Object userData)
> at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
> InnerException:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LUCENENET-388) Exception: will crash and restart
the web-application.
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984913#action_12984913 ]
Digy commented on LUCENENET-388:
--------------------------------
Since I don't yet have a test case to regenerate your bug, can you try to change the code as follows (FieldCacheImpl.cs line: 871)?
from:
{code}
if (t >= mterms.Length)
throw new System.SystemException("there are more terms than " + "documents in field \"" + field + "\", but it's impossible to sort on " + "tokenized fields");
mterms[t] = term.Text();
}
{code}
to:
{code}
if (t >= mterms.Length)
throw new System.IO.IOException("there are more terms than " + "documents in field \"" + field + "\", but it's impossible to sort on " + "tokenized fields"); //<-----
mterms[t] = term.Text();
}
{code}
DIGY
> Exception: will crash and restart the web-application.
> ------------------------------------------------------
>
> Key: LUCENENET-388
> URL: https://issues.apache.org/jira/browse/LUCENENET-388
> Project: Lucene.Net
> Issue Type: Bug
> Environment: IIS7, Windows 7, Lucene.Net 2.9.1
> Reporter: Patric Forsgard
> Priority: Critical
>
> When getting the followin exception, the iis thread is crashing and the site is restarting. I think it should get the exception, but it should not crash the site and restart the application each time.
> -------------------------------------------
> System.SystemException was unhandled
> Message=there are more terms than documents in field "TypeName", but it's impossible to sort on tokenized fields
> Source=Lucene.Net
> StackTrace:
> at Lucene.Net.Search.FieldCacheImpl.StringIndexCache.CreateValue(IndexReader reader, Entry entryKey)
> at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key)
> at Lucene.Net.Search.FieldCacheImpl.GetStringIndex(IndexReader reader, String field)
> at Lucene.Net.Search.FieldComparator.StringOrdValComparator.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.TopFieldCollector.OneComparatorNonScoringCollector.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
> at Lucene.Net.Search.MultiSearcherThread.Run()
> at System.Threading.ExecutionContext.runTryCode(Object userData)
> at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
> InnerException:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LUCENENET-388) Exception: will crash and restart
the web-application.
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984874#action_12984874 ]
Digy commented on LUCENENET-388:
--------------------------------
After looking more deeply into ParallelMultiSearcher (I assume you are using it) , It tend to think it is more a Lucene.Net bug since I don't see a way to catch the exception of the searcher thread(as a user). As a workaround, you can try to avoid the exception or use {{legacyUnhandledExceptionPolicy}}.
We should find a clever way without deviating too much from java version :(
DIGY
> Exception: will crash and restart the web-application.
> ------------------------------------------------------
>
> Key: LUCENENET-388
> URL: https://issues.apache.org/jira/browse/LUCENENET-388
> Project: Lucene.Net
> Issue Type: Bug
> Environment: IIS7, Windows 7, Lucene.Net 2.9.1
> Reporter: Patric Forsgard
> Priority: Critical
>
> When getting the followin exception, the iis thread is crashing and the site is restarting. I think it should get the exception, but it should not crash the site and restart the application each time.
> -------------------------------------------
> System.SystemException was unhandled
> Message=there are more terms than documents in field "TypeName", but it's impossible to sort on tokenized fields
> Source=Lucene.Net
> StackTrace:
> at Lucene.Net.Search.FieldCacheImpl.StringIndexCache.CreateValue(IndexReader reader, Entry entryKey)
> at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key)
> at Lucene.Net.Search.FieldCacheImpl.GetStringIndex(IndexReader reader, String field)
> at Lucene.Net.Search.FieldComparator.StringOrdValComparator.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.TopFieldCollector.OneComparatorNonScoringCollector.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
> at Lucene.Net.Search.MultiSearcherThread.Run()
> at System.Threading.ExecutionContext.runTryCode(Object userData)
> at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
> InnerException:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LUCENENET-388) Exception: will crash and restart
the web-application.
Posted by "Patric Forsgard (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984932#action_12984932 ]
Patric Forsgard commented on LUCENENET-388:
-------------------------------------------
Now I will got the exception instead and the application will not crash.
------------
System.IO.IOException: there are more terms than documents in field "TypeName", but it's impossible to sort on tokenized fields
at Lucene.Net.Search.ParallelMultiSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort) in C:\Work\Search\ParallelMultiSearcher.cs:line 187
at Lucene.Net.Search.Searcher.Search(Query query, Filter filter, Int32 n, Sort sort) in C:\Work\Search\Searcher.cs:line 107
at Search.Lucene.Querying.SearchQuery.Execute(SearchRequest request, Searcher searcher)
at Search.SearchService.Search(QueryRequest request) in C:\Work\Search\SearchService.cs:line 115
at ProductCatalog_SearchResult.Search(QueryRequest searchRequest, SecurityToken securityToken) in c:\Work\ProductCatalog\SearchResult.aspx.cs:line 147
at ProductCatalog_SearchResult.GridSort(Object source, GridSortCommandEventArgs e) in c:\Work\ProductCatalog\SearchResult.aspx.cs:line 281
at Telerik.Web.UI.GridSortCommandEventArgs.ExecuteCommand(Object source)
at Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
> Exception: will crash and restart the web-application.
> ------------------------------------------------------
>
> Key: LUCENENET-388
> URL: https://issues.apache.org/jira/browse/LUCENENET-388
> Project: Lucene.Net
> Issue Type: Bug
> Environment: IIS7, Windows 7, Lucene.Net 2.9.1
> Reporter: Patric Forsgard
> Priority: Critical
>
> When getting the followin exception, the iis thread is crashing and the site is restarting. I think it should get the exception, but it should not crash the site and restart the application each time.
> -------------------------------------------
> System.SystemException was unhandled
> Message=there are more terms than documents in field "TypeName", but it's impossible to sort on tokenized fields
> Source=Lucene.Net
> StackTrace:
> at Lucene.Net.Search.FieldCacheImpl.StringIndexCache.CreateValue(IndexReader reader, Entry entryKey)
> at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key)
> at Lucene.Net.Search.FieldCacheImpl.GetStringIndex(IndexReader reader, String field)
> at Lucene.Net.Search.FieldComparator.StringOrdValComparator.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.TopFieldCollector.OneComparatorNonScoringCollector.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
> at Lucene.Net.Search.MultiSearcherThread.Run()
> at System.Threading.ExecutionContext.runTryCode(Object userData)
> at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
> InnerException:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LUCENENET-388) Exception: will crash and restart
the web-application.
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984844#action_12984844 ]
Digy commented on LUCENENET-388:
--------------------------------
Also note that, if a thread crashes with an unhandled exception, this would kill the app.
using {{<legacyUnhandledExceptionPolicy enabled="1"/>}} in app.config or attaching to the event {{AppDomain.CurrentDomain.UnhandledException}} may be a solution.
DIGY
> Exception: will crash and restart the web-application.
> ------------------------------------------------------
>
> Key: LUCENENET-388
> URL: https://issues.apache.org/jira/browse/LUCENENET-388
> Project: Lucene.Net
> Issue Type: Bug
> Environment: IIS7, Windows 7, Lucene.Net 2.9.1
> Reporter: Patric Forsgard
> Priority: Critical
>
> When getting the followin exception, the iis thread is crashing and the site is restarting. I think it should get the exception, but it should not crash the site and restart the application each time.
> -------------------------------------------
> System.SystemException was unhandled
> Message=there are more terms than documents in field "TypeName", but it's impossible to sort on tokenized fields
> Source=Lucene.Net
> StackTrace:
> at Lucene.Net.Search.FieldCacheImpl.StringIndexCache.CreateValue(IndexReader reader, Entry entryKey)
> at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key)
> at Lucene.Net.Search.FieldCacheImpl.GetStringIndex(IndexReader reader, String field)
> at Lucene.Net.Search.FieldComparator.StringOrdValComparator.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.TopFieldCollector.OneComparatorNonScoringCollector.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
> at Lucene.Net.Search.MultiSearcherThread.Run()
> at System.Threading.ExecutionContext.runTryCode(Object userData)
> at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
> InnerException:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (LUCENENET-388) Exception: will crash
and restart the web-application.
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984913#action_12984913 ]
Digy edited comment on LUCENENET-388 at 1/21/11 3:30 PM:
---------------------------------------------------------
Since I don't yet have a test case to regenerate your bug, can you try to change the code as follows (FieldCacheImpl.cs line: 871)?
(Just changing the exception type)
from:
{code}
if (t >= mterms.Length)
throw new System.SystemException("there are more terms than " + "documents in field \"" + field + "\", but it's impossible to sort on " + "tokenized fields");
mterms[t] = term.Text();
{code}
to:
{code}
if (t >= mterms.Length)
throw new System.IO.IOException("there are more terms than " + "documents in field \"" + field + "\", but it's impossible to sort on " + "tokenized fields"); //<-----
mterms[t] = term.Text();
{code}
DIGY
was (Author: digydigy):
Since I don't yet have a test case to regenerate your bug, can you try to change the code as follows (FieldCacheImpl.cs line: 871)?
from:
{code}
if (t >= mterms.Length)
throw new System.SystemException("there are more terms than " + "documents in field \"" + field + "\", but it's impossible to sort on " + "tokenized fields");
mterms[t] = term.Text();
}
{code}
to:
{code}
if (t >= mterms.Length)
throw new System.IO.IOException("there are more terms than " + "documents in field \"" + field + "\", but it's impossible to sort on " + "tokenized fields"); //<-----
mterms[t] = term.Text();
}
{code}
DIGY
> Exception: will crash and restart the web-application.
> ------------------------------------------------------
>
> Key: LUCENENET-388
> URL: https://issues.apache.org/jira/browse/LUCENENET-388
> Project: Lucene.Net
> Issue Type: Bug
> Environment: IIS7, Windows 7, Lucene.Net 2.9.1
> Reporter: Patric Forsgard
> Priority: Critical
>
> When getting the followin exception, the iis thread is crashing and the site is restarting. I think it should get the exception, but it should not crash the site and restart the application each time.
> -------------------------------------------
> System.SystemException was unhandled
> Message=there are more terms than documents in field "TypeName", but it's impossible to sort on tokenized fields
> Source=Lucene.Net
> StackTrace:
> at Lucene.Net.Search.FieldCacheImpl.StringIndexCache.CreateValue(IndexReader reader, Entry entryKey)
> at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key)
> at Lucene.Net.Search.FieldCacheImpl.GetStringIndex(IndexReader reader, String field)
> at Lucene.Net.Search.FieldComparator.StringOrdValComparator.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.TopFieldCollector.OneComparatorNonScoringCollector.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
> at Lucene.Net.Search.MultiSearcherThread.Run()
> at System.Threading.ExecutionContext.runTryCode(Object userData)
> at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
> InnerException:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (LUCENENET-388) Exception: will crash and restart
the web-application.
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Digy updated LUCENENET-388:
---------------------------
Attachment: FieldCacheImpl.patch
> Exception: will crash and restart the web-application.
> ------------------------------------------------------
>
> Key: LUCENENET-388
> URL: https://issues.apache.org/jira/browse/LUCENENET-388
> Project: Lucene.Net
> Issue Type: Bug
> Environment: IIS7, Windows 7, Lucene.Net 2.9.1
> Reporter: Patric Forsgard
> Priority: Critical
> Attachments: FieldCacheImpl.patch
>
>
> When getting the followin exception, the iis thread is crashing and the site is restarting. I think it should get the exception, but it should not crash the site and restart the application each time.
> -------------------------------------------
> System.SystemException was unhandled
> Message=there are more terms than documents in field "TypeName", but it's impossible to sort on tokenized fields
> Source=Lucene.Net
> StackTrace:
> at Lucene.Net.Search.FieldCacheImpl.StringIndexCache.CreateValue(IndexReader reader, Entry entryKey)
> at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key)
> at Lucene.Net.Search.FieldCacheImpl.GetStringIndex(IndexReader reader, String field)
> at Lucene.Net.Search.FieldComparator.StringOrdValComparator.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.TopFieldCollector.OneComparatorNonScoringCollector.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
> at Lucene.Net.Search.MultiSearcherThread.Run()
> at System.Threading.ExecutionContext.runTryCode(Object userData)
> at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
> InnerException:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LUCENENET-388) Exception: will crash and restart
the web-application.
Posted by "Patric Forsgard (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984880#action_12984880 ]
Patric Forsgard commented on LUCENENET-388:
-------------------------------------------
Yes, the searcher I will use is the ParallelMultiSearcher. It would be good if you found a good way so I can catch the exception. I have try by my self but its hard to understand everything in the source the first time I open it up.
For my index i found that I have some deleted document that not yet was purged that cause the query to crash, i'm not sure what information that was on the deleted index and what was missing, i have not found a way in luke to browse the deleted documents to see whats wrong with them.
> Exception: will crash and restart the web-application.
> ------------------------------------------------------
>
> Key: LUCENENET-388
> URL: https://issues.apache.org/jira/browse/LUCENENET-388
> Project: Lucene.Net
> Issue Type: Bug
> Environment: IIS7, Windows 7, Lucene.Net 2.9.1
> Reporter: Patric Forsgard
> Priority: Critical
>
> When getting the followin exception, the iis thread is crashing and the site is restarting. I think it should get the exception, but it should not crash the site and restart the application each time.
> -------------------------------------------
> System.SystemException was unhandled
> Message=there are more terms than documents in field "TypeName", but it's impossible to sort on tokenized fields
> Source=Lucene.Net
> StackTrace:
> at Lucene.Net.Search.FieldCacheImpl.StringIndexCache.CreateValue(IndexReader reader, Entry entryKey)
> at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key)
> at Lucene.Net.Search.FieldCacheImpl.GetStringIndex(IndexReader reader, String field)
> at Lucene.Net.Search.FieldComparator.StringOrdValComparator.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.TopFieldCollector.OneComparatorNonScoringCollector.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
> at Lucene.Net.Search.MultiSearcherThread.Run()
> at System.Threading.ExecutionContext.runTryCode(Object userData)
> at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
> InnerException:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LUCENENET-388) Exception: will crash and restart
the web-application.
Posted by "Patric Forsgard (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984950#action_12984950 ]
Patric Forsgard commented on LUCENENET-388:
-------------------------------------------
I agree about the change that will fix my problem, now i can catch the exception and show a friendly error message for the user. Thanks a lot for the help with the resolution.
Can it bee other places ass well that the SystemException should be changed to something else to allow the calling code to catch the exception?
// Patric
> Exception: will crash and restart the web-application.
> ------------------------------------------------------
>
> Key: LUCENENET-388
> URL: https://issues.apache.org/jira/browse/LUCENENET-388
> Project: Lucene.Net
> Issue Type: Bug
> Environment: IIS7, Windows 7, Lucene.Net 2.9.1
> Reporter: Patric Forsgard
> Priority: Critical
> Attachments: FieldCacheImpl.patch
>
>
> When getting the followin exception, the iis thread is crashing and the site is restarting. I think it should get the exception, but it should not crash the site and restart the application each time.
> -------------------------------------------
> System.SystemException was unhandled
> Message=there are more terms than documents in field "TypeName", but it's impossible to sort on tokenized fields
> Source=Lucene.Net
> StackTrace:
> at Lucene.Net.Search.FieldCacheImpl.StringIndexCache.CreateValue(IndexReader reader, Entry entryKey)
> at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key)
> at Lucene.Net.Search.FieldCacheImpl.GetStringIndex(IndexReader reader, String field)
> at Lucene.Net.Search.FieldComparator.StringOrdValComparator.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.TopFieldCollector.OneComparatorNonScoringCollector.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
> at Lucene.Net.Search.MultiSearcherThread.Run()
> at System.Threading.ExecutionContext.runTryCode(Object userData)
> at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
> InnerException:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (LUCENENET-388) Exception: will crash and restart
the web-application.
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Digy resolved LUCENENET-388.
----------------------------
Resolution: Fixed
Patch applied to trunk & 2.9.2
> Exception: will crash and restart the web-application.
> ------------------------------------------------------
>
> Key: LUCENENET-388
> URL: https://issues.apache.org/jira/browse/LUCENENET-388
> Project: Lucene.Net
> Issue Type: Bug
> Environment: IIS7, Windows 7, Lucene.Net 2.9.1
> Reporter: Patric Forsgard
> Priority: Critical
> Attachments: FieldCacheImpl.patch
>
>
> When getting the followin exception, the iis thread is crashing and the site is restarting. I think it should get the exception, but it should not crash the site and restart the application each time.
> -------------------------------------------
> System.SystemException was unhandled
> Message=there are more terms than documents in field "TypeName", but it's impossible to sort on tokenized fields
> Source=Lucene.Net
> StackTrace:
> at Lucene.Net.Search.FieldCacheImpl.StringIndexCache.CreateValue(IndexReader reader, Entry entryKey)
> at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key)
> at Lucene.Net.Search.FieldCacheImpl.GetStringIndex(IndexReader reader, String field)
> at Lucene.Net.Search.FieldComparator.StringOrdValComparator.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.TopFieldCollector.OneComparatorNonScoringCollector.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
> at Lucene.Net.Search.MultiSearcherThread.Run()
> at System.Threading.ExecutionContext.runTryCode(Object userData)
> at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
> InnerException:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LUCENENET-388) Exception: will crash and restart
the web-application.
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984832#action_12984832 ]
Digy commented on LUCENENET-388:
--------------------------------
What Lucene.Net does is completely legal. It catches the case where there should be at most one term per document, and throws an exception.
It is your(or IIS') responsibility to handle the exception.
DIGY
> Exception: will crash and restart the web-application.
> ------------------------------------------------------
>
> Key: LUCENENET-388
> URL: https://issues.apache.org/jira/browse/LUCENENET-388
> Project: Lucene.Net
> Issue Type: Bug
> Environment: IIS7, Windows 7, Lucene.Net 2.9.1
> Reporter: Patric Forsgard
> Priority: Critical
>
> When getting the followin exception, the iis thread is crashing and the site is restarting. I think it should get the exception, but it should not crash the site and restart the application each time.
> -------------------------------------------
> System.SystemException was unhandled
> Message=there are more terms than documents in field "TypeName", but it's impossible to sort on tokenized fields
> Source=Lucene.Net
> StackTrace:
> at Lucene.Net.Search.FieldCacheImpl.StringIndexCache.CreateValue(IndexReader reader, Entry entryKey)
> at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key)
> at Lucene.Net.Search.FieldCacheImpl.GetStringIndex(IndexReader reader, String field)
> at Lucene.Net.Search.FieldComparator.StringOrdValComparator.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.TopFieldCollector.OneComparatorNonScoringCollector.SetNextReader(IndexReader reader, Int32 docBase)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields)
> at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort)
> at Lucene.Net.Search.MultiSearcherThread.Run()
> at System.Threading.ExecutionContext.runTryCode(Object userData)
> at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
> at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
> InnerException:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.