Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfxIo-006Qsp-2n for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jan 2026 09:36:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vfxIo-009NfG-0G for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jan 2026 09:36:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfxIn-009Nf8-2N for pgsql-hackers@lists.postgresql.org; Wed, 14 Jan 2026 09:36:34 +0000 Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfxIj-000Ojq-0Q for pgsql-hackers@postgresql.org; Wed, 14 Jan 2026 09:36:33 +0000 Received: from phl-compute-08.internal (phl-compute-08.internal [10.202.2.48]) by mailfhigh.stl.internal (Postfix) with ESMTP id CD1267A00F2; Wed, 14 Jan 2026 04:36:26 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Wed, 14 Jan 2026 04:36:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm1; t=1768383386; x= 1768469786; bh=cjauQNLCce0pnbCsKZAjYzWFvdAyAifBDnkxyD0WXaY=; b=z 6Na6Irp4EsNwG2LFRHRBmPNfqoJnHngPpTywxieAB3ZiOpvnW79NCWNSNazFPnzj wWOVm9R7I7oxHJKyqbd/wt+ZbPxTaVLJGYyzPukASHXGv7gbSJ7Iqa9UMbeVmbsV iOo/q4YCCSb/sMZ5W7tA797qnzvT34LYLztNAgVUDkDpN6bQ7rRn/IXBwTSvnL7V XVYypBTBBSjsNHWI28XXbCuAHk/kErVVGLA0bPYgFQWne33rClf+5ANeHhj1PYNw TqN8tlffx37jzJ+K8BZiCdttvB9hPHnNnox08/JwjRsaV3Sf/v+SCEDRU88C1L2q Wt4qgImzlsagTCe4BnZ4A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1768383386; x=1768469786; bh=c jauQNLCce0pnbCsKZAjYzWFvdAyAifBDnkxyD0WXaY=; b=GAbCcYF+u/w92XH6o qEP/MGSeVyTZo/jWzHorC+VdIrM44/Tcjq+SWO6ru269M5yFlM6No+ETzr1ktnjZ XhBlB5fwDXK0CvDYhItY/gtRLLQ4BITvL4IG1kTyJMId+76NDA7iTPYRS8D/1/Gn nIe1plt8xO2cHsw8eGSiXXjaMdqEF7ycHi7FleVNPRcXcp7M3KEWUPN6eSXY6WCU mUjmoxJ2mOSQcsTxKrTVj1d3iTo3/emB5zELNFVDTWXpG2Xn7Tpx4KYLZqZYhHT5 YgGUEHbJiHP1n4Vk8OlEFaMypJRPMKgR8ycuNTf/VXwxdg0vKfxjW2iFWmy8zHs6 M3WvA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduvddvkeegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeetuedvheffkeevgfeuheevteevkefggedttdeufeeuheduuddthfef fffhjeefffenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv sehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopegrnhgurhgvshesrghnrghrrgiivghlrdguvgdprhgtphhtthho pegrmhhithhlrghnghhothgvtdelsehgmhgrihhlrdgtohhmpdhrtghpthhtoheprhgrhh hilhgrshihvgguledtsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgr tghkvghrshesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Jan 2026 04:36:26 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1768383384; bh=GQIY2vYX733aWD/crl/qqh6M3CPlt7jwvW7lCBksu10=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=OQiRtTRCT+6bnDMDIW7A1fngf7ymN2E1mIVzPOmDsVhugwq2mcRWmOMnqbbhg2kah d/vCE1L8hAooQdMbZEK3/W9j4dVnJMXP59+0RzuKc0zDs+Lv9KqnY3CgbATda2axg9 JSsyfT9RbLFHqHxdHeezogEjKGroYFWCTGBzmNtj+BvZfgt9h320GqvTTTNSqRo9F7 ie6k3xejZcnauRYkpliOKpdgsGGX+j2L/EAVXH4cdM8RnFuPt1vEGnI4IYNRzl3y5l Zn/N+LaFb/RDtb2S+kVGKx31kwV2ESKkJijYaWixZBoCTq0335RnthA5mbySnP459d SX5oEN0Gxx5NQ== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id E9B5A7A; Wed, 14 Jan 2026 10:36:24 +0100 (CET) Date: Wed, 14 Jan 2026 10:36:24 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Amit Langote Cc: Rahila Syed , Andres Freund , PostgreSQL-development Subject: Re: Segmentation fault on proc exit after dshash_find_or_insert Message-ID: <202601140928.sbxjiuhq5ae6@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Dec-18, Amit Langote wrote: > Thanks. Updated the commit message too to be more accurate in the > attached updated patch. Looks good to me. I would add an Assert(num_held_lwlocks == 0) at the end of LWLockReleaseAll(), to make it clear that it's idempotent (which is important for the case where ProcKill will call it again shortly after). Are you going to push this soon? Looking at ProcKill, I notice that we do some LWLock ops after its LWLockReleaseAll() call, which seems a bit silly. Why not do that right after the "if (MyProc->lockGroupLeader != NULL)" block instead? Nothing uses LWLocks from there on. This can be a separate commit. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/