I think these are thread-safety problems related to using the same
analysis engine instance?

See prototype patch on
https://issues.apache.org/jira/browse/LUCENE-3731, this is also
causing some performance issues I think.

Currently I think because no CAS is reused, its just slow and the
possibility of thread problems is low. But by reusing CAS, these tests
run much faster (and of course then fail).

In the prototype patch as a workaround, i added this:
+    // nocommit: how can we get our 'own' analysis engine from the factory?
+    synchronized(analysisEngine) {
+      analysisEngine.process(cas);
+    }

But I don't think we should do this... we should avoid the sync here.
Instead of caching in the AEFactory maybe each tokenstream should get
its own AnalysisEngine so there is no sync?
Otherwise, I think we need to look at something like
http://uima.apache.org/d/uimaj-2.4.0/apidocs/org/apache/uima/UIMAFramework.html#produceAnalysisEngine%28org.apache.uima.resource.ResourceSpecifier,%20int,%20int%29
which can process multiple requests simultaneously, but I'm not
familiar enough with the UIMA apis to know whats best here.


On Wed, Feb 15, 2012 at 11:37 AM, Apache Jenkins Server
<jenk...@builds.apache.org> wrote:
> Build: https://builds.apache.org/job/Lucene-Solr-tests-only-trunk-java7/1738/
>
> 2 tests failed.
> FAILED:  
> org.apache.lucene.analysis.uima.UIMABaseAnalyzerTest.testRandomStrings
>
> Error Message:
> java.lang.AssertionError: Some threads threw uncaught exceptions!
>
> Stack Trace:
> java.lang.RuntimeException: java.lang.AssertionError: Some threads threw 
> uncaught exceptions!
>        at 
> org.apache.lucene.util.LuceneTestCase.tearDownInternal(LuceneTestCase.java:773)
>        at 
> org.apache.lucene.util.LuceneTestCase.access$1000(LuceneTestCase.java:131)
>        at 
> org.apache.lucene.util.LuceneTestCase$InternalSetupTeardownRule$1.evaluate(LuceneTestCase.java:600)
>        at 
> org.apache.lucene.util.LuceneTestCase$TestResultInterceptorRule$1.evaluate(LuceneTestCase.java:504)
>        at 
> org.apache.lucene.util.LuceneTestCase$RememberThreadRule$1.evaluate(LuceneTestCase.java:562)
>        at 
> org.apache.lucene.util.LuceneTestCaseRunner.runChild(LuceneTestCaseRunner.java:165)
>        at 
> org.apache.lucene.util.LuceneTestCaseRunner.runChild(LuceneTestCaseRunner.java:57)
>        at 
> org.apache.lucene.util.LuceneTestCase.checkUncaughtExceptionsAfter(LuceneTestCase.java:801)
>        at 
> org.apache.lucene.util.LuceneTestCase.tearDownInternal(LuceneTestCase.java:745)
>
>
> FAILED:  
> org.apache.lucene.analysis.uima.UIMATypeAwareAnalyzerTest.testRandomStrings
>
> Error Message:
> java.lang.AssertionError: Some threads threw uncaught exceptions!
>
> Stack Trace:
> java.lang.RuntimeException: java.lang.AssertionError: Some threads threw 
> uncaught exceptions!
>        at 
> org.apache.lucene.util.LuceneTestCase.tearDownInternal(LuceneTestCase.java:773)
>        at 
> org.apache.lucene.util.LuceneTestCase.access$1000(LuceneTestCase.java:131)
>        at 
> org.apache.lucene.util.LuceneTestCase$InternalSetupTeardownRule$1.evaluate(LuceneTestCase.java:600)
>        at 
> org.apache.lucene.util.LuceneTestCase$TestResultInterceptorRule$1.evaluate(LuceneTestCase.java:504)
>        at 
> org.apache.lucene.util.LuceneTestCase$RememberThreadRule$1.evaluate(LuceneTestCase.java:562)
>        at 
> org.apache.lucene.util.LuceneTestCaseRunner.runChild(LuceneTestCaseRunner.java:165)
>        at 
> org.apache.lucene.util.LuceneTestCaseRunner.runChild(LuceneTestCaseRunner.java:57)
>        at 
> org.apache.lucene.util.LuceneTestCase.checkUncaughtExceptionsAfter(LuceneTestCase.java:801)
>        at 
> org.apache.lucene.util.LuceneTestCase.tearDownInternal(LuceneTestCase.java:745)
>
>
>
>
> Build Log (for compile errors):
> [...truncated 5211 lines...]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: dev-h...@lucene.apache.org



-- 
lucidimagination.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to