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 1obrxN-0002Se-Ph for pgsql-bugs@arkaria.postgresql.org; Fri, 23 Sep 2022 23:19:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1obrxM-0004nK-76 for pgsql-bugs@arkaria.postgresql.org; Fri, 23 Sep 2022 23:19:40 +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 1obrxL-0004nB-VB for pgsql-bugs@lists.postgresql.org; Fri, 23 Sep 2022 23:19:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1obrxH-0004sk-0j for pgsql-bugs@lists.postgresql.org; Fri, 23 Sep 2022 23:19:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 28NNJXCt2169850; Fri, 23 Sep 2022 19:19:33 -0400 From: Tom Lane To: Thomas Munro cc: Dmitry Astapov , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17619: AllocSizeIsValid violation in parallel hash join In-reply-to: References: <17619-0de62ceda812b8b5@postgresql.org> Comments: In-reply-to Thomas Munro message dated "Sat, 24 Sep 2022 11:00:00 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2169848.1663975173.1@sss.pgh.pa.us> Date: Fri, 23 Sep 2022 19:19:33 -0400 Message-ID: <2169849.1663975173@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro writes: > While testing with that module I found another bug: the > per-participant npages counter was not explicitly initialised to zero > in sts_initialize(). That wasn't exactly a problem when the code was > written because new DSM memory is always zeroed and this always > happens in new DSM memory, but it shows up in this test module because > it uses palloc() memory instead. It *is* a problem since v14, if you > use min_dynamic_shared_memory for a pool of recyclable shared memory, > because then it is not zeroed. That's a fairly scary observation. What other places are silently expecting such memory to be zeroed? Do we need to fix things so that min_dynamic_shared_memory doesn't break this API? regards, tom lane