Skip to content

rgw: fix logshard lock leak and infinite loop in process_single_logshard - #70026

Merged
tchaikov merged 2 commits into
ceph:mainfrom
sunyuechi:wip-reshard-logshard-infinite-loop
Aug 11, 2026
Merged

tchaikov merged 2 commits into
ceph:mainfrom
sunyuechi:wip-reshard-logshard-infinite-loop

Conversation

@sunyuechi

@sunyuechi sunyuechi commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

rgw: avoid infinite loop in process_single_logshard on list error

When list() returned an error other than ENOENT, neither is_truncated
nor marker changed, so the do/while(is_truncated) loop spun forever
holding the logshard lock and flooding the log.

rgw: release logshard lock on renew failure in process_single_logshard

When logshard_lock.renew() failed mid-loop, the function returned early
without calling logshard_lock.unlock(), leaking the lock until it
expired on its own.

Fixes: https://tracker.ceph.com/issues/78069
Fixes: https://tracker.ceph.com/issues/78070

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)

@sunyuechi
sunyuechi requested a review from a team as a code owner July 8, 2026 06:28
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

15 similar comments
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@github-actions github-actions Bot added the rgw label Jul 8, 2026
@smanjara

smanjara commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

LGTM. could you please create a tracker for the issue?

sunyuechi added 2 commits July 9, 2026 09:49
When list() returned an error other than ENOENT, neither
is_truncated nor marker changed, so the do/while(is_truncated) loop spun
forever holding the logshard lock and flooding the log.

Fixes: https://tracker.ceph.com/issues/78070
Signed-off-by: Sun Yuechi <[email protected]>
When logshard_lock.renew() failed mid-loop, process_single_logshard
returned early without calling logshard_lock.unlock(), leaking the
lock until it expired on its own.

Fixes: https://tracker.ceph.com/issues/78069
Signed-off-by: Sun Yuechi <[email protected]>
@sunyuechi
sunyuechi force-pushed the wip-reshard-logshard-infinite-loop branch from e0c1a7a to c3a814f Compare July 9, 2026 01:50
@sunyuechi

Copy link
Copy Markdown
Contributor Author

@smanjara Updated.

@anrao19

anrao19 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-07-17-06:18.

@anrao19

anrao19 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-07-17-06:18.

pr testing completed and approved by @ivancich

@anrao19

anrao19 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check

@anrao19

anrao19 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@tchaikov

Copy link
Copy Markdown
Contributor

jenkins test signed

@tchaikov

Copy link
Copy Markdown
Contributor

jenkins test submodules

@tchaikov
tchaikov merged commit 387339a into ceph:main Aug 11, 2026
9 checks passed
@github-actions

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/31452621939

@github-actions

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/31452621939

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants