Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.15.0
Description
ARM images are not using jemalloc because LD_PRELOAD is hardcoded to use an x64 path, causing this error:
ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libjemalloc.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Right now docker-entrypoint is using this:
maybe_enable_jemalloc() { if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so fi }
I propose we use this instead:
maybe_enable_jemalloc() { if [ "${DISABLE_JEMALLOC:-false}" == "false" ]; then # Maybe use export LD_PRELOAD=$LD_PRELOAD:/usr/lib/$(uname -i)-linux-gnu/libjemalloc.so if [[ `uname -i` == 'aarch64' ]]; then export LD_PRELOAD=$LD_PRELOAD:/usr/lib/aarch64-linux-gnu/libjemalloc.so else export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libjemalloc.so fi fi }
Attachments
Issue Links
- links to