From nobody Mon Jul 28 08:09:55 2025 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4brB3k31f7z62m92 for ; Mon, 28 Jul 2025 08:10:10 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4brB3j4xp5z3HNR for ; Mon, 28 Jul 2025 08:10:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 56S89uM8008434; Mon, 28 Jul 2025 11:09:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 56S89uM8008434 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 56S89tpv008433; Mon, 28 Jul 2025 11:09:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 28 Jul 2025 11:09:55 +0300 From: Konstantin Belousov To: Kevin Bowling Cc: cyric@mm.st, freebsd-current@freebsd.org Subject: Re: LLVM broken on main (arm64)? Message-ID: References: <8bfd193f-4279-4ad3-a25b-fffda11cc5b4@mm.st> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Queue-Id: 4brB3j4xp5z3HNR X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] On Mon, Jul 28, 2025 at 12:38:03AM -0700, Kevin Bowling wrote: > On Sun, Jul 27, 2025 at 7:36 PM wrote: > > > > Lexi Winter wrote: > > > Dimitry Andric: > > >> On 27 Jul 2025, at 12:44, Herbert J. Skuhra wrote: > > >>> > > >>> after updating from main-n279078-1f2c178e5688 to > > >>> main-n279105-9b3055d0d4bc (arm64) I have the following issue: > > >>> > > >>> $ cc > > >>> PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script. > > >>> Stack dump: > > >>> 0. Program arguments: cc > > >>> 1. Compilation construction > > >>> Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): > > >>> 0 libprivatellvm.so.19 0x00000edc041485ec llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 72 > > >>> 1 libprivatellvm.so.19 0x00000edc041464ec llvm::sys::RunSignalHandlers() + 128 > > >>> 2 libprivatellvm.so.19 0x00000edc04148d48 llvm::support::detail::provider_format_adapter::format(llvm::raw_ostream&, llvm::StringRef) + 412 > > >>> 3 libthr.so.3 0x00000edc06bafc38 _pthread_sigmask + 1320 > > >>> Segmentation fault > > >> > > >> That's a very short trace, with no useful information. Maybe installworld was half-finished? > > > > > > i am seeing something similar on amd64 after updating past 9b3055d0d4bc: > > > > > > 1& 1? 172!freebsd15 ~/src/bsd/dev [lf/dev/pkgbase-toolchain]% cc > > > > > > PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script. > > > Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): > > > 0 libprivatellvm.so.19 0x00001ca34ed8f2c9 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 57 > > > 1 libprivatellvm.so.19 0x00001ca34ed8d185 llvm::sys::RunSignalHandlers() + 85 > > > 2 libprivatellvm.so.19 0x00001ca34ed8f9d7 llvm::support::detail::provider_format_adapter::format(llvm::raw_ostream&, llvm::StringRef) + 375 > > > 3 libthr.so.3 0x00001ca352fc88ec _pthread_sigmask + 1340 > > > 4 libthr.so.3 0x00001ca352fc7ebb pthread_signals_unblock_np + 1467 > > > 5 libthr.so.3 0x00001ca34449d2d3 pthread_signals_unblock_np + 18446744073462962643 > > > 6 libprivatellvm.so.19 0x00001ca34d5b28be llvm::cl::opt>::~opt() + 62 > > > 7 libc.so.7 0x00001ca35434131f __cxa_finalize + 351 > > > [2] 5802 bus error (core dumped) cc > > > > > > i'm using pkgbase so unlikely to be a partial install. could it be that > > > this change requires a clean build? > > > > And it looks like this for me, amd64, WITHOUT_CLEAN build (default): > > Can you confirm if simply setting WITH_LLVM_ASSERTIONS fixes the > issue? No clean, no blowing away /usr/obj, etc. I just need a > confirmation from someone that a reversion would actually work or if > we are stuck in for something deeper. Can you make the obj directory different between assertion vs. optimized build? Then you do not need a special cleanup. > > > $ cc --version > > FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git > > llvmorg-19.1.7-0-gcd708029e0b2) > > Target: x86_64-unknown-freebsd15.0 > > Thread model: posix > > InstalledDir: /usr/bin > > Build config: +assertions > > zsh: abort (core dumped) cc --version > > > > (gdb) bt > > #0 kill () at kill.S:4 > > #1 0x0000062f57af2540 in __fail (msg=0x62f579f5aa5 "stack overflow > > detected; terminated") > > at /usr/src/lib/libc/secure/libc_stack_protector.c:119 > > #2 0x0000062f57af24b0 in __stack_chk_fail () at > > /usr/src/lib/libc/secure/libc_stack_protector.c:126 > > #3 0x0000062f49fcebb6 in BuildCompilation () at > > /data/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/string:2330 > > #4 0x000006272564d3e4 in clang_main () at > > /usr/src/contrib/llvm-project/clang/tools/driver/driver.cpp:361 > > #5 0x000006272564bc22 in main () at > > /usr/src/usr.bin/clang/clang/clang-driver.cpp:17 > > >