Comment 4 for bug 2016845

Revision history for this message
Dan Hill (hillpd) wrote :

The Ceph CMake files are a bit of a tangled mess. The tcmalloc library was originally linked through an `${ALLOC_LIBS}` definition that was directly added to individual daemon / utility targets. Nautilus reworked how these libraries were linked by refactoring everything into bundles of common libraries [0].

As a result, ceph-osd links the tcmalloc library through several layers of CMake library dependencies:
> `ceph-osd` adds the `os` set of libraries
-> `os` adds the `heap_profiler` set of libraries
--> `heap_profiler` adds the `gperftools::tcmalloc` library

The core issue is that the `heap_profiler` definition removes tcmalloc when `WITH_SEASTAR` is defined [1]. Ubuntu packaging has been built `WITH_SEASTAR=ON` since 16.2.4-0ubuntu1 [2].

More recently, upstream also broke tcmalloc while enabling seastar. They have proposed a solution that switches back to linking individual targets with `${ALLOC_LIBS}` [3]. This fix has been merged into master, with backports to quincy and pacific in progress [4].

[0] https://github.com/ceph/ceph/pull/22990/commits/2e012870315e5a08e90c27f14666e8518b94caef
[1] https://github.com/ceph/ceph/commit/028159ef6ea0f43c4eaf2314d7d73f92bbc5bd99
[2] https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1928645
[3] https://github.com/ceph/ceph/pull/46103/commits/1e3d2b53cfeeff4bac2f384c6445b65eb9e8396f
[4] https://tracker.ceph.com/issues/55519