Bug #79141
closedbluefs: assert in append_try_flush aborts OSDs on 16K page-size hosts
0%
Description
Since upgrading to 20.2.3, every OSD on my 16K-page hosts aborts on start
and never recovers. Putting those same OSDs back on 20.2.2, same disks, same
data, brings them straight up again.
BlueFS.cc: 4088: FAILED ceph_assert(p2aligned(pos1 ^ pos2, ceph::_page_size))
void BlueFS::append_try_flush(FileWriter*, const char*, size_t)
thread bstore_kv_sync
Backtrace: BlueStore::_kv_sync_thread -> BlueStore::_txc_apply_kv ->
RocksDBStore::submit_transaction -> rocksdb WriteToWAL ->
rocksdb::WritableFileWriter::WriteBuffered -> BlueFS::append_try_flush
The cluster has 21 OSDs:
- 18 on x86_64, getconf PAGESIZE 4096, running 20.2.3, no problems at all.
- 3 on aarch64 (Asahi Linux, kernel 6.17.9+deb13.2-asahi), getconf PAGESIZE
16384. Each one that restarted onto 20.2.3 went into an abort loop -- 237
crash records, all with the same stack signature. The two that happened
not to restart stayed up on 20.2.2 and were fine.
The OSD log on the failing hosts reports block_size 4096 and
metadata_block_size 4096.
Page size is the only difference I can find between the hosts that work and
the ones that don't, but I haven't looked into whether that's actually the
cause.
The assert appears to be new in this release: git log v20.2.2..v20.2.3 --
src/os/bluestore/BlueFS.cc shows it added by 7560ac9152f, with 1cb0eec8a19
alongside.
Happy to collect more data (debug_bluefs logs or whatever is useful) or test
a patch -- I have the hardware and it reproduces on demand.
IF Updated by Igor Fedotov 4 months ago
- Status changed from New to Triaged
- Assignee set to Igor Fedotov
@Ming Lei is working on this
IF Updated by Igor Fedotov 4 months ago
- Assignee deleted (
Igor Fedotov)
IF Updated by Igor Fedotov 4 months ago
- Status changed from Triaged to In Progress
IF Updated by Igor Fedotov 4 months ago
- Status changed from In Progress to Fix Under Review
- Backport set to tentacle
ML Updated by Ming Lei 4 months ago
Hi Jasper Capel,
Fixes the workaround mentioned in #4 as found by Igor.
Follows the fixed workaround:
1) revert wal to plain when cluster is down
ceph-bluestore-tool --path /var/lib/ceph/osd/ceph-NNN --command revert-wal-to-plain
2) set `bluefs_wal_envelope_mode = false` in ceph.conf
[osd]
bluefs_wal_envelope_mode = false
3) start ceph cluster.
And suggest to verify it in your lab or single osd first before applying it on
production environment.
After upgrading to a release with the fix, remove the setting — envelope mode
resumes on new WAL files automatically.
Thanks,
ML Updated by Ming Lei 4 months ago
oops, please ignore #6, sorry for the noise.
Follows the fixed workaround, on the non-4k-page hosts only:
1. With the OSD stopped, convert its WAL files back to plain (run once per OSD):
ceph-bluestore-tool --path /var/lib/ceph/osd/ceph-NNN --command revert-wal-to-plain
2. Set in the host's ceph.conf, so newly created WAL files stay plain:
[osd]
bluefs_wal_envelope_mode = false
3. Start the OSDs
And suggest to verify it in your lab or single osd first before applying
it on production environment.
After upgrading to a release with the fix, remove the setting — envelope mode resumes
on new WAL files automatically.
Thanks,
BH Updated by Brad Hubbard 3 months ago
- Tags set to s390
- Tags (freeform) set to powerpcle64
BH Updated by Brad Hubbard 3 months ago
- Tags changed from s390 to s390, powerpcle64, aarch64
- Tags (freeform) deleted (
powerpcle64)
BH Updated by Brad Hubbard 3 months ago
- Tags changed from s390, powerpcle64, aarch64 to s390, powerpcle64, arm64
UB Updated by Upkeep Bot 3 months ago
- Copied to Backport #80554: tentacle: bluefs: assert in append_try_flush aborts OSDs on 16K page-size hosts added
UB Updated by Upkeep Bot 3 months ago
- Status changed from Fix Under Review to Backporting
- Merge Commit set to 44fded082ceece121ebb10595a3b0b47e632fd2a
- Fixed In set to v21.3.0-3269-g44fded082c
- Upkeep Timestamp set to 2026-09-16T00:41:01+00:00