From 39af0bc23b3ae2063f8e846b0ff522bafa0f5c27 Mon Sep 17 00:00:00 2001 From: Adam Kupczyk Date: Tue, 5 Aug 2025 09:28:48 +0000 Subject: [PATCH] common/ceph_context.h: Jenkins builder fix: breakpad reserve space For cases when HAVE_BREAKPAD is off, supply exactly the same space in CephContext struct. While it should happen, jenkins seems to link binaries with different variants. The noticeable artefacts of this misbehaviour are: 208 - unittest_bluefs (Bus error) 209 - unittest_bluefs_ex (Failed) 211 - unittest_bdev (Bus error) Above mentioned unittests are failing because ceph_context.h : ceph::PluginRegistry *get_plugin_registry() { return _plugin_registry; } ^ _plugin_registry returned is at !!!offset off by 8 bytes!!! to the location of _plugin_registry as constructed at ceph_context.cc : 743: _plugin_registry = new PluginRegistry(this); This causes fatal error in src/extblkdev/ExtBlkDevPlugin.cc : 227 auto registry = cct->get_plugin_registry(); 228 std::lock_guard l(registry->lock); Sometimes lock_guard hangs, sometimes lock_guard segfaults. Signed-off-by: Adam Kupczyk --- src/common/ceph_context.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/ceph_context.h b/src/common/ceph_context.h index 2eb0f8025b7..2ee488b56f2 100644 --- a/src/common/ceph_context.h +++ b/src/common/ceph_context.h @@ -151,6 +151,10 @@ public: ceph::logging::Log *_log; #ifdef HAVE_BREAKPAD std::unique_ptr _ex_handler; + static_assert(sizeof(std::unique_ptr) == sizeof(std::unique_ptr)); +#else + // Reserve the space for the case when part of ceph is compiled with and other without HAVE_BREAKPAD + [[maybe_unused]] std::unique_ptr _ex_handler; #endif /* init ceph::crypto */ -- 2.39.5