From nobody Fri Nov 26 19:48:03 2021 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 9C34318A3F0B for ; Fri, 26 Nov 2021 19:48:13 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J14zc5t3bz4v7L; Fri, 26 Nov 2021 19:48:12 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-il1-x132.google.com with SMTP id w4so10061413ilv.12; Fri, 26 Nov 2021 11:48:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=jUdaTo6D8UzHy5v6DB6KHv5mjmi53f/sEgDMmTEf/i4=; b=Qltm1KcSdhbY++XpSDQxKasv8ho64hzRRxaSAIlKu3TGJkxN/k7j5G6CKb4Y3BtwM0 Bo9fLxfrKzySgf8TWzmjhzC19bQJBj6StVWZ1dAm85zpOrt5/VuXbXzVSsATWltOis5n FtdJuS7XneXsyb4PyKQkjKzmc5de8aLz5wlQUP+vi8jM9vq5f0a42jC7cdbLK7Ywbwxm zaApoxWw8Y50It9DN8KjE9bc/g3U4iGV9Jeoc3Ek8G/p6Hv+ogYsLXZEGoSO9G6l3/5D 0uEgXdk8/616H2HBTnDd5+Ze+dFrtkriNXGfkuPYwcuBRSmRT+OifcOdpc5ja0wRNhfZ WWZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=jUdaTo6D8UzHy5v6DB6KHv5mjmi53f/sEgDMmTEf/i4=; b=iV2TfyYc7LP4CS9Ln6qRS5FoqMPRWSxcZBbXciXlqwX3Fc7bCyWTv/jHWFNYVJVIZX FkW4Jqp9bcT1Qgx5tD6MOWGv9rJbA9RJS8kFygxJNkHJXqob33x+8U2kubogVyCUg1/F Z9D9VnxLpfFJMv4gpqSm4wa1bs4ZSQLMPsciY9Ke92EIlHWZlmVf/wHPvmPrypd9ZX+/ M6/M28RhozptnBWex0uxc10IcDL1/ks/33IvE9vRSUMjewc922ZTo4naSIQNq8imr09t 3YIMPH8gn2gwc4HMdpNNu7QSd0yGSPp4JhnmwNCuhVm/hapi3dbuvcip7HJCx8440FM/ QuYA== X-Gm-Message-State: AOAM532rN0H5KPkWyG8zcT8andVIX8PmbbRuYYKkBlo5QPnnR3Eg77mD BmPtploZxhU0+m/S5Yi5lZ6NuMKAWnM= X-Google-Smtp-Source: ABdhPJyzqwhmBKu5IIVLBcmUmndUsYRpHHcFg6qnHlAnHUwR2T9HNBeyB38OL9fkCH9hfu2xWDhCIQ== X-Received: by 2002:a92:d2cc:: with SMTP id w12mr32806059ilg.111.1637956086038; Fri, 26 Nov 2021 11:48:06 -0800 (PST) Received: from nuc ([142.126.186.191]) by smtp.gmail.com with ESMTPSA id o14sm3576076ioo.36.2021.11.26.11.48.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 11:48:05 -0800 (PST) Date: Fri, 26 Nov 2021 14:48:03 -0500 From: Mark Johnston To: Andriy Gapon Cc: FreeBSD Current Subject: Re: ctfconvert: rc = 1 Unsupported version [_dwarf_info_load(229)] Message-ID: References: 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=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4J14zc5t3bz4v7L X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=Qltm1KcS; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::132 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [1.30 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_NA(0.00)[freebsd.org]; NEURAL_SPAM_SHORT(1.00)[0.998]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::132:from]; NEURAL_SPAM_LONG(1.00)[1.000]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-ThisMailContainsUnwantedMimeParts: N On Fri, Nov 26, 2021 at 02:00:27PM -0500, Mark Johnston wrote: > On Fri, Nov 26, 2021 at 06:12:49PM +0200, Andriy Gapon wrote: > > On 26/11/2021 18:06, Mark Johnston wrote: > > > On Thu, Nov 25, 2021 at 10:48:36PM +0200, Andriy Gapon wrote: > > >> > > >> I've just finished builds of yesterday's CURRENT / main for arm and arm64. > > >> In both builds I got lots of messages from ctfconvert: > > >> ctfconvert: rc = 1 Unsupported version [_dwarf_info_load(229)] > > >> > > >> I got an impression that there was a message for each object file, that's how > > >> many of them were there. > > >> > > >> I don't recall seeing those messages before. > > >> > > >> Should I be concerned? > > >> Maybe I am doing something wrong or have an unusual configuration? > > >> Any way to fix the issue? > > >> > > >> Thanks! > > >> > > >> P.S. > > >> The builds were done on stable/13, so maybe there is an issue with host tools > > >> not being able to grok something new. > > > > > > I haven't seen this before, for what it's worth. I presume this is from > > > a kernel build? Does the configuration enable generation of debug info > > > with, e.g., "makeoptions DEBUG=-g"? > > > > This is actually from buildworld. > > buildkernel is silent. > > Thanks, I can reproduce it now. > > Our libdwarf is complaining that the first compilation unit header in > .debug_info contains an unsupported DWARF version number (libdwarf only > supports 2, 3 and 4). In files compiled by clang it ends up being zero. > For instance, compiling bin/cat and dumping the .debug_info section: > > gcc10: > c1250000 04000000 00000801 00000000 > ^ DWARF version > clang: > 01000000 00000000 4e230000 00000000 > > llvm-dwarfdump and binutils readelf are somehow still able to find a > valid-looking unit header, but I haven't yet been able to figure out how > they do that from reading the DWARF 4/5 specs or the LLVM sources. Ah, we recently started configuring clang to compress debug sections by default, and our libdwarf doesn't know how to handle that. As an interim workaround this could simply be disabled with WITH_CTF is configured: diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 10262e6bb80c..5a5be3494471 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -113,7 +113,7 @@ CXXFLAGS+= -ftrivial-auto-var-init=pattern .if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \ empty(DEBUG_FLAGS:M-gdwarf*) -.if !${COMPILER_FEATURES:Mcompressed-debug} +.if !${COMPILER_FEATURES:Mcompressed-debug} || ${MK_CTF} == "yes" CFLAGS+= ${DEBUG_FILES_CFLAGS:N-gz*} CXXFLAGS+= ${DEBUG_FILES_CFLAGS:N-gz*} .else diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 437ccf373130..21597128f991 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -93,7 +93,7 @@ CFLAGS+=${CRUNCH_CFLAGS} .else .if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \ empty(DEBUG_FLAGS:M-gdwarf-*) -.if !${COMPILER_FEATURES:Mcompressed-debug} +.if !${COMPILER_FEATURES:Mcompressed-debug} || ${MK_CTF} == "yes" CFLAGS+= ${DEBUG_FILES_CFLAGS:N-gz*} .else CFLAGS+= ${DEBUG_FILES_CFLAGS}