Skip to content

branch-2.1: [fix](blocking queue) introduce condition variable wait timeout to avoid blocking queue deadlock #50906 - #51597

Closed
github-actions[bot] wants to merge 1 commit into
branch-2.1from
auto-pick-50906-branch-2.1
Closed

branch-2.1: [fix](blocking queue) introduce condition variable wait timeout to avoid blocking queue deadlock #50906#51597
github-actions[bot] wants to merge 1 commit into
branch-2.1from
auto-pick-50906-branch-2.1

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #50906

…oid blocking queue deadlock (#50906)
### What problem does this PR solve?
We found some routine load tasks are never finish, and these task hang
for **blocking queue** is deadlock. We observed the stack using GDB and
printed the values:
![image](https://github.com/user-attachments/assets/729de36d-3bcc-46e7-b749-90e1c781a9fa)
![image](https://github.com/user-attachments/assets/f5e68040-d936-468d-bdb9-266136026b70)
It is clear that both the get thread and put thread are waiting on the
condition variable at the same time, causing a deadlock.
However, unfortunately, we have not located the problem yet. we choose
introducing timeout to avoid blocking queue deadlock temporarily.If
anyone encounters this problem or has any ideas, please feel free to
discuss under this PR.
@github-actions
github-actionsBot requested a review from yiguolei as a code ownerJune 10, 2025 02:18
@Thearas

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@Thearas

Copy link
Copy Markdown
Contributor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 64.71% (11/17) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage39.04% (10330/26459)
Line Coverage30.03% (85790/285664)
Region Coverage28.71% (44285/154276)
Branch Coverage25.42% (22661/89130)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 76.47% (13/17) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage74.55% (19429/26063)
Line Coverage69.33% (196778/283820)
Region Coverage66.84% (120026/179565)
Branch Coverage59.95% (60405/100762)

@yiguolei

Copy link
Copy Markdown
Contributor

Not merge it, and waiting for it to be stable

@morningman
morningman deleted the auto-pick-50906-branch-2.1 branch July 8, 2026 14:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Thearas@hello-stephen@yiguolei@dataroaring@sollhui