Bigtop
  1. Bigtop
  2. BIGTOP-950

race condition for output consumption in Shell code

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.5.0
    • Fix Version/s: 0.6.0
    • Component/s: Tests
    • Labels:
      None

      Description

      It seems that there's a race condition in Shell's implementation between calling proc.waitFor() and making sure that all of the output is transferred to ByteArrays by consumeProcessOutput

        Issue Links

          Activity

          Hide
          Anatoli Fomenko added a comment -

          +1

          Show
          Anatoli Fomenko added a comment - +1
          Hide
          Konstantin Boudnik added a comment - - edited

          -1

          There's an easier solution by joining on the thread. However, it isn't the point.

          This is the regression from BIGTOP-835
          Instead of fixing it with an arguably sub-optimal workaround I'd rather revert BIGTOP-835 and do it correctly.

          Besides, this like in the particular code block
          if (timeout >= 0) {
          doesn't make any frigging sense. What's the point of 0 timeout???

          Show
          Konstantin Boudnik added a comment - - edited -1 There's an easier solution by joining on the thread. However, it isn't the point. This is the regression from BIGTOP-835 Instead of fixing it with an arguably sub-optimal workaround I'd rather revert BIGTOP-835 and do it correctly. Besides, this like in the particular code block if (timeout >= 0) { doesn't make any frigging sense. What's the point of 0 timeout???
          Hide
          Konstantin Boudnik added a comment -

          Seems to be already committed as bc49df0 on master.

          Show
          Konstantin Boudnik added a comment - Seems to be already committed as bc49df0 on master.

            People

            • Assignee:
              Roman Shaposhnik
              Reporter:
              Roman Shaposhnik
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development