[Bug](exchange) avoid coredump coz nullptr#57640
Merged
yiguolei merged 1 commit intoapache:branch-2.1from Nov 4, 2025
Merged
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
zhangstar333
previously approved these changes
Nov 4, 2025
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
The base branch was changed.
0231bf7 to
485a19e
Compare
Contributor
Author
|
run buildall |
Contributor
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
yiguolei
approved these changes
Nov 4, 2025
BiteTheDDDDt
added a commit
to BiteTheDDDDt/incubator-doris
that referenced
this pull request
Nov 4, 2025
### What problem does this PR solve? In some cases (such as when the operator is triggered to cancel before opened), the operator close may encounter a core dump due to a nullptr. ```cpp *** Current BE git commitID: 50e6e41 *** *** SIGSEGV unknown detail explain (@0x0) received by PID 3836583 (TID 3840122 OR 0x7f840373a700) from PID 0; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_enterprise/doris/be/src/common/signal_handler.h:421 1# os::Linux::chained_handler(int, siginfo_t*, void*) in /data1/doris/java8/jre/lib/amd64/server/libjvm.so 2# JVM_handle_linux_signal in /data1/doris/java8/jre/lib/amd64/server/libjvm.so 3# signalHandler(int, siginfo_t*, void*) in /data1/doris/java8/jre/lib/amd64/server/libjvm.so 4# 0x00007F8FC93CD880 in /lib64/libc.so.6 5# doris::pipeline::ExchangeSinkLocalState::close(doris::RuntimeState*, doris::Status) at /home/zcp/repo_center/doris_enterprise/doris/be/src/pipeline/exec/exchange_sink_operator.cpp:759 6# doris::pipeline::DataSinkOperatorXBase::close(doris::RuntimeState*, doris::Status) at /home/zcp/repo_center/doris_enterprise/doris/be/src/pipeline/pipeline_x/operator.h:664 7# doris::pipeline::PipelineXTask::close(doris::Status, bool) at /home/zcp/repo_center/doris_enterprise/doris/be/src/pipeline/pipeline_x/pipeline_x_task.cpp:462 8# doris::pipeline::_close_task(doris::pipeline::PipelineTask*, doris::pipeline::PipelineTaskState, doris::Status) at /home/zcp/repo_center/doris_enterprise/doris/be/src/pipeline/task_scheduler.cpp:246 9# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /home/zcp/repo_center/doris_enterprise/doris/be/src/pipeline/task_scheduler.cpp:288 10# doris::ThreadPool::dispatch_thread() in /data1/doris/be/lib/doris_be 11# doris::Thread::supervise_thread(void*) at /home/zcp/repo_center/doris_enterprise/doris/be/src/util/thread.cpp:499 12# start_thread in /lib64/libpthread.so.0 13# clone in /lib64/libc.so.6 ``` This pull request makes a small improvement to the `ExchangeSinkLocalState::close` method by adding a null check before updating channel timers, which helps prevent potential crashes or undefined behavior. ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [ ] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [x] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [x] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [x] No. - [ ] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [x] No. - [ ] Yes. <!-- Add document PR link here. eg: apache/doris-website#1214 --> ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
BiteTheDDDDt
added a commit
to BiteTheDDDDt/incubator-doris
that referenced
this pull request
Nov 4, 2025
### What problem does this PR solve? In some cases (such as when the operator is triggered to cancel before opened), the operator close may encounter a core dump due to a nullptr. ```cpp *** Current BE git commitID: 50e6e41 *** *** SIGSEGV unknown detail explain (@0x0) received by PID 3836583 (TID 3840122 OR 0x7f840373a700) from PID 0; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_enterprise/doris/be/src/common/signal_handler.h:421 1# os::Linux::chained_handler(int, siginfo_t*, void*) in /data1/doris/java8/jre/lib/amd64/server/libjvm.so 2# JVM_handle_linux_signal in /data1/doris/java8/jre/lib/amd64/server/libjvm.so 3# signalHandler(int, siginfo_t*, void*) in /data1/doris/java8/jre/lib/amd64/server/libjvm.so 4# 0x00007F8FC93CD880 in /lib64/libc.so.6 5# doris::pipeline::ExchangeSinkLocalState::close(doris::RuntimeState*, doris::Status) at /home/zcp/repo_center/doris_enterprise/doris/be/src/pipeline/exec/exchange_sink_operator.cpp:759 6# doris::pipeline::DataSinkOperatorXBase::close(doris::RuntimeState*, doris::Status) at /home/zcp/repo_center/doris_enterprise/doris/be/src/pipeline/pipeline_x/operator.h:664 7# doris::pipeline::PipelineXTask::close(doris::Status, bool) at /home/zcp/repo_center/doris_enterprise/doris/be/src/pipeline/pipeline_x/pipeline_x_task.cpp:462 8# doris::pipeline::_close_task(doris::pipeline::PipelineTask*, doris::pipeline::PipelineTaskState, doris::Status) at /home/zcp/repo_center/doris_enterprise/doris/be/src/pipeline/task_scheduler.cpp:246 9# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /home/zcp/repo_center/doris_enterprise/doris/be/src/pipeline/task_scheduler.cpp:288 10# doris::ThreadPool::dispatch_thread() in /data1/doris/be/lib/doris_be 11# doris::Thread::supervise_thread(void*) at /home/zcp/repo_center/doris_enterprise/doris/be/src/util/thread.cpp:499 12# start_thread in /lib64/libpthread.so.0 13# clone in /lib64/libc.so.6 ``` This pull request makes a small improvement to the `ExchangeSinkLocalState::close` method by adding a null check before updating channel timers, which helps prevent potential crashes or undefined behavior. ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [ ] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [x] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [x] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [x] No. - [ ] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [x] No. - [ ] Yes. <!-- Add document PR link here. eg: apache/doris-website#1214 --> ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
morrySnow
pushed a commit
that referenced
this pull request
Nov 7, 2025
yiguolei
pushed a commit
to yiguolei/incubator-doris
that referenced
this pull request
Dec 30, 2025
### What problem does this PR solve? In some cases (such as when the operator is triggered to cancel before opened), the operator close may encounter a core dump due to a nullptr. ```cpp *** Current BE git commitID: 50e6e41 *** *** SIGSEGV unknown detail explain (@0x0) received by PID 3836583 (TID 3840122 OR 0x7f840373a700) from PID 0; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_enterprise/doris/be/src/common/signal_handler.h:421 1# os::Linux::chained_handler(int, siginfo_t*, void*) in /data1/doris/java8/jre/lib/amd64/server/libjvm.so 2# JVM_handle_linux_signal in /data1/doris/java8/jre/lib/amd64/server/libjvm.so 3# signalHandler(int, siginfo_t*, void*) in /data1/doris/java8/jre/lib/amd64/server/libjvm.so 4# 0x00007F8FC93CD880 in /lib64/libc.so.6 5# doris::pipeline::ExchangeSinkLocalState::close(doris::RuntimeState*, doris::Status) at /home/zcp/repo_center/doris_enterprise/doris/be/src/pipeline/exec/exchange_sink_operator.cpp:759 6# doris::pipeline::DataSinkOperatorXBase::close(doris::RuntimeState*, doris::Status) at /home/zcp/repo_center/doris_enterprise/doris/be/src/pipeline/pipeline_x/operator.h:664 7# doris::pipeline::PipelineXTask::close(doris::Status, bool) at /home/zcp/repo_center/doris_enterprise/doris/be/src/pipeline/pipeline_x/pipeline_x_task.cpp:462 8# doris::pipeline::_close_task(doris::pipeline::PipelineTask*, doris::pipeline::PipelineTaskState, doris::Status) at /home/zcp/repo_center/doris_enterprise/doris/be/src/pipeline/task_scheduler.cpp:246 9# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /home/zcp/repo_center/doris_enterprise/doris/be/src/pipeline/task_scheduler.cpp:288 10# doris::ThreadPool::dispatch_thread() in /data1/doris/be/lib/doris_be 11# doris::Thread::supervise_thread(void*) at /home/zcp/repo_center/doris_enterprise/doris/be/src/util/thread.cpp:499 12# start_thread in /lib64/libpthread.so.0 13# clone in /lib64/libc.so.6 ``` This pull request makes a small improvement to the `ExchangeSinkLocalState::close` method by adding a null check before updating channel timers, which helps prevent potential crashes or undefined behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
In some cases (such as when the operator is triggered to cancel before opened), the operator close may encounter a core dump due to a nullptr.
This pull request makes a small improvement to the
ExchangeSinkLocalState::closemethod by adding a null check before updating channel timers, which helps prevent potential crashes or undefined behavior.Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)