Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcmks-0006g9-2q for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Nov 2020 09:49:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kcmkq-0002jG-Uz for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Nov 2020 09:49:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcmkq-0002iT-Ol for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2020 09:49:28 +0000 Received: from excelsior.roeckx.be ([2a05:7300:0:100::3]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcmko-0008C3-QA for pgsql-bugs@lists.postgresql.org; Wed, 11 Nov 2020 09:49:28 +0000 Received: from intrepid.roeckx.be (localhost [127.0.0.1]) by excelsior.roeckx.be (Postfix) with ESMTP id DFF01A8A01B6; Wed, 11 Nov 2020 09:49:18 +0000 (UTC) Received: by intrepid.roeckx.be (Postfix, from userid 1000) id 865EB1FE0DC9; Wed, 11 Nov 2020 10:49:18 +0100 (CET) Date: Wed, 11 Nov 2020 10:49:18 +0100 From: Kurt Roeckx To: Andres Freund Cc: Tom Lane , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16707: Memory leak Message-ID: <20201111094918.GH391173@roeckx.be> References: <16707-f5df308978a55bf8@postgresql.org> <1999972.1604957673@sss.pgh.pa.us> <20201109220329.GC391173@roeckx.be> <2002012.1604960437@sss.pgh.pa.us> <20201110043127.sfkyvvjqy7x3er5k@alap3.anarazel.de> <20201110081120.GF391173@roeckx.be> <20201110193517.t5hbqkya67gb23rq@alap3.anarazel.de> <20201110195039.GG391173@roeckx.be> <20201110224516.GA568918@roeckx.be> <20201111013808.4cev55uxq32bd6dd@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201111013808.4cev55uxq32bd6dd@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Nov 10, 2020 at 05:38:08PM -0800, Andres Freund wrote: > Hi, > > On 2020-11-10 23:45:16 +0100, Kurt Roeckx wrote: > > On Tue, Nov 10, 2020 at 08:50:39PM +0100, Kurt Roeckx wrote: > > > > There's one known (slow) memory leak in the JIT code / LLVM. Could you > > > > check if the issue vanishes if you disable JIT (jit = 0)? > > > > > > I've just restarted it with jit = 0. > > > > It's been about 3 hours since the restart, and it looks much > > better, it seems to be solved. > > Hm, darn. Any chance you could check if the leak is present if you turn > on jit again, but disable inlining with jit_inline_above_cost=-1? If > that still fixes the leak I think I know the issue / have a reproducer > already... So after about 14 hours, it shows: $ grep kB /proc/32117/status VmPeak: 4412436 kB VmSize: 4389988 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 4261196 kB VmRSS: 4239936 kB RssAnon: 6112 kB RssFile: 7340 kB RssShmem: 4226484 kB VmData: 5412 kB VmStk: 132 kB VmExe: 5388 kB VmLib: 13032 kB VmPTE: 8532 kB VmSwap: 0 kB HugetlbPages: 0 kB The munin graph is also very flat now, so with jit=0, it seems fixed. I've just restarted it with jit=1 jit_inline_above_cost=-1 I will let you know. Kurt