-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[spill](logs) add logs to debug spill bugs #37144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
| return Status::OK(); | ||
| } | ||
|
|
||
| Status PartitionedHashJoinProbeLocalState::recovery_build_blocks_from_disk(RuntimeState* state, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: function 'recovery_build_blocks_from_disk' has cognitive complexity of 57 (threshold 50) [readability-function-cognitive-complexity]
Status PartitionedHashJoinProbeLocalState::recovery_build_blocks_from_disk(RuntimeState* state,
^Additional context
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:265: +1, including nesting penalty of 0, nesting level increased to 1
if (!spilled_stream) {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:270: +1, including nesting penalty of 0, nesting level increased to 1
if (!mutable_block) {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:284: nesting level increased to 1
auto read_func = [this, query_id, state, spilled_stream = spilled_stream, &mutable_block,
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:287: +2, including nesting penalty of 1, nesting level increased to 2
if (!shared_state_sptr || state->is_cancelled()) {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:287: +1
if (!shared_state_sptr || state->is_cancelled()) {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:300: +2, including nesting penalty of 1, nesting level increased to 2
while (!eos) {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:303: +3, including nesting penalty of 2, nesting level increased to 3
DBUG_EXECUTE_IF("fault_inject::partitioned_hash_join_probe::recover_build_blocks", {
^be/src/util/debug_points.h:36: expanded from macro 'DBUG_EXECUTE_IF'
if (UNLIKELY(config::enable_debug_points)) { \
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:303: +4, including nesting penalty of 3, nesting level increased to 4
DBUG_EXECUTE_IF("fault_inject::partitioned_hash_join_probe::recover_build_blocks", {
^be/src/util/debug_points.h:38: expanded from macro 'DBUG_EXECUTE_IF'
if (dp) { \
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:307: +3, including nesting penalty of 2, nesting level increased to 3
if (st.ok()) {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:310: +3, including nesting penalty of 2, nesting level increased to 3
if (!st.ok()) {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:318: +3, including nesting penalty of 2, nesting level increased to 3
if (block.empty()) {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:322: +3, including nesting penalty of 2, nesting level increased to 3
if (UNLIKELY(state->is_cancelled())) {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:327: +3, including nesting penalty of 2, nesting level increased to 3
if (mutable_block->empty()) {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:329: +1, nesting level increased to 3
} else {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:332: +4, including nesting penalty of 3, nesting level increased to 4
if (!st.ok()) {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:348: nesting level increased to 1
auto exception_catch_func = [read_func, query_id, this]() {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:349: +2, including nesting penalty of 1, nesting level increased to 2
DBUG_EXECUTE_IF("fault_inject::partitioned_hash_join_probe::recover_build_blocks_cancel", {
^be/src/util/debug_points.h:36: expanded from macro 'DBUG_EXECUTE_IF'
if (UNLIKELY(config::enable_debug_points)) { \
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:349: +3, including nesting penalty of 2, nesting level increased to 3
DBUG_EXECUTE_IF("fault_inject::partitioned_hash_join_probe::recover_build_blocks_cancel", {
^be/src/util/debug_points.h:38: expanded from macro 'DBUG_EXECUTE_IF'
if (dp) { \
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:356: nesting level increased to 2
auto status = [&]() {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:357: +3, including nesting penalty of 2, nesting level increased to 3
RETURN_IF_CATCH_EXCEPTION(read_func());
^be/src/common/exception.h:89: expanded from macro 'RETURN_IF_CATCH_EXCEPTION'
do { \
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:357: +4, including nesting penalty of 3, nesting level increased to 4
RETURN_IF_CATCH_EXCEPTION(read_func());
^be/src/common/exception.h:94: expanded from macro 'RETURN_IF_CATCH_EXCEPTION'
} catch (const doris::Exception& e) { \
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:357: +5, including nesting penalty of 4, nesting level increased to 5
RETURN_IF_CATCH_EXCEPTION(read_func());
^be/src/common/exception.h:95: expanded from macro 'RETURN_IF_CATCH_EXCEPTION'
if (e.code() == doris::ErrorCode::MEM_ALLOC_FAILED) { \
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:361: +2, including nesting penalty of 1, nesting level increased to 2
if (!status.ok()) {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:372: +1, including nesting penalty of 0, nesting level increased to 1
if (pipeline_task) {
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:381: +1, including nesting penalty of 0, nesting level increased to 1
DBUG_EXECUTE_IF("fault_inject::partitioned_hash_join_probe::recovery_build_blocks_submit_func",
^be/src/util/debug_points.h:36: expanded from macro 'DBUG_EXECUTE_IF'
if (UNLIKELY(config::enable_debug_points)) { \
^be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:381: +2, including nesting penalty of 1, nesting level increased to 2
DBUG_EXECUTE_IF("fault_inject::partitioned_hash_join_probe::recovery_build_blocks_submit_func",
^be/src/util/debug_points.h:38: expanded from macro 'DBUG_EXECUTE_IF'
if (dp) { \
^71c8689 to
eddabd8
Compare
|
run buildall |
TPC-H: Total hot run time: 39771 ms |
TPC-DS: Total hot run time: 172806 ms |
ClickBench: Total hot run time: 30.78 s |
|
run p1 |
|
run external |
|
run external |
|
run buildall |
TPC-H: Total hot run time: 39643 ms |
TPC-DS: Total hot run time: 171860 ms |
ClickBench: Total hot run time: 30.87 s |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
mrhhsg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
HappenLee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add logs to debug spill hash join bugs: ``` *** Query id: d7f1126be4e948c6-87f1a80ed3cbd69e *** *** is nereids: 0 *** *** tablet id: 0 *** *** Aborted at 1719291313 (unix time) try "date -d @1719291313" if you are using GNU date *** *** Current BE git commitID: 5f5262a *** *** SIGSEGV address not mapped to object (@0x8) received by PID 1419021 (TID 1421288 OR 0x7f0212b43640) from PID 8; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_master/doris/be/src/common/signal_handler.h:421 1# PosixSignals::chained_handler(int, siginfo*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 3# 0x00007F06BD506520 in /lib/x86_64-linux-gnu/libc.so.6 4# doris::vectorized::SpillReader::read(doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_master/doris/be/src/vec/spill/spill_reader.cpp:96 5# doris::vectorized::SpillStream::read_next_block_sync(doris::vectorized::Block*, bool*) in /mnt/disk1/STRESS_ENV/be/lib/doris_be 6# std::_Function_handler<void (), doris::pipeline::PartitionedHashJoinProbeLocalState::recovery_build_blocks_from_disk(doris::RuntimeState*, unsigned int, bool&)::$_1>::_M_invoke(std::_Any_data const&) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:291 7# doris::ThreadPool::dispatch_thread() in /mnt/disk1/STRESS_ENV/be/lib/doris_be 8# doris::Thread::supervise_thread(void*) at /home/zcp/repo_center/doris_master/doris/be/src/util/thread.cpp:499 9# start_thread at ./nptl/pthread_create.c:442 10# 0x00007F06BD5EA850 at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:83 ```
Add logs to debug spill hash join bugs: