db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5444) SpawnedProcess.complete may fail to destroy the process when a timeout is specified
Date Thu, 06 Oct 2011 00:06:29 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121622#comment-13121622
] 

Dag H. Wanvik commented on DERBY-5444:
--------------------------------------

Thanks, Kristian. I think, if we don't expect any interrupts to happen that it's good to just
fail the test, since probably it would be assign that something else is wrong - better to
fail early. I see now you ignore it in two cases: sleep (where it doesn't really matter as
you say) and while waiting for the two streamsavers to terminate. You throw in the case where
we get interrupted before we are able to see the spawned process terminate and get its error
code. I guess that protects the main functionality, but I think I'd prefer throwing in the
other two cases as well (from the fail early principle). Unless you can see a reason it would
be good to continue here? But that is just my preference, your call.
+1 in any case.
                
> SpawnedProcess.complete may fail to destroy the process when a timeout is specified
> -----------------------------------------------------------------------------------
>
>                 Key: DERBY-5444
>                 URL: https://issues.apache.org/jira/browse/DERBY-5444
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.9.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>         Attachments: derby-5444-1a-destroy_on_timeout.diff, derby-5444-1b-destroy_on_timeout.diff
>
>
> The logic in SpawnedProcess has a weakness that may result in the wrapped process not
being destroyed if the destroy variable is false and a timeout is specified.
> The problem is that the while condition will shortcut the if condition in the catch clause
(where destroy is set to true if the timeout is exceeded).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message