Project

General

Profile

Actions

Bug #73101

closed
MB MB

SeaStore SegmentCleaner::allocate_segment: out of space with JOURNAL sseq(38) MD GEN_INL

Bug #73101: SeaStore SegmentCleaner::allocate_segment: out of space with JOURNAL sseq(38) MD GEN_INL

Added by Matan Breizman about 1 year ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Category:
Seastore
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v20.3.0-3029-gce35632016
Released In:
v21.2.0~2062
Upkeep Timestamp:
2026-10-24T01:41:13+00:00

Description

  1. Copying https://tracker.ceph.com/issues/72484, second case of the same issue.

This issue can occur from 2 cases:
1) Upon mkfs, where there is not enough segments to open
2) When an IO needs to be blocked until we clear a new segment to open and Should_block_io_on_clean doesn't work correctly.

ERROR 2025-08-05 23:40:12,964 [shard 2:main] seastore_cleaner - SegmentCleaner::allocate_segment: out of space with JOURNAL sseq(38) MD GEN_INL
ERROR 2025-08-05 23:40:12,964 [shard 2:main] osd - /ceph/rpmbuild/BUILD/ceph-20.3.0-2038-g351ff8ab/src/crimson/os/seastore/async_cleaner.cc:1085 : In function 'virtual crimson::os::seastore::segment_id_t crimson::os::seastore::SegmentCleaner::allocate_segment(crimson::os::seastore::segment_seq_t, crimson::os::seastore::segment_type_t, crimson::os::seastore::data_category_t, crimson::os::seastore::rewrite_gen_t)', abort(seastore device size setting is too small)

DEBUG 2025-08-05 23:40:12,964 [shard 0:main] seastore_journal - RecordScanner::scan_valid_records: found valid record_group_header_t(num_records=1, mdlength=0x1000, dlength=0x0, segment_nonce=0x8b613510, committed_to=jseq(sseq(35), paddr<Seg[Dev(0x0),0xf5],0x23000>), data_crc=0xffffffff) at jseq(sseq(35), paddr<Seg[Dev(0x0),0xf5],0x23000>)
DEBUG 2025-08-05 23:40:12,964 [shard 0:main] seastore_journal - RecordScanner::scan_valid_records: processing committed record groups until jseq(sseq(35), paddr<Seg[Dev(0x0),0xf5],0x23000>), 1 pending
daemon-helper: command crashed with signal 6

https://pulpito.ceph.com/sjust-2025-08-05_23:22:50-crimson-rados-wip-sjust-seastore-testing-2025-08-04-1754319725-distro-crimson-debug-gibba/8427113


Related issues 2 (1 open — 1 closed)

Related to crimson - Bug #74700: SeaStore SegmentCleaner::allocate_segment: out of space with JOURNAL sseq(38) MD GEN_INLNewRonen Friedman

Actions
Copied from crimson - Bug #72484: SeaStore SegmentCleaner::allocate_segment: out of space with JOURNAL sseq(38) MD GEN_INLResolvedMatan Breizman

Actions

MB Updated by Matan Breizman about 1 year ago Actions #1

  • Copied from Bug #72484: SeaStore SegmentCleaner::allocate_segment: out of space with JOURNAL sseq(38) MD GEN_INL added

MB Updated by Matan Breizman about 1 year ago Actions #2

  • Description updated (diff)
  • Pull request ID deleted (64771)

UB Updated by Upkeep Bot about 1 year ago Actions #3

  • Status changed from New to Resolved
  • Upkeep Timestamp changed from 2025-09-16T12:36:44+00:00 to 2025-09-18T12:36:17+00:00

MA Updated by MOHIT AGRAWAL 10 months ago Actions #4

https://pulpito.ceph.com/moagrawa-2026-01-29_04:55:52-crimson-rados-main-distro-default-trial/24849
/teuthology/moagrawa-2026-01-29_04:55:52-crimson-rados-main-distro-default-trial/24849/remote/trial148/log
ceph-osd.2.log.gz

throwing below messages in log

