Project

General

Profile

Actions

Bug #79141

closed
JC ML

bluefs: assert in append_try_flush aborts OSDs on 16K page-size hosts

Bug #79141: bluefs: assert in append_try_flush aborts OSDs on 16K page-size hosts

Added by Jasper Capel 4 months ago. Updated 3 months ago.

Status:
Backporting
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
Community (user)
Backport:
tentacle
Regression:
Yes
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-3269-g44fded082c
Released In:
Upkeep Timestamp:
2026-09-16T00:41:01+00:00

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.


Related issues 1 (1 open — 0 closed)

Copied to bluestore - Backport #80554: tentacle: bluefs: assert in append_try_flush aborts OSDs on 16K page-size hostsNewMing Lei

Actions

IF Updated by Igor Fedotov 4 months ago Actions #1

  • 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 Actions #2

  • Assignee deleted (Igor Fedotov)

IF Updated by Igor Fedotov 4 months ago Actions #3

  • Status changed from Triaged to In Progress

ML Updated by Ming Lei 4 months ago Actions #4

Hi Jasper,

Thanks for the report, and I have sent out one fix, please feel free to verify:

https://github.com/ceph/ceph/pull/71004

Meantime before the fix lands upstream, you may workaround it via
"bluefs_wal_envelope_mode = false" or degrade to v20.2.2.

Thanks Igor for mentoring.

Ming

IF Updated by Igor Fedotov 4 months ago Actions #5

  • Status changed from In Progress to Fix Under Review
  • Backport set to tentacle

ML Updated by Ming Lei 4 months ago Actions #6

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 Actions #7

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,

ML Updated by Ming Lei 3 months ago Actions #8

  • Assignee set to Ming Lei

ML Updated by Ming Lei 3 months ago Actions #9

  • Pull request ID set to 71004

BH Updated by Brad Hubbard 3 months ago Actions #10

  • Tags set to s390
  • Tags (freeform) set to powerpcle64

BH Updated by Brad Hubbard 3 months ago Actions #11

  • Tags changed from s390 to s390, powerpcle64, aarch64
  • Tags (freeform) deleted (powerpcle64)

BH Updated by Brad Hubbard 3 months ago Actions #12

  • Tags changed from s390, powerpcle64, aarch64 to s390, powerpcle64, arm64

UB Updated by Upkeep Bot 3 months ago Actions #13

  • 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 Actions #14

  • 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
Actions

Also available in: PDF Atom