db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5444) SpawnedProcess.complete may fail to destroy the process when a timeout is specified
Date Wed, 05 Oct 2011 15:29:34 GMT

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

Kristian Waagan updated DERBY-5444:

    Attachment: derby-5444-1a-destroy_on_timeout.diff

Attaching patch 1a, which includes the following changes:
 o don't throw InterruptedException when sleeping.
    This cluttered the calling code, and instead I restored the interrupted status of the
thread and continued work.
 o rewrote loop/login in complete to make sure we always destroy the process if a timeout
is specified and we indeed time out.
 o print a warning if we are interrupted while waiting for the output from the process to
be gathered.

Regression tests passed on Solaris11.
Patch ready for review.
> 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:
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>         Attachments: derby-5444-1a-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


View raw message