Skip to content

Commit

Permalink
reactor: fix crash during metrics gathering
Browse files Browse the repository at this point in the history
The crash is caused by statistics request while scheduling_group is
removed. The tasks_pending metric gathering triggers
reactor::pending_task_count() call. This call causes null pointer
derefence as the task queue pointer has been reset in
reactor::destroy_scheduling_group()
  • Loading branch information
pmelkozer committed Jun 30, 2024
1 parent f09e7c4 commit d59a1ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/reactor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2545,7 +2545,9 @@ uint64_t
reactor::pending_task_count() const {
uint64_t ret = 0;
for (auto&& tq : _task_queues) {
ret += tq->_q.size();
if (tq) {
ret += tq->_q.size();
}
}
return ret;
}
Expand Down

0 comments on commit d59a1ce

Please sign in to comment.