You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <ui...@incubator.apache.org> on 2007/05/10 16:03:15 UTC

[jira] Closed: (UIMA-367) Deadlock can occur in MultiprocessingAnalysisEngine_impl.setResultSpecification

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

Marshall Schor closed UIMA-367.
-------------------------------

    Resolution: Fixed

> Deadlock can occur in MultiprocessingAnalysisEngine_impl.setResultSpecification
> -------------------------------------------------------------------------------
>
>                 Key: UIMA-367
>                 URL: https://issues.apache.org/jira/browse/UIMA-367
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.1
>            Reporter: Adam Lally
>         Assigned To: Marshall Schor
>             Fix For: 2.2
>
>
> User reports unit test frequently hangs at the following location:
> ----------------
> Thread [Thread-1] (Suspended)
>    Object.wait(long) line: not available [native method]
>    ResourcePool.getResource(long) line: 166
>    AnalysisEnginePool.setResultSpecification(ResultSpecification) line:
> 155
> MultiprocessingAnalysisEngine_impl.setResultSpecification(ResultSpecification)
> line: 122
> MultiprocessingAnalysisEngine_impl(AnalysisEngineImplBase).process(CAS,
> ResultSpecification) line: 200
>    MultiprocessingAnalysisEngine_implTest$ProcessThread.run() line: 363
> -------------------
> I took a look at the code for
> AnalysisEnginePool.setResultSpecification.  It tries to set the result
> specification of all AEs in the pool.  To do this it attempts to check
> out all instances from the pool, set their result spec, and then
> releases them all.  If this method is executed simultaneously from two
> threads,  it can easily result in deadlock (each thread has some
> portion of the instances checked out and is trying to check out the
> remainder of them, and both will wait forever).
> And this method is called from the process(CAS, ResultSpecification)
> method, called in this test case from multiple threads.
> This design is broken and must be fixed.

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