liutang123 opened a new pull request, #52239:
URL: https://github.com/apache/doris/pull/52239

   ### What problem does this PR solve?
   light brpc thread pool is being occupied by runtime filter merge operation.
   The stack is as follows:
   ```
   Thread 1012 (Thread 0x7fc628f726c0 (LWP 13362) "brpc_light"):
   #0  0x00007fc89d5fba7d in syscall () from /lib64/libc.so.6
   #1  0x0000558aa0409a7e in 
bthread::wait_pthread(bthread::ButexPthreadWaiter&, timespec*) ()
   #2  0x0000558aa040a834 in bthread::butex_wait(void*, int, timespec const*) ()
   #3  0x0000558aa044fa7e in bthread_id_join ()
   #4  0x0000558a94d67aec in 
doris::RuntimeFilterMergeControllerEntity::merge(doris::PMergeFilterRequest 
const*, butil::IOBufAsZeroCopyInputStream*, bool) ()
   #5  0x0000558a94c57330 in 
doris::FragmentMgr::merge_filter(doris::PMergeFilterRequest const*, 
butil::IOBufAsZeroCopyInputStream*) ()
   #6  0x0000558a94e3ef32 in std::_Function_handler<void (), 
doris::PInternalServiceImpl::merge_filter(google::protobuf::RpcController*, 
doris::PMergeFilterRequest const*, doris::PMergeFilterResponse*, 
google::protobuf::Closure*)::$_0>::_M_invoke(std::_Any_data const&) ()
   #7  0x0000558a94e51beb in doris::WorkThreadPool<false>::work_thread(int) ()
   #8  0x0000558aa184d8d0 in execute_native_thread_routine ()
   #9  0x00007fc89d57b215 in start_thread () from /lib64/libc.so.6
   #10 0x00007fc89d5fdbdc in clone3 () from /lib64/libc.so.6
   ```
   The deadlock may be as shown in the following figure:
   <img width="627" alt="Clipboard_Screenshot_1750766684" 
src="https://github.com/user-attachments/assets/d59a5134-41ce-44d9-bb55-11fa8b2ecd60";
 />
   
   
   use AutoReleaseClosure when merge runtime filter.
   
   Issue Number: close #xxx
   
   Related PR: #xxx
   
   Problem Summary:
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   
   


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