BiteTheDDDDt opened a new pull request, #62155:
URL: https://github.com/apache/doris/pull/62155

   ### What problem does this PR solve?
   
   Problem Summary:
   
   A SIGSEGV crash occurs in `PipelineTask::is_blockable()` when a delayed
   `wake_up()` call arrives after a task has already been finalized. The crash
   happens because `finalize()` resets `_sink` to null, but `wake_up()` still
   proceeds to submit the task to the scheduler, which calls `is_blockable()`
   and dereferences the null `_sink` pointer.
   
   The race condition:
   1. Query cancellation triggers `make_all_runnable()` → consumer task gets
      finalized → `_sink.reset()` (null)
   2. Build-side task publishes a runtime filter → `signal()` →
      `Dependency::set_ready()` → calls `wake_up()` on the finalized consumer 
task
   3. `wake_up()` → `_state_transition(RUNNABLE)` returns OK (no-op under
      `_wake_up_early`) → proceeds to `submit()` → `is_blockable()` →
      `_sink->is_blockable()` → SIGSEGV at address 0x0
   
   This was introduced by commit 977c1f1134c (#61989) which added the
   `WAKE_UP_EARLY_LEGAL_STATE_TRANSITION` table to allow FINALIZED→RUNNABLE as
   a legal no-op, but did not add the corresponding guard in `wake_up()` to
   skip submission when the transition is a no-op.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test: Unit Test (PipelineTaskTest.TEST_STATE_TRANSITION updated with
     submit_count verification for both FINISHED and FINALIZED states, plus
     positive test for normal BLOCKED→RUNNABLE wake_up)
   - Behavior changed: No
   - Does this need documentation: No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to