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.94.2) (envelope-from ) id 1qjuWV-00CZ7j-LB for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Sep 2023 04:45:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qjuVU-00A0dC-Ee for pgsql-bugs@arkaria.postgresql.org; Sat, 23 Sep 2023 04:44:40 +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.94.2) (envelope-from ) id 1qjuVS-00A0cP-Oj for pgsql-bugs@lists.postgresql.org; Sat, 23 Sep 2023 04:44:40 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qjuVJ-0073Cp-Cx for pgsql-bugs@lists.postgresql.org; Sat, 23 Sep 2023 04:44:37 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id C26F95C011D; Sat, 23 Sep 2023 00:44:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 23 Sep 2023 00:44:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1695444266; x=1695530666; bh=MN /zdyEnZZAtWBspNzpHE80/W3oe7mpSkfj5YNZkw5Q=; b=k4Y3IZ8lgpJvp3UWED 7uGeVl4LjZ3Lk6fTUzLzE075q0piPAqTHpTeaajSkan7v1NnDc+GAD3BYWCkxKpm CLyNuXj2rSZqojK38qmabpPej22QhkNu7UZW2N8RIXf3UEFyGz6MegR7Rt77XWsg j4bpS2nvaUg1MSrJyldM3FTL1rJ9UY/cKfWqt6Omq+QZW5Gpx58uFsDpQgKZmvfU Z1/oL6hllb2my5JHxDlfqR++5jaN/gJMQAaIiknGJbSbqFBSUbMYC6VIxxTatUgh 8B++YcQ45ChaSmDZG7QZ+ABEsxFoOm+2LjO5wvsxgsh0DeRVyQduVH93kH44Cv5w 44BQ== 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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1695444266; x=1695530666; bh=MN/zdyEnZZAtW BspNzpHE80/W3oe7mpSkfj5YNZkw5Q=; b=o04481h+eLiHMDaMFyYKh+zzRnaM2 Y76pfeTnWZ88ZioJs6rr5o3/ODfUftTuqfMFDI4zJhi/AD8Oi7bGERZjsPZJFOLq E3bFKAyil83nJsR5m2cobOJtzr2xDqP7+zHvrNdLwZSeNPDWPx/yO5vcZ23GBwAJ TT5fp3qvoFfgG9i5DL0d9OrovKTUsj+O2vhYZ9RB5N9dHC+k2xVucOvwPHdDSt2X FB9VF3BAqqXXYE0iPVILrLm+8xd9fg8yR6gwd+h1CHw7kErDU2/+STz0DpeiLV4l aMEiSIyVTWyILV27LUYk4qeB2j0z/td3slzriH473q2KrbSNWdpNcjwTg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekledgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepgeffjeevgfevuddvjedtvddt ieejheduueelvddufedtgfefjedvkeevkeeivddvnecuffhomhgrihhnpehpohhsthhgrh gvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 23 Sep 2023 00:44:23 -0400 (EDT) Date: Sat, 23 Sep 2023 13:44:18 +0900 From: Michael Paquier To: Thomas Munro Cc: Alexander Lakhin , Sergei Kornilov , Noah Misch , Tom Lane , Kyotaro Horiguchi , pgsql-bugs@lists.postgresql.org, Fujii Masao Subject: Re: BUG #17928: Standby fails to decode WAL on termination of primary Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1QoWGjMKRv5S/hdJ" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --1QoWGjMKRv5S/hdJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Sep 23, 2023 at 02:02:02PM +1200, Thomas Munro wrote: > Hmm, copperhead (riscv) showed an unusual failure, a segfault in > suspiciously nearby code. I don't immediately know what that's about, > let's see if we get more clues... Yep, something is going on with the prefetching code: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=copperhead&dt=2023-09-22%2023%3A16%3A33 Using host libthread_db library "/lib/riscv64-linux-gnu/libthread_db.so.1". Core was generated by `postgres: paris: startup recovering 000000030000000000000003 '. Program terminated with signal SIGSEGV, Segmentation fault. #0 pg_comp_crc32c_sb8 (crc=1613114916, crc@entry=4294967295, data=data@entry=0x2af9e00d48, len=) at pg_crc32c_sb8.c:56 56 uint32 a = *p4++ ^ crc; #0 pg_comp_crc32c_sb8 (crc=1613114916, crc@entry=4294967295, data=data@entry=0x2af9e00d48, len=) at pg_crc32c_sb8.c:56 #1 0x0000002ad59a1536 in ValidXLogRecord (state=0x2af9db1fc0, record=0x2af9e00d30, recptr=50520048) at xlogreader.c:1195 #2 0x0000002ad59a285a in XLogDecodeNextRecord (state=state@entry=0x2af9db1fc0, nonblocking=) at xlogreader.c:842 #3 0x0000002ad59a28c0 in XLogReadAhead (state=0x2af9db1fc0, nonblocking=nonblocking@entry=false) at xlogreader.c:969 #4 0x0000002ad59a0996 in XLogPrefetcherNextBlock (pgsr_private=184580836680, lsn=0x2af9e14618) at xlogprefetcher.c:496 #5 0x0000002ad59a11c8 in lrq_prefetch (lrq=) at xlogprefetcher.c:256 #6 lrq_complete_lsn (lsn=, lrq=0x2af9e145c8) at xlogprefetcher.c:294 #7 XLogPrefetcherReadRecord (prefetcher=prefetcher@entry=0x2af9e00d48, errmsg=errmsg@entry=0x3fec9a2bf0) at xlogprefetcher.c:1041 The stack may point out at a different issue, but perhaps this is a matter where we're returning now XLREAD_SUCCESS where previously we had XLREAD_FAIL, causing this code to fail thinking that the block was valid while it's not? -- Michael --1QoWGjMKRv5S/hdJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmUObSIACgkQnvQgOdby QH3M9Q//eqX4Rc4sM/NJG/vT55R/qBWTSQrFl5ohI0dANzlT8TGAQecnIHPf2oag QsYkzQ1mbxpsfesACd0aEim3gMoRjyeT0HTWv6q0FkEBNAspuBYOaWY2sDtfilqb Oed4q6tJwXsDo1d0Fp8cdOWObxU0ujymUjZzGHdEXgdB0zOIBTzNPKioUNseCHV9 MNj8ggUZsPU1XT6S4bbflfyCdJXHD/0UAbPgY/q+CWn0SoKcsiUT4zg1bLtfVObx oYiDZSBEfVClSRcJ3Es1A9GVMEVXnH/2jgLPL34ij1jF4IiKoVXeeCsZdO3qfc7b ZeaRtiZf9QBNpyu9x2LVEL6KA+8T/n3T2YAGSIiFt1z38Ci+m8l+jaGcOlNIMqYg +UJ9yulzJyjCl4rXF3cjxTjbm8/pU9Y4MU1sFlTjg2KD9VPNITctlbQ01jLzxV7M Vs8k+duxAPKQyZFZVJe0jOEugkML/tSZoOrxV4BA79SUkfHQV60dEqkVxx+V8YFS 5gdTzOybp6PcN52bbiqSC6LLrQLhHQWcDpSHiDoGgU4fT0dOrbKJFiTS8+6hrkRl /8Ziy7BKqXSwXBGF9pguOhz1Hm6AYYS9x3bXKIphInsYLCtYrGq8Cc+H936XFfaa pBzskNCxPoQJhGOZok2bjaeQZym8+CpNV7v3fcFIwSvY6Zoth9g= =aSkc -----END PGP SIGNATURE----- --1QoWGjMKRv5S/hdJ--