]> cat aescling's git repositories - mastodon.git/commit
Preload libjemalloc.so for long-running Ruby (#16462)
authorAkihiko Odaki <akihiko.odaki@gmail.com>
Mon, 5 Jul 2021 17:16:35 +0000 (02:16 +0900)
committerGitHub <noreply@github.com>
Mon, 5 Jul 2021 17:16:35 +0000 (19:16 +0200)
commit8af7f3b063a9d082b95e087bc7bf6feac7d13631
treec29554faf584ce4d34b0d75b02827ad080f853e0
parent67226acf7e8e91a44dc9599aecb17dcd73a72ea9
Preload libjemalloc.so for long-running Ruby (#16462)

Always mark jemalloc needed if jemalloc is enabled by akihikodaki · Pull Request #4627 · ruby/ruby
https://github.com/ruby/ruby/pull/4627
> Symbols exported by jemalloc is referred by the shared library but not
> by the executables when building Ruby as a shared library with
> jemalloc. It causes shared libraries such as the GNU C++ library
> occasionally rely on the memory allocator provided by the standard C
> library. Worse, the resolved symbols can later be replaced with
> jemalloc, and jemalloc may see pointers from the standard C library,
> which results in various failures.
> e.g. https://github.com/tootsuite/mastodon/issues/15751

As a workaround, do not rely on jemalloc enablement of Ruby, and
preload libjemalloc.so instead.
dist/mastodon-sidekiq.service
dist/mastodon-web.service