Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-18018

[C++] Potential segmentation fault in unit tests due to usage of AllComplete instead of AllFinished

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 10.0.0
    • C++

    Description

      Many unit tests rely on StartAndCollect which was running AllComplete on two futures. The first was the plan finished future and the second was the sink generator collector future. However, AllComplete exits early if one of these futures fails. There were some cases where an error was delivered to the sink generator (and thus triggers that future) before the plan finished future was marked complete. This was generally quite rare but could lead to the plan getting deleted before all tasks had completely finished and it could sometimes lead to a segmentation fault.

      The solution is to simply use AllFinished here as AllFinished waits for all futures to finish regardless of status.

      Attachments

        Issue Links

          Activity

            People

              westonpace Weston Pace
              westonpace Weston Pace
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m