uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Challenger (JIRA)" <...@uima.apache.org>
Subject [jira] [Commented] (UIMA-4168) DUCC scripting uncaught exceptions
Date Tue, 06 Jan 2015 19:23:36 GMT

    [ https://issues.apache.org/jira/browse/UIMA-4168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14266604#comment-14266604

Jim Challenger commented on UIMA-4168:

It turns out to be even simpler.  Just be sure to flush stdout in viaducc before calling other
python scripting.  This way there is only one process with i/o pending and the python libs
don't get confused.

> DUCC scripting uncaught exceptions
> ----------------------------------
>                 Key: UIMA-4168
>                 URL: https://issues.apache.org/jira/browse/UIMA-4168
>             Project: UIMA
>          Issue Type: Bug
>          Components: DUCC
>    Affects Versions: 1.1.0-Ducc
>            Reporter: Jim Challenger
>            Assignee: Jim Challenger
>            Priority: Minor
>             Fix For: 2.0.0-Ducc
> If ducc scripts that use ducc_util.spawn() participate in a unix pipeline, and that pipeline
is broken, either accidentally or deliberately, the underlying subsystem.popen() might throw
an exception when components elsewhere in the pipeline close().  Couldn't find any way to
catch this exception in a reliable manner.  Solution is to set the sys.excepthook method to
a custom method that deals with the problem.  In this case, it's ok to simply ignore the exception
so it doesn't spew to the console, disconcerting the user.  The test for this is to pipe the
output of ducc_process_submit into 'head', which reads a few lines and then closes its pipe
even if ducc_process_submit isn't completed.

This message was sent by Atlassian JIRA

View raw message