]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/ceph_context.h: Jenkins builder fix: breakpad reserve space 64829/head
authorAdam Kupczyk <akupczyk@ibm.com>
Tue, 5 Aug 2025 09:28:48 +0000 (09:28 +0000)
committerAdam Kupczyk <akupczyk@ibm.com>
Tue, 5 Aug 2025 12:43:42 +0000 (12:43 +0000)
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 <akupczyk@ibm.com>
src/common/ceph_context.h

index 2eb0f8025b7628cfb3ceb2ba05c870748982b9ff..2ee488b56f2ea76f0a66abf3050fe3402236256d 100644 (file)
@@ -151,6 +151,10 @@ public:
   ceph::logging::Log *_log;
 #ifdef HAVE_BREAKPAD
   std::unique_ptr<google_breakpad::ExceptionHandler> _ex_handler;
+  static_assert(sizeof(std::unique_ptr<google_breakpad::ExceptionHandler>) == sizeof(std::unique_ptr<char>));
+#else
+  // Reserve the space for the case when part of ceph is compiled with and other without HAVE_BREAKPAD
+  [[maybe_unused]] std::unique_ptr<char> _ex_handler;
 #endif
 
   /* init ceph::crypto */