Project

General

Profile

Actions

Bug #54561

closed

5 out of 6 OSD crashing after update to 17.1.0-0.2.rc1.fc37.x86_64

Added by Kaleb KEITHLEY about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Target version:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
quincy
Regression:
No
Severity:
1 - critical
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Description of problem:
After upgrading to 17.1.0-0.2.rc1.fc37.x86_64, 5 out of 6 of my OSDs are crashing on start.

2022-03-14T11:20:44.682+0100 7ff5a50d0180 -1 bluestore::NCB::__restore_allocator::Failed open_for_read with error-code -2
2022-03-14T11:20:44.682+0100 7ff5a50d0180 0 bluestore(/var/lib/ceph/osd/ceph-0) _init_alloc::NCB::restore_allocator() failed! Run Full Recovery from ONodes (might ta
ke a while) ...
2022-03-14T11:20:54.767+0100 7ff5a50d0180 -1 /builddir/build/BUILD/ceph-17.1.0/src/os/bluestore/AvlAllocator.cc: In function 'virtual void AvlAllocator::init_add_free
(uint64_t, uint64_t)' thread 7ff5a50d0180 time 2022-03-14T11:20:54.766296+0100
/builddir/build/BUILD/ceph-17.1.0/src/os/bluestore/AvlAllocator.cc: 442: FAILED ceph_assert(offset + length <= uint64_t(device_size))

ceph version 17.1.0 (c675060073a05d40ef404d5921c81178a52af6e0) quincy (dev)

(full log attached)

Version-Release number of selected component (if applicable):
17.1.0-0.2.rc1.fc37.x86_64

How reproducible:

Steps to Reproduce:
1. Upgrade working cluster to quincy rc1 release.
2.
3.

Actual results:
OSD crashing

Expected results:
OSD working.

Additional info:
My cluster has 3 control nodes running rawhide (mons, mgrs, mds).
1 physical server with 6 HDDs running 6 OSDs (rawhide).
I'm using CephFS and RGW.


Related issues 1 (0 open1 closed)

Related to bluestore - Backport #54523: quincy: default osd_fast_shutdown=true would cause NCB to recover allocation map on each startResolvedGabriel BenHanokhActions
Actions #2

Updated by Igor Fedotov about 2 years ago

  • Project changed from Ceph to bluestore
Actions #3

Updated by Igor Fedotov about 2 years ago

Kaleb,
it would be nice to get OSD startup log with debug-bluestore set to 20.

Thanks,
Igor

Actions #4

Updated by Tomasz Torcz about 2 years ago

Log with debug bluestore = 20 put at https://pipebreaker.pl/ceph-osd.1.log.zstd (26MiB)
Compressed, as it grown to 700MB in few seconds.

Actions #5

Updated by Igor Fedotov about 2 years ago

Thanks, Tomasz!

Unfortunately AvlAllocator has got assertion before logging the presumably broken extent.
Could you please switch to bitmap allocator and collect another log?
Relevant command to do the switch:
ceph config set osd.N bluestore_allocator bitmap

Actions #7

Updated by Igor Fedotov about 2 years ago

So it looks like allocation map recovery doesn't properly handle disk sizes which are misaligned with bluestore allocation unit (which is apparently 0x10000 in this case).
From the following log snippet one can see an attempt to mark space beyond disk size as free which causes the assertion. Reported disk size is 0x4a7f851000 while extent being marked for free is 0x3b49110000~f36750000 (i.e. ending offset = 0x4a7f860000

Log snippet:

2022-03-16T12:00:01.116+0100 7f4a93c39180 1 bdev(0x5583418e5800 /var/lib/ceph/osd/ceph-1/block) open size 319967006720 (0x4a7f851000, 298 GiB)
block_size 4096 (4 KiB) rotational discard not supported

-2> 2022-03-16T12:00:24.678+0100 7f4a93c39180 10 fbmap_alloc 0x5583419bca20 init_add_free 0x3b49110000~f36750000
-1> 2022-03-16T12:00:24.692+0100 7f4a93c39180 -1 /builddir/build/BUILD/ceph-17.1.0/src/os/bluestore/BitmapAllocator.cc: In function 'virtual
void BitmapAllocator::init_add_free(uint64_t, uint64_t)' thread 7f4a93c39180 time 2022-03-16T12:00:24.678789+0100
/builddir/build/BUILD/ceph-17.1.0/src/os/bluestore/BitmapAllocator.cc: 74: FAILED ceph_assert(offs + l <= (uint64_t)device_size)

I'm going to submit a patch shortly to fix that shortly.

Actions #8

Updated by Igor Fedotov about 2 years ago

  • Status changed from New to In Progress
  • Backport set to quincy
Actions #9

Updated by Igor Fedotov about 2 years ago

After additional investigation I realized that this has already been fixed in master.
Pending backport to Quincy: https://github.com/ceph/ceph/pull/45342 (https://tracker.ceph.com/issues/54523)

In fact the following modification is apparently sufficient to fix the issue:

- SimpleBitmap sbmap(cct, div_round_up(bdev->get_size(), min_alloc_size));
+ SimpleBitmap sbmap(cct, (bdev->get_size()/ min_alloc_size));

Actions #10

Updated by Igor Fedotov about 2 years ago

  • Status changed from In Progress to Won't Fix
Actions #11

Updated by Igor Fedotov about 2 years ago

  • Related to Backport #54523: quincy: default osd_fast_shutdown=true would cause NCB to recover allocation map on each start added
Actions #12

Updated by Igor Fedotov about 2 years ago

  • Status changed from Won't Fix to Closed
Actions #13

Updated by Igor Fedotov about 2 years ago

Tomacz, Kaleb,
broken OSDs should start up fine after you update Ceph binaries with the mentioned patch.

Hence you need to wait for https://github.com/ceph/ceph/pull/45342 to be merged and new Quincy release is published. Alternatively you might want to inject the changes yourself and build new binaries...

Actions #14

Updated by Tomasz Torcz about 2 years ago

Thanks, that also explains why one OSD survived upgrade. It's on LVM volume (the rest are on raw disks), so the it is probably aligned.

Actions

Also available in: Atom PDF