From nobody Sun Jul 27 21:30:48 2025 X-Original-To: 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 4bqvt868qLz638Jr; Sun, 27 Jul 2025 21:30:56 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from mail.bsd4all.net (mail.bsd4all.net [94.130.200.20]) (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 4bqvt82WGJz3FQh; Sun, 27 Jul 2025 21:30:56 +0000 (UTC) (envelope-from herbert@gojira.at) Authentication-Results: mx1.freebsd.org; none Date: Sun, 27 Jul 2025 23:30:48 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gojira.at; s=mail202005; t=1753651849; bh=6FQHK2uvyoXshiq6VWmw4jXDwfLs64eAKr3BpMZlSXs=; h=Date:Message-ID:From:To:Cc:Subject:MIME-Version:Content-Type; b=vOFeBrRwzYrBQdPAigAxMvenHbI+FxlBJ39p+wrA/470Vmx3VjRHpkCaFb7ikgn5s 7FSgM+Wp9poNA7IPTly8ZnfY+p2Q+YvCTeuciw6NkRk6/AjoDfcttmfg4NVMvGoOEp bGBwillxomuTMwS7UoBMKjo66jFwu3WNpHid9BcD6gC0FV7kGH/gbOtksH6W831AFl JQz7t9FEJdIHBZsYXn0KrluGWnqvyYXCzZA+/Fie0T1NSczcqvSPU8A+AHzcIYKXRD JS0yth3KnPjQOpSOZLHhwN5zjoEg6rhN9dc+4hon6StEgv4bbBGezaeLaYG2nUtcmZ 8MqwmvBUmchFg== Message-ID: <87v7nde2yf.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: Kevin Bowling Cc: Dimitry Andric , Lexi Winter , current@freebsd.org, arm@freebsd.org, Kevin Bowling Subject: Re: LLVM broken on main (arm64)? In-Reply-To: References: <7F8E9486-3FF5-436F-B584-8ACB7BCF1BAD@FreeBSD.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/31.0 Mule/6.0 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 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4bqvt82WGJz3FQh 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:24940, ipnet:94.130.0.0/16, country:DE] On Sun, 27 Jul 2025 21:41:13 +0200, Kevin Bowling wrote: >=20 > On Sun, Jul 27, 2025 at 4:58=E2=80=AFAM Dimitry Andric = wrote: > > > > On 27 Jul 2025, at 13:33, Lexi Winter wrote: > > > > > > Dimitry Andric: > > >> On 27 Jul 2025, at 12:44, Herbert J. Skuhra wrot= e: > > >>> > > >>> 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::PrintStackTra= ce(llvm::raw_ostream&, int) + 72 > > >>> 1 libprivatellvm.so.19 0x00000edc041464ec llvm::sys::RunSignalHand= lers() + 128 > > >>> 2 libprivatellvm.so.19 0x00000edc04148d48 llvm::support::detail::p= rovider_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 install= world was half-finished? > > > > > > i am seeing something similar on amd64 after updating past 9b3055d0d4= bc: > > > > > > 1& 1? 172!freebsd15 ~/src/bsd/dev [lf/dev/pkgbase-toolchain]% cc > > > > > > PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and in= clude the crash backtrace, preprocessed source, and associated run script. > > > Stack dump without symbol names (ensure you have llvm-symbolizer in y= our 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::RunSignalHandle= rs() + 85 > > > 2 libprivatellvm.so.19 0x00001ca34ed8f9d7 llvm::support::detail::pro= vider_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 t= hat > > > this change requires a clean build? > > > > I think it's likely that Kevin's > > https://reviews.freebsd.org/D50388 / > > https://cgit.freebsd.org/src/commit/?id=3D9b3055d0d4bc is the cause: > > it flips MK_LLVM_ASSERTIONS from "yes" to "no" by default. My > > guess is that some objects, libraries or binaries do not get > > rebuilt, leading to inconsistencies. > > > > There probably has to be another depend-cleanup.sh hack to get > > over this. Another complication is that in depend-cleanup.sh you > > don't have access to the MK_xxx options from src.opts.mk. >=20 > That would not be fun because the idea is to allow someone to easily > toggle both directions, and not blow up the noclean build time for > everyone unconditionally whacking libprivatellvm.so or the like unless > there is a trivial way to detect the change. >=20 > I am inclined to back this out if someone can confirm simply setting > WITH_LLVM_ASSERTIONS fixed the issue. I updated two amd64 systems without any issues. After fixing my arm64 system with llvm19 from ports I tried the following: - Disable WITH_CCACHE_BUILD in /etc/src.conf - Wipe /usr/obj - Build and install 92dfc3fbcd79 and reboot - Build and install 6c4771c73470 and reboot Result: no issues So I guess the problem was caused by ccache but I have no idea why it only failed on arm64. I also use ccache on the other systems. -- Herbert