Skip to content

[fix](filecache) fix crash on reset_range when clearing cache concurrently (pick#60271)#61204

Merged
yiguolei merged 1 commit intoapache:branch-4.0from
freemandealer:branch-4.0-pick-e3047d2
Mar 12, 2026
Merged

[fix](filecache) fix crash on reset_range when clearing cache concurrently (pick#60271)#61204
yiguolei merged 1 commit intoapache:branch-4.0from
freemandealer:branch-4.0-pick-e3047d2

Conversation

@freemandealer
Copy link
Copy Markdown
Member

…ently (#60271)

reset_range could dereference a null cell when a block was evicted/removed while a downloader thread was finalizing a partial block. FileBlock stayed alive via refcount, but its FileBlockCell had already been erased from _files (when doing clear_cache operation), leading to SIGSEGV.

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • 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
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

…ently (apache#60271)

reset_range could dereference a null cell when a block was
evicted/removed while a downloader thread was finalizing a partial
block. FileBlock stayed alive via refcount, but its FileBlockCell had
already been erased from _files (when doing clear_cache operation),
leading to SIGSEGV.
@freemandealer freemandealer requested a review from yiguolei as a code owner March 11, 2026 02:56
@hello-stephen
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?

@freemandealer
Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 16.67% (1/6) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.99% (19153/36143)
Line Coverage 36.19% (178403/492984)
Region Coverage 32.78% (138246/421786)
Branch Coverage 33.79% (60045/177717)

@yiguolei yiguolei merged commit 9975b1c into apache:branch-4.0 Mar 12, 2026
25 of 27 checks passed
@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Mar 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants