Project

General

Profile

Actions

Bug #82052

closed
DG YL

build: librgw_lancedb.a linked into every RGW binary causes OOM during deb package builds

Bug #82052: build: librgw_lancedb.a linked into every RGW binary causes OOM during deb package builds

Added by David Galloway about 1 month ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Urgent
Category:
build
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Tags (freeform):
Fixed In:
v21.3.0-4924-gc3a0c6f194
Released In:
Upkeep Timestamp:
2026-10-28T00:46:35+00:00

Description

Since mid-October, the jammy and noble x86_64 deb builds in ceph-dev-pipeline keep failing with make-debs returned non-zero exit status 137. The cause is a host-wide OOM on the 251 GiB builders (soko, adami) during the final link phase. It affects main and unrelated wip branches (e.g. ceph-dev-pipeline 10151, 10157, 10160, 10163, 10178).

What happens

src/rgw/CMakeLists.txt links the Rust static library librgw_lancedb.a (lance, arrow, datafusion) into rgw_common as PUBLIC and forces it in with LINKER:--undefined=rgw_sal_wrapper_version. That has two effects:

  • Every executable or library that links rgw_common/rgw_common_standalone carries the archive. That is about 45 targets in a package build: radosgw, radosgw-admin, rgw-standalone*, librgw, and many rgw tests/benches.
  • Because of add_dependencies(rgw_common rgw-lancedb), all of those links wait for the cargo build (7–20 min). When it finishes, make starts them all at once. With Ubuntu's default -flto=auto, each LTO link also spawns one ltrans worker per CPU.

At the OOM, the kernel log shows 20–30 concurrent ld processes and hundreds of lto1-ltrans/lto1-wpa-stream workers. The RGW targets are what's linking.

Data (node_exporter, peak memory used during the build stage, jammy/noble x86_64 default, soko/adami)

late Aug – 09-17 09-18 – 10-20 10-22 / 10-23
jammy median / p90 136 / ~160 GiB ~175 / ~220 GiB ~230 / ~245 GiB
noble median / p90 ~122 / ~134 GiB ~125 / ~137 GiB ~240 / ~248 GiB
  • The jammy step lines up exactly with the first main build that compiled lancedb (d2a865b, the day after the s3vectors merge, PR 66066).
  • noble crossed the line around 10-21. The peak varies a lot between runs of the same sha (136 → 233 GiB), depending on how many RGW links are released together. The vector-bucket branch (PR 72180) peaked at 234–242 GiB on noble before it merged.
  • The kernel OOM-kill counter on these builders was zero from 08-24 to 10-16, apart from two isolated events.

Suggested fix

Link rgw_lancedb only into the targets that serve s3vectors, not PUBLIC on rgw_common. That removes both the per-link weight and the synchronized link burst. If that isn't practical, a build-side workaround is to cap LTO parallelism for deb builds (e.g. -flto=8 in debian/rules) or lower the job count in make-debs.sh.


Related issues 2 (1 open — 1 closed)

Blocks Ceph QA - QA Run #82053: wip-yuri16-testing-20261130.200516-main (wip-yuri16-testing-20261118.152653-main, wip-yuri16-testing-20261117.175722-main, wip-yuri16-testing-20261111.204903-main, wip-yuri16-testing-20261026.172747-main, wip-yuri16-testing-20261023.202320-main)QA Needs ApprovalJesse Williamson

Actions
Blocks Ceph QA - QA Run #81975: wip-yuri10-testing-20261026.172809-main (wip-yuri10-testing-20261022.145333-main, wip-yuri10-testing-20261021.221632-main)QA ClosedYuri Weinstein

Actions

SB Updated by Sepia Bot about 1 month ago Actions #1

  • Assignee set to Yuval Lifshitz
  • Priority changed from Normal to Urgent

YW Updated by Yuri Weinstein about 1 month ago Actions #2

  • Blocks QA Run #82053: wip-yuri16-testing-20261130.200516-main (wip-yuri16-testing-20261118.152653-main, wip-yuri16-testing-20261117.175722-main, wip-yuri16-testing-20261111.204903-main, wip-yuri16-testing-20261026.172747-main, wip-yuri16-testing-20261023.202320-main) added

YW Updated by Yuri Weinstein about 1 month ago Actions #3

  • Blocks QA Run #81975: wip-yuri10-testing-20261026.172809-main (wip-yuri10-testing-20261022.145333-main, wip-yuri10-testing-20261021.221632-main) added

KC Updated by Kefu Chai about 1 month ago Actions #4

created https://github.com/ceph/ceph/pull/73067 to address. Yuval, sorry for hijacking this change. i created the PR before seeing this tracker ticket.

MH Updated by Matthew Heler about 1 month ago Actions #5

  • Status changed from New to Fix Under Review
  • Pull request ID set to 73088

MH Updated by Matthew Heler about 1 month ago Actions #6

There are a few candidate solutions here.

I did some digging, and the Noble and Jammy builds started failing in https://github.com/ceph/ceph/pull/72180 , I believe this is due to the fact the RadosVectorBucket became a subclass of RadosBucket with an inline destructor. Every rgw file that deletes a Bucket gets a copy of that destructor, and each copy needs RadosStore, so even the small rgw test and tool binaries now link most of rgw_common. That makes every rgw link heavier, and the debs are the ones that tip over. Before that merge, jammy and noble passed every time on the 264 GiB builders, and since then they mostly fail, while the rpm builds still pass on the same builders. Defining the destructor out of line, like RadosBucket's, should fix it,

https://github.com/ceph/ceph/pull/73088 was tested and merged which resolves this immediate issue.

MH Updated by Matthew Heler about 1 month ago Actions #7

  • Status changed from Fix Under Review to Resolved

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

  • Merge Commit set to c3a0c6f194110f5f51f817a782085f03fb68e969
  • Fixed In set to v21.3.0-4924-gc3a0c6f194
  • Upkeep Timestamp set to 2026-10-28T00:46:35+00:00
Actions

Also available in: PDF Atom