Repository navigation
os/bluestore/BlueFS: reserve the log-extension seq before releasing dirty.lock - #70892
Conversation
|
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. |
16 similar comments
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
68427d5 to
72d0690
Compare
|
ok to test |
|
jenkins test api |
1 similar comment
|
jenkins test api |
|
jenkins test make check |
|
jenkins test make check arm64 |
2 similar comments
|
jenkins test make check arm64 |
|
jenkins test make check arm64 |
|
jenkins test api |
|
jenkins test make check arm64 |
|
jenkins test make check |
|
jenkins test windows |
…irty.lock _extend_log() bumps dirty.seq_live after _flush_and_sync_log_LD() has already released dirty.lock. A file that a concurrent _signal_dirty_to_log_D() registers under the pre-bump seq_live is stranded: _consume_dirty() does an exact find(seq) and never visits that bucket, and _clear_dirty_set_stable_D() later erases it while marking the file clean. The file's op_file_update_inc never reaches the journal even though fsync() returned success; after a restart, replay reconstructs a stale fnode and RocksDB reports 'Corruption: file is too short ... to be an sstable'. Introduced by e97aa85 ("os/bluestore: fix bluefs log runway enospc"), first released in v19.0.0; Reef is unaffected. Fix by keeping all seq_live updates under dirty.lock: - split _maybe_extend_log() into _need_extend_log() and _extend_log(); - _flush_and_sync_log_LD() reserves a dedicated seq for the extension transaction atomically with its own seq advance, so no fsync can ever register a file under it; _extend_log() only steps log.t.seq; - the async-compaction site no longer extends the log itself; if the runway is short it flushes the log first, which extends it as a side effect. Fixes: https://tracker.ceph.com/issues/79068 Signed-off-by: Ming Lei <[email protected]>
72d0690 to
4040556
Compare
|
jenkins test windows |
_extend_log() waits out log_forbidden_to_expand after its caller has already advanced/reserved log seqs. The wait releases log.lock, so a concurrent flusher can enter and trip the log.t.seq == log.seq_live assert in _log_advance_seq(); without that assert it would flush the shared log.t under later seqs and the parked seqs would be appended out of order, which replay silently treats as end-of-log. Restore the wait-before-reservation design of 08cf6d0 ("os/bluestore/bluefs: Split single bluefs lock into multiple smaller locks"): _flush_and_sync_log_LD() composes log.t first and, only when the transaction needs to extend the log while expansion is forbidden, parks on log_cond with no seq reserved, re-evaluating from scratch on wakeup - re-consuming is safe because already-consumed files re-encode as empty deltas. _extend_log()'s wait becomes an assert: the flag is only set under log.lock, which the caller now holds from the check onward. Flushers that fit the runway never wait, so flush vs async compaction concurrency is unchanged. _flush_and_sync_log_LD() now holds log.lock through a single unique_lock: the wait uses the predicate form of condition_variable::wait(), and the early return and the post-flush release fall out of RAII instead of explicit unlock calls. Fixes: e97aa85 ("os/bluestore: fix bluefs log runway enospc") Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Igro Fedotov <[email protected]>
Signed-off-by: Igor Fedotov <[email protected]>
4040556 to
aa95664
Compare
|
This PR has been added to wip-bharath7-testing-20260824.015917-main. |
…d crashes (#2863) Ceph keeps RECENT_CRASH raised until a crash record is archived, so a daemon that recovered in seconds still re-pages every 12h for two weeks; on 2026-09-11 one osd.3 BlueFS assert (20.2.4) paged three times before a session archived it by hand. The responder had diagnosed it correctly but answered `investigate` (a page) because no runbook said the rem lane may act. - .agents/runbooks/ceph-daemon-crash.md: responder answers `urgent` (the handoff verb); the rem-* lane inspects each `ceph crash ls-new` id, verifies the daemon is serving and PGs are clean, checks dev-env activity, runs a pattern gate (repeat entity/stack_sig, quorum or mgr loss, daemon still down, >3 records => escalate), archives per id, waits out the mgr crash-module timer, confirms the alert dropped, and closes with a greppable digest line. Known signatures recorded, including the 09-11 assert and its nearest upstream (ceph/ceph#70892, tentacle backport #71593 open). - ops-claude.md: adds `rem-*` to the taxonomy and the autonomous remediation contract that session-launch.sh's rem prompt has pointed at since 08-23 but which did not exist. - .agents/runbooks/agentic-remediation.md: the lane overview + decision table that remediate.sh, ops-digest.sh and dev-activity-check.sh already cite. - respond.sh: `urgent` is also the answer whenever a runbook under .agents/runbooks/ says the rem lane may handle the alert unattended, even when nothing is on fire; never downgrade a runbook-covered alert to `investigate`. - Index and cross-links (.agents/README.md, CLAUDE.md, known-noise, health-gate, tier4 playbooks, alert-responder.md — whose pod table and "not wired" paragraph were stale since the 08-23 handoff landed). Blast radius: ops-claude.md rides the dev-env-ops-scripts ConfigMap, so the merge rolls the dev-env-ops pod (ns upgrade-agent) only; respond.sh lands on the next 10-min responder run. The dev-env pod is untouched. Claude-Session: https://claude.ai/code/session_0137V3ZjnmZjrufrB25EzJpk Co-authored-by: haynes-dev-bot[bot] <haynes-dev-bot[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <[email protected]>
BlueFS can lose a file's
op_file_update_incwhen a log extension races with aconcurrent
fsync():_extend_log()bumpsdirty.seq_liveafter_flush_and_sync_log_LD()has already releaseddirty.lock, so a fileregistered by
_signal_dirty_to_log_D()in that window lands in a bucket thatno
_consume_dirty()ever visits, and_clear_dirty_set_stable_D()latererases it while marking the file clean.
fsync()still returns success; aftera restart, journal replay reconstructs a stale fnode and RocksDB fails with
Corruption: file is too short ... to be an sstable.Fix by reserving the extension transaction's seq atomically with the flush's
own seq advance, while
dirty.lockis still held, so no fsync can everregister a file under it. The async-compaction site no longer extends the log
itself; it flushes first when the runway is short.
Introduced by e97aa85 ("os/bluestore: fix bluefs log runway enospc");
affects v19.0.0 (Squid) and later, Reef is unaffected.
Validated with a deterministic reproducer (forced extension plus an injected
delay in the extension window; fails 3/3 before the fix with the replayed file
size stale, passes 3/3 after) — the reproducer patch is attached to the
tracker ticket.
ceph_test_bluefspasses.Fixes: https://tracker.ceph.com/issues/79068
Checklist