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

Acero's Execution Plan never finishes.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 10.0.0
    • None
    • C++
    • None

    Description

      We have observed that sometimes an execution plan with a small input never finishes (the future returned by the ExecPlan::finished() method is never marked as finished), even though the generator in the sink node is exhausted and has returned nullopt.

      This issue seems to happen at random, the same plan with the same input sometimes works (the plan is marked finished) and sometimes it doesn't. Since the ExecPlanImpl destructor forces the executing thread to wait for the plan to finish (when the plan has not yet finished) we enter in a deadlock waiting for a plan that never finishes.

      Since this has only happened with small inputs and not in a deterministic way, we believe the issue might be in the ExecPlan::StartProducing method.

      Our hypothesis is that after the plan starts producing on each node, each node schedules their tasks and they are  immediately finished (due to the small input) and somehow the callback that marks the future finished_ finished is never executed.

       

      Status StartProducing() {
        ...
        Future<> scheduler_finished =   util::AsyncTaskScheduler::Make([this(util::AsyncTaskScheduler* async_scheduler) {
        ...
        scheduler_finished.AddCallback([this](const Status& st) { finished_.MarkFinished(st);});
      ...
      }

       

       

       

       

       

      Attachments

        Activity

          People

            westonpace Weston Pace
            dexutar Pau Garcia Rodriguez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: