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 1w2bpU-000RKd-07 for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Mar 2026 21:19:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2bpS-005RXG-38 for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Mar 2026 21:19:54 +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 1w2bpS-005RX7-2G for pgsql-hackers@lists.postgresql.org; Tue, 17 Mar 2026 21:19:54 +0000 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w2bpQ-00000000gaV-05s7 for pgsql-hackers@lists.postgresql.org; Tue, 17 Mar 2026 21:19:54 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id CEDA0EC01ED; Tue, 17 Mar 2026 17:19:50 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Tue, 17 Mar 2026 17:19:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1773782390; x=1773868790; bh=Ch3EIuNCYi +3prKpE+CzT0c6jEr1/caImhPJmg6I7fM=; b=GKZ4E4jTSqKNalyqDScx+Xe+Tr vosmoV1pUXCcYkwmQgNlG/hOM+jrSg9N5hL5LGuy7HsSFeCBLPCOZX5HLzJg6Pgn fDIKnqVasSN4AsP5qVAkKPSNDbSj6slrx43rlYGRSjsX8fjudgq6GxImQ8spHlty KnOwlxoIhGGV1+USApCFTVNR2AzslJm90/qn7WGHbNbzVNapb/1f3wglqQ6lzpiy wOQrLcgMJNnN56hZ/+ZuoqP6Ds/bvYhbrqdxemNAVfuRHPX0C+0kwTU4QVifmVxH hqvRzZzSpAfS6WOA4cVERrhg649AyS/lq4i/41ylR5UIL+AtuLsJLFO0Kgug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1773782390; x=1773868790; bh=Ch3EIuNCYi+3prKpE+CzT0c6jEr1/caImhP Jmg6I7fM=; b=AVBEAsum8Y+ZifbzYRgpLnsfTEdBUJ5qTsR5ADmQ0ZP/MLB946J OMQsmVoF2X5121bfamL2Rj7jJwzCOeuuh7Kb1Zq8SohQCzIixfiPY/7DksRHf6kc NsneSf1FuaQc1jKes/JQmygtv1fe9w3tNUsOkluhs4gz7w6WabuveKUulUVmyeCl WCWnpFDnWZtT1paso5LVqLnh/6Wzu0td7724FB31XHj70Tkj7GV7Zu2911b9ni4V 6VJIu0jg5zH51JUXqm8cn+1lRVJktHFLdeq3E3nS6c3z/t8GECyUswEKIoBlnqYA T7ghKAnfn99B5NQmM/gMDbLguh12R8ERV8w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdeftddvfedvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggujgesthdtsfdttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepfeffgfelvdffgedtveelgfdtgefghfdvkefggeetieevjeekteduleevjefh ueegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hnughrvghssegrnhgrrhgriigvlhdruggvpdhnsggprhgtphhtthhopeegpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehpmhgtsegtihhthihlihhnkhdrughinhhovgigrd hsuhgsrdhorhhgpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdr phhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepthhglhesshhsshdrphhghhdrph grrdhushdprhgtphhtthhopehtohhmrghssehvohhnughrrgdrmhgv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 17 Mar 2026 17:19:49 -0400 (EDT) Date: Tue, 17 Mar 2026 17:19:49 -0400 From: Andres Freund To: Tom Lane Cc: Peter 'PMc' Much , Tomas Vondra , pgsql-hackers@lists.postgresql.org Subject: Re: Need help debugging SIGBUS crashes Message-ID: References: <33d99d2f-4020-4615-9314-2f1a19927fa6@vondra.me> <392255.1773756727@sss.pgh.pa.us> <565361.1773781008@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <565361.1773781008@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2026-03-17 16:56:48 -0400, Tom Lane wrote: > "Peter 'PMc' Much" writes: > > On Tue, Mar 17, 2026 at 10:12:07AM -0400, Tom Lane wrote: > > ! Why it was okay in older FreeBSD and not so much in v14, who knows? > > > Maybe it wasn't. Here it appeared out of thin air in February, while > > the system was upgraded from 13.5 to 14.3 in July'25, and did run > > without problems for these eight months. > > So this is not directly or solely related to FBSD R.14, and while it > > happens more likely during massive memory use, but this also is not > > stingent. Neither did I find any other solid determining condition. > > Yeah, it seems likely that there is some additional triggering > condition that we don't understand; otherwise there would be more > people complaining than just you. One issue we've seen in the past (on some other BSD, I think NetBSD?) is signal handlers used a C function in a shared library, the function was never used before the signal handler, and that dynamic symbol resolution allocated memory. Which then contributed to deadlocks and/or corruption of alloctor metadata. You could check if that's a factor by exporting LD_BIND_NOW. The way the signal handling worked before 16 should not really lead to corrupt allocator datastructures, as the signal handler is only allowed to run in a period in which the normal execution is suspended (or only calls async signal safe code, e.g. after waking up, until reaching the sigmask calls to block the signal again). ISTM, there either needed to be another signal handler that allocated memory that was interrupted by SIGUSR1 or that postmaster allocated memory while the signal was unmasked. The dynamic linker doing function resolution could be an explanation. Greetings, Andres Freund