]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
build, crimson/osd: do not let Seastar to interfere with ELF's program headers. 45393/head
authorRadosław Zarzyński <rzarzyns@redhat.com>
Tue, 15 Mar 2022 14:33:41 +0000 (15:33 +0100)
committerRadosław Zarzyński <rzarzyns@redhat.com>
Wed, 23 Mar 2022 21:10:45 +0000 (22:10 +0100)
For the sake of avoiding locking on the `__cxa_throw` paths, Seastar
hijacks `dl_iterate_phdr` of the dynamic linker. Unfortunately, this
has a nasty side effect: it makes impossible to catch an exception in
in a plugin (a DSO loaded via the `dlopen()` machinery).

For mote details please consult:
  * https://gist.github.com/rzarzynski/3abe9ed6b50cfa1893d34988e1628bfc,
  * `seastar/src/core/exception_hacks.cc`.

This patch deals with the problem by simply disabling the problematic
workaround which could be iatrogenic too. If that would be the case,
we can consider:

  * preloading all our Ceph Classes before reaching `smp::configure()`,
  * statically linking them.

Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
src/CMakeLists.txt

index ebc3cd658a17ed965027417b88a463ed48c9f4f7..3df96d9b84d54b3d2e7b4d3556e406489c1e2f3c 100644 (file)
@@ -369,6 +369,7 @@ if(WITH_SEASTAR)
     endif()
   endif()
   list(APPEND Seastar_CXX_FLAGS
+    "-DSEASTAR_NO_EXCEPTION_HACK"
     "-Wno-error"
     "-Wno-sign-compare"
     "-Wno-attributes"