uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Lally (JIRA)" <uima-...@incubator.apache.org>
Subject [jira] Created: (UIMA-367) Deadlock can occur in MultiprocessingAnalysisEngine_impl.setResultSpecification
Date Thu, 05 Apr 2007 13:42:32 GMT
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: Adam Lally
             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:

line: 122

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.

View raw message