github-actions[bot] commented on code in PR #64866:
URL: https://github.com/apache/doris/pull/64866#discussion_r3489332826


##########
be/src/exec/runtime_filter/runtime_filter_mgr.cpp:
##########
@@ -320,8 +311,9 @@ std::string RuntimeFilterMgr::debug_string() {
     std::string result = "Local Merger Info:\n";
     std::lock_guard l(_lock);
     for (const auto& [filter_id, ctx] : _local_merge_map) {
-        result += fmt::format("{}\n", ctx.merger->debug_string());
-        for (const auto& producer : ctx.producers) {
+        DORIS_CHECK(ctx);
+        result += fmt::format("{}\n", ctx->merger->debug_string());
+        for (const auto& producer : ctx->producers) {

Review Comment:
   This keeps the manager lock held while formatting each producer, and that 
gives the diagnostic path an ABBA lock order against active producers. A 
running producer enters `publish()`/`send_size()` with its `_rmtx` already held 
and then calls `get_local_merge_context()`, which waits for 
`RuntimeFilterMgr::_lock`; meanwhile `dump_pipeline_tasks()` can hold `_lock` 
here and then call `producer->debug_string()`, which waits for the same 
`_rmtx`. That can hang the query dump and the producer path. Please snapshot 
the merger/producers/consumers under `_lock` and do the per-filter 
`debug_string()` calls after releasing it, or otherwise keep a single lock 
order.



-- 
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]

Reply via email to