github-actions[bot] commented on code in PR #62155:
URL: https://github.com/apache/doris/pull/62155#discussion_r3043528274
##########
be/src/exec/pipeline/dependency.cpp:
##########
@@ -78,8 +78,24 @@ void Dependency::set_ready() {
}
for (auto task : local_block_task) {
if (auto t = task.lock()) {
- std::unique_lock<std::mutex> lc(_task_lock);
- THROW_IF_ERROR(t->wake_up(this, lc));
+ try {
+ std::unique_lock<std::mutex> lc(_task_lock);
+ THROW_IF_ERROR(t->wake_up(this, lc));
+ } catch (const doris::Exception& e) {
+ if (t->is_finalized()) {
+ // Task already completed, wake_up failure is expected and
benign.
+ } else {
Review Comment:
Because `set_ready()` is now `noexcept`, catching only `doris::Exception` is
not enough here. `t->wake_up()` still reaches code that can throw non-Doris
exceptions on the submit path, for example `TaskScheduler::submit()` ->
`MultiCoreTaskQueue::push_back()` -> `PriorityTaskQueue::push()` ->
`std::queue::emplace()`, which can raise `std::bad_alloc`. If that happens in
the runtime-filter timer thread, `set_ready()` will still hit `std::terminate`,
so this only partially fixes the background-thread crash path. Please add the
standard `std::exception` / `...` catch boundary (or drop `noexcept`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]