Skip to content

MPP: ReportMPPTaskStatus fails when local RU consumption is not initialized #10962

Description

@windtalker

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Not deterministic yet. On the current branch, SQL queries frequently hit an error while TiFlash reports MPP task status.

Observed stack:

0[MPPTask.cpp:726] ["Failed to ReportMPPTaskStatus to 10.107.3.118:10080, due to Code: 49, e.displayText() = DB::Exception: Check local_ru failed: local ru consumption info not setup, e.what() = DB::Exception, Stack trace:\n\n\n  0x55c1568d48b3\tDB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, int) [tiflash+33982643]\n                \tdbms/src/Common/StackTrace.cpp:23\n  0x55c15d72f067\tDB::ExecutorStatisticsCollector::fillLocalExecutionSummaries(tipb::SelectResponse&) [tiflash+149696615]\n                \tdbms/src/Flash/Statistics/ExecutorStatisticsCollector.cpp:214\n  0x55c15d72e2d5\tDB::ExecutorStatisticsCollector::genTiFlashExecutionInfo() [tiflash+149693141]\n                \tdbms/src/Flash/Statistics/ExecutorStatisticsCollector.cpp:198\n  0x55c15d3f3735\tDB::MPPTask::reportStatus(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) [tiflash+146306869]\n                \tdbms/src/Flash/Mpp/MPPTaskStatistics.cpp:103\n  0x55c15d3f2008\tDB::MPPTask::runImpl() [tiflash+146300936]\n                \tdbms/src/Flash/Mpp/MPPTask.cpp:650\n  0x55c15c3bd425\tauto DB::wrapInvocable<std::__1::function<void ()>>(bool, std::__1::function<void ()>&&)::'lambda'()::operator()() [tiflash+129307685]\n                \t/usr/local/bin/../include/c++/v1/__functional/function.h:517\n  0x55c1569c4936\tDB::DynamicThreadPool::executeTask(std::__1::unique_ptr<DB::IExecutableTask, std::__1::default_delete<DB::IExecutableTask>>&) [tiflash+34965814]\n                \tdbms/src/Common/DynamicThreadPool.cpp:124\n  0x55c1569c437b\tDB::DynamicThreadPool::fixedWork(unsigned long) [tiflash+34964347]\n                \tdbms/src/Common/DynamicThreadPool.cpp:138\n  0x55c1569c5f9f\tvoid* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, std::__1::thread DB::ThreadFactory::newThread<void (DB::DynamicThreadPool::*)(unsigned long), DB::DynamicThreadPool*, unsigned long&>(bool, std::__1::basic_string<char, std::__1::char_traits<char>>, void (DB::DynamicThreadPool::*&&)(unsigned long), DB::DynamicThreadPool*&&, unsigned long&)::'lambda'(auto&&...), DB::DynamicThreadPool*, unsigned long>>(void*) [tiflash+34971551]\n                \t/usr/local/bin/../include/c++/v1/__type_traits/invoke.h:308\n  0x7f2b6e68b2ea\tstart_thread [libc.so.6+570090]\n  0x7f2b6e7103c0\t__GI___clone3 [libc.so.6+1115072]"] [source="MPP<gather_id:1, query_ts:1783496064060829569, local_query_id:369713, server_id:872, start_ts:467532792214585556,task_id:1>"] [thread_id=2943]

2. What did you expect to see? (Required)

TiFlash should report MPP task status successfully. MPP task status reporting should not fail because local RU consumption information has not been initialized.

3. What did you see instead (Required)

TiFlash failed to report MPP task status with:

DB::Exception: Check local_ru failed: local ru consumption info not setup

The failure happens while generating TiFlash execution info from ExecutorStatisticsCollector::fillLocalExecutionSummaries.

4. What is your TiFlash version? (Required)

Not collected from tiflash version.

Local checkout when filing the issue:

branch: fix_report_status_error
commit: 5d56de0512

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.component/computeseverity/majortype/bugThe issue is confirmed as a bug.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions