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

          Roman Shaposhnik created issue -
          Roman Shaposhnik made changes -
          Field Original Value New Value
          Attachment 0001-BIGTOP-950.-race-condition-for-output-consumption-in.patch [ 12581286 ]
          Roman Shaposhnik made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          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???
          Konstantin Boudnik made changes -
          Link This issue is broken by BIGTOP-835 [ BIGTOP-835 ]
          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.
          Konstantin Boudnik made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Konstantin Boudnik made changes -
          Link This issue is related to BIGTOP-953 [ BIGTOP-953 ]
          Roman Shaposhnik made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development