DEBUG 2026-01-29 11:41:58,166 [shard 1:main] seastore_journal - SegmentAllocator::open: Dev(0x0)_MD_G1
ERROR 2026-01-29 11:41:58,166 [shard 1:main] seastore_cleaner - SegmentCleaner::allocate_segment: out of space with JOURNAL sseq(38) MD GEN_INL
ERROR 2026-01-29 11:41:58,166 [shard 1:main] osd - /ceph/rpmbuild/BUILD/ceph-20.3.0-4719-g33f3ef9a/src/crimson/os/seastore/async_cleaner.cc:1085 : In function 'virtual crimson::os::seastore::segment_id_t crimson::os::seastore::SegmentCleaner::allocate_segment(crimson::os::seastore::segment_seq_t, crimson::os::seastore::segment_type_t, crimson::os::seastore::data_category_t, crimson::os::seastore::rewrite_gen_t)', abort(seastore device size setting is too small)

MB Updated by Matan Breizman 10 months ago Actions #5

  • Related to Bug #74700: SeaStore SegmentCleaner::allocate_segment: out of space with JOURNAL sseq(38) MD GEN_INL added

RF Updated by Ronen Friedman 8 months ago · Edited Actions #6

Here is Claude analysis of this issue:

Root Cause: Segment Exhaustion on osd.2 shard 2                                                                                                                                                                

  The failure: SegmentCleaner::allocate_segment aborts with "seastore device size setting is too small" at async_cleaner.cc:1127.                                                                                

  What happened                                                                                                                                                                                                  

  Segment budget for shard 2: 266 segments (50GB device / 64MB segments / 3 shards).                                                                                                                             

  First boot (15:52:47): shard 2 mount opens 7 segments (1 journal + 6 OOL writers: DATA GEN_OOL, DATA GEN3, DATA GEN4, MD GEN_OOL, MD GEN3, MD GEN4) plus ~14 segments from mkfs. The projected_avail_ratio is  
  0.92 (92% free). About 245 segments remain.

  Between boots: The ceph_objectstore_tool test invokes crimson-objectstore-tool ~33 times against osd.2 (list, get-bytes, set-bytes, list-attrs, get-attr, info). Each invocation is a separate process that:   
  1. Reads the shard count from the superblock → starts with --smp 3
  2. Mounts the full seastore on all 3 shards                                                                                                                                                                    
  3. Performs one operation                  
  4. Unmounts                                                                                                                                                                                                    

  Each mount cycle allocates up to 7 new segments per shard (journal + 6 OOL categories). Old segments from previous invocations become closed with stale data, but the SegmentCleaner (GC) never runs — each    
  tool invocation is too short-lived for the background cleaner to kick in.                                                                                                                                      

  ~33 invocations × ~7 segments/invocation = ~231 segments consumed, plus ~21 from first boot = ~252, plus OSD runtime operations during first boot (peering, etc.) consume a few more.                          

  Restart (15:53:58): shard 2 mount finds only 4 empty segments out of 266 (262 closed, projected_avail_ratio=0.015). It manages to open:                                                                        
  - Journal sseq(38) at Seg 0x106 → 3 empty remain
  - DATA GEN_OOL sseq(190) at Seg 0x107 → 2 empty remain                                                                                                                                                         
  - DATA GEN3 sseq(191) → 1 empty remains               
  - DATA GEN4 sseq(192) → 0 empty remain                                                                                                                                                                         
  - MD GEN_OOL sseq(193) → no empty segments → ABORT                                                                                                                                                             

  The alive_ratio is only 0.00008 — virtually all data in the closed segments is dead/stale. GC could theoretically reclaim 99.99% of the space (reclaim_ratio=0.999921), but it needs free segments to copy live
   data into, and there are none. Classic GC death spiral.                                                                                                                                                       

RF Updated by Ronen Friedman 7 months ago Actions #7

  • Pull request ID set to 68474

Fixed - at least partially (there seem to be multiple scenarios that trigger segments exhaustion) by https://github.com/ceph/ceph/pull/68474.
Thus - closing for now (until a new scenario leading to the same observables appears).

UB Updated by Upkeep Bot about 1 month ago Actions #8

  • Released In set to v21.2.0~2062
  • Upkeep Timestamp changed from 2025-09-18T12:36:17+00:00 to 2026-10-24T01:41:13+00:00
Actions

Also available in: PDF Atom