Skip to content

Commit 39af0bc

Browse files
committed
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 <[email protected]>
1 parent 022179f commit 39af0bc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/common/ceph_context.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ class CephContext {
151151
ceph::logging::Log *_log;
152152
#ifdef HAVE_BREAKPAD
153153
std::unique_ptr<google_breakpad::ExceptionHandler> _ex_handler;
154+
static_assert(sizeof(std::unique_ptr<google_breakpad::ExceptionHandler>) == sizeof(std::unique_ptr<char>));
155+
#else
156+
// Reserve the space for the case when part of ceph is compiled with and other without HAVE_BREAKPAD
157+
[[maybe_unused]] std::unique_ptr<char> _ex_handler;
154158
#endif
155159

156160
/* init ceph::crypto */

0 commit comments

Comments
 (0)