[jbosstools-issues] [JBoss JIRA] (JBIDE-23904) StreamGobbler fails in 10% of cases

Rob Stryker (JIRA) issues at jboss.org
Wed Feb 15 19:57:00 EST 2017


     [ https://issues.jboss.org/browse/JBIDE-23904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Stryker updated JBIDE-23904:
--------------------------------
    Fix Version/s: 4.4.0.Final


> StreamGobbler fails in 10% of cases
> -----------------------------------
>
>                 Key: JBIDE-23904
>                 URL: https://issues.jboss.org/browse/JBIDE-23904
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: cdk
>    Affects Versions: 4.4.3.AM2
>            Reporter: Rob Stryker
>             Fix For: 4.4.0.Final
>
>
> The StreamGobbler implementation in CDKLaunchUtility fails in about 10% of cases. An example standalone java class with copied code demonstrates this:
> https://paste.fedoraproject.org/paste/F1QIqHhefBIXCECQPW9RuV5M1UNdIGYhyRLivL9gydE=
> After playing with it (trying to run a command with a space in the path), I discovered it failed in two different ways about 10% of the time. This is due to lack of synchronization. The thread reading the stream might be asked for its results AFTER the process has ended, but BEFORE the stream has been read completely. 
> Two things were needed:  1) synchronized control for extremely short calls to add a line that's been read or check if the flow has been canceled, and 2) a delay in getting hte final output even after the process has ended, as there may still be lines to read in the stream. 



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jbosstools-issues mailing list