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].