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 1lXb1A-0003tc-TB for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Apr 2021 02:49:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lXb17-0003VL-TD for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Apr 2021 02:49:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lXb17-0003T3-87 for pgsql-hackers@lists.postgresql.org; Sat, 17 Apr 2021 02:49:05 +0000 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lXb0z-0002Bm-Nj for pgsql-hackers@postgresql.org; Sat, 17 Apr 2021 02:49:03 +0000 Received: by mail-ot1-x32b.google.com with SMTP id v19-20020a0568300913b029028423b78c2dso18872842ott.8 for ; Fri, 16 Apr 2021 19:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=S3bvdcdpBsUG7/mqFKCSrteFX1wvor101Os/mw1aoV4=; b=o4feeEHaI4GQ8p1DXNqV0IhNbrYrjsxJoxdYEIgmsz7ia3vrGS4zKu6tCZxhh/ilGa AxM6pstETT09iN82SYWq9+TJCFLXidJU40G7pJNFFz3w3U5v/o3gbkXVAMccWrB+P2TH LdhEHPzX0mcPJs7jP702gt6/Zt/UIhG3461MDkSx6EPEe77fdNfpxlsZ9Qt8DGx5BRss 7p3vx8Xl4sP9Taz6nycXMD79+NXlW4brFRun7K7sJklsRme+YUDP9agxQ0SqCydV242Y 8vyU3UJbSXDnI41crgFG/Gv//K8m7HJlll2uxXmxFRdy+TkujZOX0ruxEtUn2LJburyp Dp2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=S3bvdcdpBsUG7/mqFKCSrteFX1wvor101Os/mw1aoV4=; b=qKQIU1gBHAHj3rEshH3xbdUNt6SmDdXDD6GWCWXlRgE2IUoPbekLnptNmyl/nUaCS/ B6RlVpSRQtZimedTOk4wo8e/hs/mu5Hy9DFA6Y3/UeSH9PNOPJ7tK0v0ky3IhzjS8j1b hbkn9NQs7g/8Dxstj/oKWexBXuoSNCokOaRW+4CSRkaaY25fLZm+D2pLCkkazsMEiP7p bjNQN6Ta8ccRxR6chP2TQGwtQffxpWOaUuM58BWcGhr5KnRUeMOzWpk0P4ip7kV4yTRT 5NBguqjp6rZ500xoyZAakazpQgn2O5YGRQeghmmwqW/xGbLxGJdHxX+dvMb2Nz2s/4o/ H95A== X-Gm-Message-State: AOAM532eq/mh5MS1os4jObmSYOeCCvUxDFl6qgwdJznf+BF7l+Vkfa0n bCIPUBJEutZE6Yb6O+wGRs6h4qVsHP1pSA== X-Google-Smtp-Source: ABdhPJyUPOiRrepFZimJt3Xh/1joPwS4YJ+L9CbtVrGs6fVYvjOdcT9+PiHOjaaXHtjfAtzS1XWc1A== X-Received: by 2002:a05:6830:3487:: with SMTP id c7mr6228445otu.35.1618627736755; Fri, 16 Apr 2021 19:48:56 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id x21sm1508822oog.38.2021.04.16.19.48.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Apr 2021 19:48:56 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id B1C3A800BA9; Fri, 16 Apr 2021 21:48:54 -0500 (CDT) Date: Fri, 16 Apr 2021 21:48:54 -0500 From: Justin Pryzby To: Andres Freund Cc: pgsql-hackers@postgresql.org, Tom Lane Subject: Re: terminate called after throwing an instance of 'std::bad_alloc' Message-ID: <20210417024854.GL3315@telsasoft.com> References: <20201001021609.GC8476@telsasoft.com> <20201003220236.GL8476@telsasoft.com> <20201003230149.mtd7fjsjwgii3jv7@alap3.anarazel.de> <20201003233045.GM8476@telsasoft.com> <20201004020127.zbrol2ypu6tg2bei@alap3.anarazel.de> <20201007230242.rnwsbnxywvthef3w@alap3.anarazel.de> <20201218235607.GC30237@telsasoft.com> <20210417021755.xdcqaqqt4y46wzt7@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210417021755.xdcqaqqt4y46wzt7@alap3.anarazel.de> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Apr 16, 2021 at 07:17:55PM -0700, Andres Freund wrote: > Hi, > > On 2020-12-18 17:56:07 -0600, Justin Pryzby wrote: > > I'd be happy to run with a prototype fix for the leak to see if the other issue > > does (not) recur. > > I just posted a prototype fix to https://www.postgresql.org/message-id/20210417021602.7dilihkdc7oblrf7%40alap3.anarazel.de > (just because that was the first thread I re-found). It'd be cool if you > could have a look! This doesn't seem to address the problem triggered by the reproducer at https://www.postgresql.org/message-id/20210331040751.GU4431@telsasoft.com (sorry I didn't CC you) CREATE OR REPLACE FUNCTION cfn() RETURNS void LANGUAGE PLPGSQL AS $$ declare a record; begin FOR a IN SELECT generate_series(1,99) LOOP PERFORM format('select 1'); END LOOP; END $$; $ yes 'SET jit_above_cost=0; SET jit_inline_above_cost=0; SET jit=on; SET client_min_messages=debug; SET log_executor_stats=on; SELECT cfn();' |head -11 |psql 2>&1 |grep 'max resident' -- Justin