Skip to content

mgr/crash: fix race in do_post() - #71180

Merged
SrinivasaBharath merged 2 commits into
ceph:mainfrom
NitzanMordhai:wip-nitzan-crash-module-lock-race-cond
Sep 30, 2026
Merged

SrinivasaBharath merged 2 commits into
ceph:mainfrom
NitzanMordhai:wip-nitzan-crash-module-lock-race-cond

Conversation

@NitzanMordhai

@NitzanMordhai NitzanMordhai commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

do_post() touched self.crashes without holding crashes_lock, so a crash post could land mid-iteration in crash ls/archive-all and blow up with "dictionary changed size during iteration", killing the module. Just needed @with_crashes like everywhere else.

Fixes: https://tracker.ceph.com/issues/79357

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

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)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

do_post() touched self.crashes without holding crashes_lock, so a
crash post could land mid-iteration in crash ls/archive-all and blow
up with "dictionary changed size during iteration", killing the
module. Just needed @with_crashes like everywhere else.

Fixes: https://tracker.ceph.com/issues/79357
Signed-off-by: Nitzan Mordechai <[email protected]>
ls() re-did the same "load if empty" check do_ls_all() already does
under crashes_lock via @with_crashes, except unlocked. Reachable from
other modules through remote('crash', 'ls') (telemetry), so it could
race a locked writer and silently drop the load. do_ls_all() already
does this safely, so just call it.

Fixes: https://tracker.ceph.com/issues/79357
Signed-off-by: Nitzan Mordechai <[email protected]>
skrumbach added a commit to skrumbach/home-ops that referenced this pull request Aug 22, 2026
* fix(rook-ceph): disable rook mgr module to stop crash storm

The prometheus mgr module unconditionally calls node_proxy_fullreport()
on every scrape, which the rook orchestrator backend doesn't implement.
The resulting NotImplementedError is recorded as a crash at the C++
dispatch boundary every 15s, which races the crash module's unlocked
do_post() into HEALTH_ERR. Disabling the rook module stops orch
dispatch entirely, removing the crash generator. This repo doesn't use
ceph orch (docs/ceph/toolbox.md already documents it as inapplicable
here), so the module isn't needed.

Upstream: rook/rook#18124, ceph/ceph#71041, ceph/ceph#71180 (all open,
unfixed even on ceph main as of 2026-08-22).

* no-mistakes(document): docs(rook-ceph): log rook mgr module disable in ceph changelog
@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath15-testing-20260929.043152-main.

@ljflores

Copy link
Copy Markdown
Member

@SrinivasaBharath
SrinivasaBharath merged commit 6b47f11 into ceph:main Sep 30, 2026
9 checks passed
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.

4 participants