Bug #68060
closed_deferred_replay can overwrite BlueFS
0%
Description
_deferred_replay avoids BlueFS locations.
But the set of BlueFS allocations is captured before procedure starts.
During the procedure keys are removed from DB, which might trigger allocation.
These newly allocated spaces are not protected and can be written over.
Fixed algorithm:
1. open BlueFS read-only
2. write blocks
3. open BlueFS read-write
4. delete keys
IF Updated by Igor Fedotov about 2 years ago
- Priority changed from Normal to High
- Severity changed from 3 - minor to 2 - major
AK Updated by Adam Kupczyk about 2 years ago
AK Updated by Adam Kupczyk about 2 years ago
There are two flavors of corruption possible.
1.
In _deferred_replay, it might happen that after
bool has_some = _eliminate_outdated_deferred(deferred_txn, bluefs_extents);
has_some is false, meaning that no IO should be executed.
In this case we skip sending deferred_txn through BlueStore state machine.
By that we skip the last step of removing according L entry from RocksDB.
Remaining deferred is lurking in DB until such restart that something of it can be applied.
That new target could be:
- BlueFS (ok - we skip this)
- empty space (ok - its empty)
- Object data (bad - corruption)
2.
The original reported case when BlueFS is compacting in the background.
Our deferred made a snapshot of BlueFS allocations at some point,
but it does not track the changes.
The target of deferred could be:
- BlueFS as originally allocated (ok - we skip this)
- empty space (ok - its empty)
- Object data (ok - its what we are supposed to do)
- BlueFS newly allocated (bad! corrupting the files)
AK Updated by Adam Kupczyk about 2 years ago
- Pull request ID set to 60753
AK Updated by Adam Kupczyk about 2 years ago
- Status changed from New to Fix Under Review
IF Updated by Igor Fedotov over 1 year ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to squid, reef
UB Updated by Upkeep Bot over 1 year ago
- Tags (freeform) set to backport_processed
UB Updated by Upkeep Bot over 1 year ago
- Merge Commit set to 9ef9c124511eeafb09eb4cbdfea083dc00cae106
- Fixed In set to v20.0.0-232-g9ef9c124511
- Upkeep Timestamp set to 2025-07-08T18:45:00+00:00
UB Updated by Upkeep Bot over 1 year ago
- Fixed In changed from v20.0.0-232-g9ef9c124511 to v20.0.0-232-g9ef9c124511e
- Upkeep Timestamp changed from 2025-07-08T18:45:00+00:00 to 2025-07-14T15:45:20+00:00
UB Updated by Upkeep Bot over 1 year ago
- Fixed In changed from v20.0.0-232-g9ef9c124511e to v20.0.0-232-g9ef9c12451
- Upkeep Timestamp changed from 2025-07-14T15:45:20+00:00 to 2025-07-14T21:09:48+00:00
IF Updated by Igor Fedotov over 1 year ago
- Status changed from Pending Backport to New
UB Updated by Upkeep Bot over 1 year ago
- Status changed from New to Pending Backport
- Upkeep Timestamp changed from 2025-07-14T21:09:48+00:00 to 2025-08-13T14:01:32+00:00
PD Updated by Patrick Donnelly over 1 year ago ยท Edited
Igor Fedotov wrote in #note-13:
Reverted by https://github.com/ceph/ceph/pull/62214
Should the backports be Rejected then? The bot is confused.
IF Updated by Igor Fedotov over 1 year ago
- Status changed from Pending Backport to New
- Tags (freeform) deleted (
backport_processed)
IF Updated by Igor Fedotov over 1 year ago
Patrick Donnelly wrote in #note-15:
Igor Fedotov wrote in #note-13:
Reverted by https://github.com/ceph/ceph/pull/62214
Should the backports be Rejected then? The bot is confused.
Done, thanks for pointing.
UB Updated by Upkeep Bot over 1 year ago
- Status changed from New to Pending Backport
- Upkeep Timestamp changed from 2025-08-13T14:01:32+00:00 to 2025-08-21T11:39:21+00:00
UB Updated by Upkeep Bot over 1 year ago
- Tags (freeform) set to backport_processed
UB Updated by Upkeep Bot over 1 year ago
- Status changed from Pending Backport to Resolved
- Upkeep Timestamp changed from 2025-08-21T11:39:21+00:00 to 2025-08-25T19:43:40+00:00
IF Updated by Igor Fedotov over 1 year ago
- Status changed from Resolved to New
UB Updated by Upkeep Bot over 1 year ago
- Status changed from New to Pending Backport
- Upkeep Timestamp changed from 2025-08-25T19:43:40+00:00 to 2025-08-29T00:56:41+00:00
UB Updated by Upkeep Bot over 1 year ago
- Status changed from Pending Backport to Resolved
- Upkeep Timestamp changed from 2025-08-29T00:56:41+00:00 to 2025-08-29T01:36:33+00:00
PD Updated by Patrick Donnelly over 1 year ago
- Status changed from Resolved to New
- Pull request ID deleted (
60753) - Tags (freeform) deleted (
backport_processed) - Merge Commit deleted (
9ef9c124511eeafb09eb4cbdfea083dc00cae106) - Fixed In deleted (
v20.0.0-232-g9ef9c12451) - Upkeep Timestamp deleted (
2025-08-29T01:36:33+00:00)
Igor, in this situation just remove the PR number.
IF Updated by Igor Fedotov over 1 year ago
Patrick Donnelly wrote in #note-24:
Igor, in this situation just remove the PR number.
ah, ok. Good to know.
YO Updated by Yuma Ogami over 1 year ago
I have two questions about this issue.
Q1: The following my understanding correct?
- If object data is corrupted: If there are other healthy replicas, the corruption will be detected and fixed on scrub or read.
- If BlueFS is corrupted: The OSD would crash during operation or fail to start at next BlueFS's open process.
Q2: And is there a new fix being developed after the following PR was reverted?
https://github.com/ceph/ceph/pull/60753
YO Updated by Yuma Ogami about 1 year ago
Any updates on this?
SK Updated by Stefan Kooman about 1 year ago
I'm also interested in how this will be fixed. This issue got a severity of major. Since it involves data corruption I would expect a high priority. Is the likelihood of hitting this issue really low?
KS Updated by Konstantin Shalygin 8 months ago
- Backport changed from squid, reef to tentacle, squid
AA Updated by Alex Ainscow about 2 months ago
- Related to Bug #81440: BlueStore ignores RocksDB iterator read errors: fsck, listing, omap iteration and allocation recovery silently skip data added
AK Updated by Adam Kupczyk about 1 month ago
- Backport changed from tentacle, squid to umbrella, tentacle, squid
AK Updated by Adam Kupczyk about 1 month ago
- Pull request ID set to 69961
AK Updated by Adam Kupczyk about 1 month ago
- Status changed from New to Fix Under Review
UB Updated by Upkeep Bot about 1 month ago
- Copied to Backport #82616: tentacle: _deferred_replay can overwrite BlueFS added
UB Updated by Upkeep Bot about 1 month ago
- Copied to Backport #82617: umbrella: _deferred_replay can overwrite BlueFS added
UB Updated by Upkeep Bot about 1 month ago
- Copied to Backport #82618: squid: _deferred_replay can overwrite BlueFS added
UB Updated by Upkeep Bot about 1 month ago
- Status changed from Fix Under Review to Backporting
- Merge Commit set to 1e6a9216c5db52ffbc7fe701ac2e6a06bdd703e5
- Fixed In set to v22.0.0-369-g1e6a9216c5
- Upkeep Timestamp set to 2026-11-03T13:54:08+00:00