From: Kefu Chai Date: Mon, 24 May 2021 09:45:53 +0000 (+0800) Subject: ceph.in: add $CEPH_PRELOAD_LIBCXX to LD_PRELOAD if specified X-Git-Tag: v17.1.0~1849^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F41498%2Fhead;p=ceph.git ceph.in: add $CEPH_PRELOAD_LIBCXX to LD_PRELOAD if specified so use can start the vstart cluster like: CEPH_PRELOAD_LIBCXX=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 MDS=0 MGR=1 OSD=3 MON=1 ../src/vstart.sh -n -x as a workaround of https://github.com/google/sanitizers/issues/934 Fixes: https://tracker.ceph.com/issues/50948 Signed-off-by: Kefu Chai --- diff --git a/src/ceph.in b/src/ceph.in index d561849e7b3..85e3760fe5d 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -83,6 +83,9 @@ def respawn_in_path(lib_path, pybind_path, pythonlib_path, asan_lib_path): lib_path_var = "LD_LIBRARY_PATH" ld_paths_changed = 0 + preload_libcxx = os.environ.get('CEPH_PRELOAD_LIBCXX') + if preload_libcxx: + ld_paths_changed += add_to_ld_path('LD_PRELOAD', preload_libcxx) if asan_lib_path: ld_paths_changed += add_to_ld_path('LD_PRELOAD', asan_lib_path) ld_paths_changed += add_to_ld_path(lib_path_var, lib_path)