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 1wbboi-002hfC-26 for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jun 2026 10:23:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wbboh-0062De-1T for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jun 2026 10:23:47 +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 1wbboh-0062DV-0Q for pgsql-hackers@lists.postgresql.org; Mon, 22 Jun 2026 10:23:47 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wbboe-00000001jts-2n21 for pgsql-hackers@postgresql.org; Mon, 22 Jun 2026 10:23:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Content-Transfer-Encoding:Content-Type: Mime-Version:References:In-Reply-To:From:Subject:Cc:To:Message-Id:Date:Sender :Reply-To:Content-ID:Content-Description; bh=+t6QBISdd1h9XYoJXSX9Ug3TCJUTl2nYmzFEZtAe5HQ=; b=aPv0CKhr6zpA4LlEsr+G1GY6V6 5C86OYe/d3QlwCyR5EJ2OslqptQD0fuAdlKs6bgt5y/zIjWAE/KneFq3xiaDMFK/Jqd/B5FxtsKVQ 3p/XoGDLLZ9R4RWuMiCXr6HuynptgcCyTg5O4Gf2MUlCf92qUfqWfgp8h4MBClpY0UPnl05Jq48gK HZp1L4Lq9fbBlBlTc7BX7AM3xitfsIDnU6iRl7hhWJrwRXAiVa/u9AeW2S/miwZspWtP+NRhbQhIE NG1ui2jqsNXR2lPS0fqjqXZNvE4a0yvr2xUrhkvOtYqRUT0syqaougBN+xMA4DPtvZ96DQh5FxLM5 2gUKJ6EA==; Received: from [2409:11:4120:300:7d00:8abd:a1e6:3004] (helo=localhost) by meldrar.postgresql.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wbboY-004cSP-2F; Mon, 22 Jun 2026 10:23:40 +0000 Date: Mon, 22 Jun 2026 19:23:19 +0900 (JST) Message-Id: <20260622.192319.148395607405547262.ishii@postgresql.org> To: byavuz81@gmail.com, andres@anarazel.de, jacob.champion@enterprisedb.com, peter@eisentraut.org, postgres@jeltef.nl, thomas.munro@gmail.com, zsolt.parragi@percona.com Cc: assam258@gmail.com, matheusssilv97@gmail.com, pgsql-hackers@postgresql.org Subject: Re: Heads Up: cirrus-ci is shutting down June 1st From: Tatsuo Ishii In-Reply-To: References: X-Mailer: Mew version 6.8 on Emacs 29.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2409:11:4120:300:7d00:8abd:a1e6:3004 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, Thank you for working on CFbot. I would like to share a possible issue with Ci jobs found by Henson and Matheus, particulary Linux Meson (64-bit). Andres reported that while testing RPR patches, cfbot was failing, with crashes inside JIT. https://www.postgresql.org/message-id/p7r5bekdbl2zcazid7agvfo2nfnq5bim2a5jkckqygld32n325%40fctfp6ou6qnb Henson and Matheus analyzed the issue and came to the conclusion that the crash is triggered by particular cflags passed to bitcode generation, not the RPR patch itself. In fact Henson succeeded in reproducing the crash with a trivial SQL like: SELECT 1 AS result; https://www.postgresql.org/message-id/CAAAe_zDtwoL8KaC_cpK4rU9jCrLxtGJ%3DTwLogdfH1PeE3_GT9Q%40mail.gmail.com To fix the issue, can you please evaluate Matheus's patch? His patch looks good to me. I pushed Henson's regression test addition to my GitHub PostgreSQL fork and confirmed Ci failed. Then I pushed Matheus's patch and confirmed all Ci jobs succeeded. https://www.postgresql.org/message-id/CAAAe_zDtwoL8KaC_cpK4rU9jCrLxtGJ%3DTwLogdfH1PeE3_GT9Q%40mail.gmail.com (v2-0002-meson-strip-sanitizer.patch) The patch looks good to me. For your convenience, I include the patch in-line. ---- v2-0002-meson-strip-sanitizer.patch ---- From b0311982e0ff06470d31c54b5d4822fd3c5e19d4 Mon Sep 17 00:00:00 2001 From: Henson Choi Date: Fri, 12 Jun 2026 09:15:10 +0900 Subject: [PATCH v2 2/3] Exclude sanitizer flags from LLVM JIT bitcode generation The meson build passes c_args verbatim to the clang command that emits the JIT bitcode. Under -fsanitize=address the instrumentation ends up in the bitcode and breaks the JIT: any JIT-compiled query crashes the backend with SIGILL. The autoconf build is unaffected, as it builds BITCODE_CFLAGS from a whitelist that never includes CFLAGS. Filter sanitizer flags out of c_args during bitcode generation. Author: Matheus Alcantara Reviewer: Henson Choi --- src/backend/jit/llvm/meson.build | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build index 7df8453ad6f..1ebee3bdcaf 100644 --- a/src/backend/jit/llvm/meson.build +++ b/src/backend/jit/llvm/meson.build @@ -61,7 +61,23 @@ endif # XXX: Need to determine proper version of the function cflags for clang bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv'] -bitcode_cflags += get_option('c_args') + +# Sanitizer instrumentation in the JIT bitcode corrupts the JIT code +# generator: JIT-compiled queries crash with SIGILL. Strip sanitizer flags +# from c_args during bitcode generation, and warn when we do, since the +# JIT-compiled code then runs without sanitizer coverage. +bitcode_sanitize_stripped = false +foreach cflag : get_option('c_args') + if cflag.contains('sanitize') + bitcode_sanitize_stripped = true +foreach cflag : get_option('c_args') + if cflag.contains('sanitize') + bitcode_sanitize_stripped = true + else + bitcode_cflags += cflag + endif +endforeach +if bitcode_sanitize_stripped + warning('stripping sanitizer flags from LLVM JIT bitcode; JIT-compiled code will not be instrumented') +endif + bitcode_cflags += cppflags # XXX: Worth improving on the logic to find directories here -- 2.47.3 ---- v2-0002-meson-strip-sanitizer.patch ---- Regards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp