From e9854d8bdc0512e03c854f4c8b15e781daef21d4 Mon Sep 17 00:00:00 2001
From: Clark Boylan <clark.boylan@gmail.com>
Date: Mon, 4 May 2020 16:31:36 -0700
Subject: [PATCH] Stop using jemalloc in python base image

Initial testing seems to show that jemalloc is a probable source of our
memory leaks with zuul-scheduler and zuul-web under python3.7 and
python3.8. While this was desireable under python3.5 with zuul-executor
it doesn't seem like we want to enable this universally. For this reason
remove jemalloc from the base image. It can be added into images in
specific places if desireable but isn't a good default.

Change-Id: I671eef4ef27fdde161b52cf0a4187fac10ac8c4e
---
 docker/python-base/Dockerfile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/docker/python-base/Dockerfile b/docker/python-base/Dockerfile
index 96d1801f34..84dc995bb5 100644
--- a/docker/python-base/Dockerfile
+++ b/docker/python-base/Dockerfile
@@ -19,7 +19,7 @@ FROM docker.io/library/python:${PYTHON_VERSION}-slim
 RUN echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/95disable-recommends
 
 RUN apt-get update \
-  && apt-get install -y dumb-init libjemalloc2 \
+  && apt-get install -y dumb-init \
   && apt-get clean \
   && rm -rf /var/lib/apt/lists/*
 
@@ -30,5 +30,4 @@ RUN pip install -U pip
 # Undo debian changes to openssl.cnf that are too aggressive
 COPY openssl.cnf /etc/ssl/openssl.cnf
 
-ENV LD_PRELOAD /usr/lib/x86_64-linux-gnu/libjemalloc.so.2
 ENTRYPOINT ["/usr/bin/dumb-init", "--"]