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 1soZb2-00CEmm-D2 for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Sep 2024 02:30:13 +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 1soZb1-00D2TA-RH for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Sep 2024 02:30:11 +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 1soZb1-00D2T2-EB for pgsql-bugs@lists.postgresql.org; Thu, 12 Sep 2024 02:30:11 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1soZax-000k4w-FK for pgsql-bugs@lists.postgresql.org; Thu, 12 Sep 2024 02:30:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1726108207; bh=xTAl2yFQwcXvVi7aSswlB/FGJpOihcqp0t3Sk6MX4Dw=; h=Message-ID:Date:User-Agent:From:Subject:To:References:In-Reply-To: From; b=tLx43+ippy1cyeUBQa0hRBiFXuUJPJXXetbvYhqwWDb/xgxIx4AVM1uNMxpphfJq2 aYrXi6p/sGHCgMuNmOEUKdi+UNomBTuApJCMBWhGOW5wb3P+RIU9rUt8Vlq2uLiZHY rbMAUNsUy0IAVHWLQEGLiNQv1d1shlTZTj6NaP1Fox2AyxBo3nrha6Dm4Hsp8F32bG SB5yv7Msx7tjdN5CBLJRpwkgaDPGGgeaCogBjn0HDgqR/y59ngE7JUIZ82E23ZlDHa CbZmDacQCE3IDEL2t2u2XjuNH4j7liuzV/G2BDAstzxJG0+lcTgfCU3uNlvrh9dAx1 jwuNAFG2CafNg== Received: from [172.30.32.230] (unknown [172.30.32.230]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: a.kozhemyakin@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 4D01760CBF; Thu, 12 Sep 2024 05:30:07 +0300 (MSK) Content-Type: multipart/alternative; boundary="------------rTIxH1y0EjiCo40nu96mHOSF" Message-ID: <9e0a13b4-2402-4df0-a515-47153119e80c@postgrespro.ru> Date: Thu, 12 Sep 2024 09:30:06 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: "a.kozhemyakin" Subject: Re: BUG #18610: llvm error: __aarch64_swp4_acq_rel which could not be resolved To: Thomas Munro , pgsql-bugs@lists.postgresql.org References: <18610-37bf303f904fede3@postgresql.org> Content-Language: ru In-Reply-To: X-KSMG-AntiPhishing: NotDetected, bases: 2024/09/12 02:04:00 X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.0.7854, bases: 2024/09/12 01:29:00 #26557038 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: not scanned, disabled by settings X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------rTIxH1y0EjiCo40nu96mHOSF Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Thank you, the error no longer occurs after adding -mno-outline-atomics or -march=armv8.1-a I installed packages on debian-12 (arm64) from https://apt.postgresql.org/pub/repos/apt, the error is repeated. 11.09.2024 16:55, Thomas Munro пишет: > Hmm, I think it is inlining spinlock code from > pg_last_wal_receive_lsn()'s call to GetWalRcvFlushRecPtr(), and then > failing to find fallbacks for pre-ARMv8.1 systems that didn't have the > LSE atomic instructions. I wonder if there could be some mismatch in > the default -march for parts of your toolchain, so that it doesn't > link the library that has that stuff, but then the clang that built > walreceiverfuncs.bc expects it to be found. I wonder if it goes away > if you add "-mno-outline-atomics" or "-march=armv8.1-a" or > "-march=armv8-a+lse" to BITCODE_CXXFLAGS (not saying that's a fix, > just trying to understand what's happening...). Assuming you're using > GCC, maybe "gcc -Q --help=target | grep march" could show what Ubuntu > 24 has set as the baseline, and "clang -### -c -x c /dev/null" might > show what clang is selecting... just ideas, I'm not sure, I don't have > such a system, I just noticed a few distros cranking up the baseline > instruction sets recently... --------------rTIxH1y0EjiCo40nu96mHOSF Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Thank you, the error no longer occurs after adding -mno-outline-atomics or -march=armv8.1-a

I installed packages on debian-12 (arm64) from https://apt.postgresql.org/pub/repos/apt, the error is repeated.


11.09.2024 16:55, Thomas Munro пишет:
Hmm, I think it is inlining spinlock code from
pg_last_wal_receive_lsn()'s call to GetWalRcvFlushRecPtr(), and then
failing to find fallbacks for pre-ARMv8.1 systems that didn't have the
LSE atomic instructions.  I wonder if there could be some mismatch in
the default -march for parts of your toolchain, so that it doesn't
link the library that has that stuff, but then the clang that built
walreceiverfuncs.bc expects it to be found.  I wonder if it goes away
if you add "-mno-outline-atomics" or "-march=armv8.1-a" or
"-march=armv8-a+lse" to BITCODE_CXXFLAGS (not saying that's a fix,
just trying to understand what's happening...).  Assuming you're using
GCC, maybe "gcc -Q --help=target | grep march" could show what Ubuntu
24 has set as the baseline, and "clang -### -c -x c /dev/null" might
show what clang is selecting... just ideas, I'm not sure, I don't have
such a system, I just noticed a few distros cranking up the baseline
instruction sets recently...
--------------rTIxH1y0EjiCo40nu96mHOSF--