[be](gracefulexit) should stop async result writer when graceful exit#51743
Merged
yiguolei merged 2 commits intoapache:masterfrom Jun 16, 2025
Merged
[be](gracefulexit) should stop async result writer when graceful exit#51743yiguolei merged 2 commits intoapache:masterfrom
yiguolei merged 2 commits intoapache:masterfrom
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 34832 ms |
TPC-DS: Total hot run time: 190384 ms |
ClickBench: Total hot run time: 29.11 s |
Contributor
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
jacktengg
approved these changes
Jun 16, 2025
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
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.
During graceful exit, async result writer will not exit and hang because it will try to pull data block the queue endlessly.
AsyncResultWriter thread should exit when fragment mgr wants to exit.
Thread 652 (Thread 0x7fd20c1b0700 (LWP 434882) "FragmentMgrAsyn"):
#0 futex_abstimed_wait_cancelable (private=, abstime=0x7fca3442f560, clockid=, expected=0, futex_word=0x61b000c009f8) at ../sysdeps/nptl/futex-internal.h:320
#1 __pthread_cond_wait_common (abstime=0x7fca3442f560, clockid=, mutex=0x61b000c009a8, cond=0x61b000c009d0) at pthread_cond_wait.c:520
#2 __pthread_cond_timedwait (cond=0x61b000c009d0, mutex=0x61b000c009a8, abstime=0x7fca3442f560) at pthread_cond_wait.c:665
#3 0x00005566ce61f350 in __gthread_cond_timedwait (__cond=0x61b000c009d0, __mutex=0x61b000c009a8, __abs_timeout=0x7fca3442f560) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/x86_64-linux-gnu/c++/11/bits/gthr-default.h:872
#4 std::__condvar::wait_until (this=0x61b000c009d0, __m=..., __abs_time=...) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_mutex.h:162
#5 std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (this=, __lock=..., __atime=...) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/condition_variable:222
#6 0x00005566ce61f021 in std::condition_variable::wait_until<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (this=, __lock=..., __atime=...) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/condition_variable:135
#7 0x000055670b59b0be in std::condition_variable::wait_for<long, std::ratio<1l, 1l> > (this=0x61b000c009d0, __lock=..., __rtime=...) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/condition_variable:163
#8 doris::vectorized::AsyncResultWriter::process_block (this=, state=0x61e001b3c080, profile=) at /root/doris/be/src/vec/sink/writer/async_result_writer.cpp:149
#9 0x000055670b59eb1f in doris::vectorized::AsyncResultWriter::start_writer(doris::RuntimeState*, doris::RuntimeProfile*)::$_0::operator()() const (this=0x60400146b110) at /root/doris/be/src/vec/sink/writer/async_result_writer.cpp:103
#10 std::__invoke_impl<void, doris::vectorized::AsyncResultWriter::start_writer(doris::RuntimeState*, doris::RuntimeProfile*)::$_0&>(std::__invoke_other, doris::vectorized::AsyncResultWriter::start_writer(doris::RuntimeState*, doris::RuntimeProfile*)::$_0&) (__f=...) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61
#11 std::__invoke_r<void, doris::vectorized::AsyncResultWriter::start_writer(doris::RuntimeState*, doris::RuntimeProfile*)::$_0&>(doris::vectorized::AsyncResultWriter::start_writer(doris::RuntimeState*, doris::RuntimeProfile*)::$_0&) (__fn=...) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:111
#12 std::_Function_handler<void (), doris::vectorized::AsyncResultWriter::start_writer(doris::RuntimeState*, doris::RuntimeProfile*)::$_0>::_M_invoke(std::_Any_data const&) (__functor=...) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:291
#13 0x00005566d2f2270b in doris::ThreadPool::dispatch_thread (this=0x616000415580) at /root/doris/be/src/util/threadpool.cpp:615
#14 0x00005566d2ef973a in doris::Thread::supervise_thread (arg=0x611005af0540) at /root/doris/be/src/util/thread.cpp:468
#15 0x00007fd5c2034609 in start_thread (arg=) at pthread_create.c:477
#16 0x00007fd5c22e1133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)