This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new dfe7608e101 [Bug](pipeline) prevent PipelineFragmentContext destruct
early (#27790)
dfe7608e101 is described below
commit dfe7608e1013032fc232087137ccee234d7b29d8
Author: Pxl <[email protected]>
AuthorDate: Thu Nov 30 13:19:50 2023 +0800
[Bug](pipeline) prevent PipelineFragmentContext destruct early (#27790)
---
be/src/pipeline/task_scheduler.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/be/src/pipeline/task_scheduler.cpp
b/be/src/pipeline/task_scheduler.cpp
index 00b27fc59bf..dc9dd17826f 100644
--- a/be/src/pipeline/task_scheduler.cpp
+++ b/be/src/pipeline/task_scheduler.cpp
@@ -319,6 +319,11 @@ void TaskScheduler::_do_work(size_t index) {
}
void TaskScheduler::_try_close_task(PipelineTask* task, PipelineTaskState
state) {
+ // close_a_pipeline may delete fragment context and will core in some defer
+ // code, because the defer code will access fragment context it self.
+ std::shared_ptr<PipelineFragmentContext> lock_for_context =
+ task->fragment_context()->shared_from_this();
+
if (task->is_pending_finish()) {
task->set_state(PipelineTaskState::PENDING_FINISH);
_blocked_task_scheduler->add_blocked_task(task);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]