• Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.4.0.Final
    • 4.4.3.AM2
    • cdk
    • None

      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.

            [JBIDE-23904] StreamGobbler fails in 10% of cases

            Amol Dongare made changes -
            Workflow Original: GIT Pull Request workflow [ 12805454 ] New: GIT Pull Request workflow v1.0 [ 14237162 ]

            This issue has not been updated for more than 2 years so closing. If you think this issue still persists feel free to reopen it and if possible add more details.
            Thank you!

            Josef Kopriva added a comment - This issue has not been updated for more than 2 years so closing. If you think this issue still persists feel free to reopen it and if possible add more details. Thank you!
            Josef Kopriva made changes -
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            Pretty bad synchronization bug. Fixed it.

            Rob Stryker (Inactive) added a comment - Pretty bad synchronization bug. Fixed it.
            Rob Stryker (Inactive) made changes -
            Resolution New: Done [ 1 ]
            Status Original: Pull Request Sent [ 10011 ] New: Resolved [ 5 ]
            Rob Stryker (Inactive) made changes -
            Assignee New: Rob Stryker [ rob.stryker ]
            Automated transition triggered when Rob Stryker (Inactive) created pull request #1421 in GitHub -
            Status Original: Open [ 1 ] New: Pull Request Sent [ 10011 ]
            Rob Stryker (Inactive) made changes -
            Fix Version/s New: 4.4.0.Final [ 12328378 ]
            Rob Stryker (Inactive) created issue -

              rob.stryker Rob Stryker (Inactive)
              rob.stryker Rob Stryker (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: