Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-13349

CommandOutputHandler.getOutput() is called before CommandOutputHandler.process() returns

    XMLWordPrintable

Details

    Description

      Issue Summary

      This issue started happening in Bitbucket 8. Everything works fine in previous releases.

      Due to this regression getOutput() can be called before process() completes in cases where the underlying command has already returned.

      For example:

      After calling git cat-file, once all the output from git has been read into CommandOutputHandler's internal buffer, git exits. However, there is additional processing before the output is ready. In this case, there’s a race between finishing the processing of data and getOutput() being called.

      Steps to Reproduce

      1. Call git cat-file
      2. Once all the output from git has been read into CommandOutputHandler's internal buffer, git exits.

      Expected Results

      All the processing has been done/completed and we can safely call  getOutput() 

      Actual Results

      There is still additional processing to be done before the output is ready and therefore we get into a race condition between finishing the processing of data and getOutput() being called.

      Workaround

      No workaround available at the moment.

      Attachments

        Issue Links

          Activity

            People

              mheemskerk Michael Heemskerk (Inactive)
              dbonotto Dario B
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: