uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marshall Schor (JIRA)" <uima-...@incubator.apache.org>
Subject [jira] Commented: (UIMA-398) test case intermittently fails running Java 6 - with a hang: uimaj-core, org.apache.uima.analysis_engine.impl.MultiprocessingAnalysisEngine_implTest
Date Mon, 07 May 2007 00:06:15 GMT

    [ https://issues.apache.org/jira/browse/UIMA-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493961
] 

Marshall Schor commented on UIMA-398:
-------------------------------------

The test case fails when doing the following:

1) set up an instance of MultiprocessingAnalysisEngine_impl with a pool of 3 
2) start 4 threads (4 > 3); each gets a new CAS and calls the process method on the same
MultiprocessingAE instance
3) The failure comes when the process call is using the form with the result specification.

It seems odd that one thread calling process would check out *all* instances to set the result
specifications on all the instances in the pool (that's what's implemented for setResultSpecification).

This is the cause of the hang.  If one thread starts setting result specification, it starts
checking instances out of the pool, one by one.  If another starts also, then they lock each
other out (one might have 2, the other 1, and they'll just sit there waiting to get the rest).

> test case intermittently fails running Java 6 - with a hang: uimaj-core, org.apache.uima.analysis_engine.impl.MultiprocessingAnalysisEngine_implTest
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: UIMA-398
>                 URL: https://issues.apache.org/jira/browse/UIMA-398
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.1
>         Environment: Sun Java 6_01
>            Reporter: Marshall Schor
>         Attachments: screenshot-1.jpg
>
>
> The failure is intermittent.  It fails the first time running (for me) from a reboot,
but runs after that.  The failure occurs in the test where it does a threads[i].join(); and
happens when i = 0.  I found this out by changing the join() to join(10000), and then inserting:
>         if (threads[i].isAlive()) {
>           System.err.println("timeout waiting for thread to complete " + i);
>           fail("timeout waiting for thread to complete " + i);
>         }

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


Mime
View raw message