From nobody Thu Jun 29 12:01:38 2023 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 4QsH9v3QXKz4kj8K for ; Thu, 29 Jun 2023 12:01:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QsH9v30Kkz3w7T; Thu, 29 Jun 2023 12:01:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688040115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5kT5nP9VHQxU50COc14VLxcvbTrolI23+T/Yc59QXSI=; b=PI0Lis/+/yOiLtN/l/O2AMJ+Z/ujpBGGaWAYEOAwXPmyrhaci0Ih4LfxxyZP+ms9/70hW6 uBG+NDFVvOsv9IGy9ukRf/GEuC4NitY6kryOB5aHczy3QTTlhieQWViaknQrQ2JuyxeceD VagX55TJfxcguwUH2NFotHvochXUFBuBe6M/ByQAFZPIgMiQwqEPZF/2y1bWFseLaMRSjH TEKsCmJON9uQFsOZS2mS7rMBtTNcioYv+JGPI6NriwuKpQdKnbOvR/h3eJSSqt0NsN7IBt YryghzsyqVQibO7IHICYm5wpWbEA+QeH3B55apVjt09mEWw9SW/+C0HYiGh5tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688040115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5kT5nP9VHQxU50COc14VLxcvbTrolI23+T/Yc59QXSI=; b=Onv9XDjWenVLAIXDy7dxn9tBVZwMvbsFARilBYLLQXPo1rE4wkAWGPpJQ06+BsdAmVsBNp KFPKYspqG8OoCrtbtOyuffw0oXZfAInBMI0WT2S2a20ZT0UZFPwnGW2AAcb9L6XKSQpBTH LbyvDsbngfA8wRBWvIhpDRbgwmGNbemrKigZgiQox0sTuXFJrucHB4+gGz2PWkRUA/m/O5 Gzum0CUfJgyO0ypoRJ02nmbsi+JbzSepVisgYPtwI+hfu2r6/clUVvcSm8p3ph5oICjATs ftwP2gzb0ZeRMkqURHKyPVmYvcvHb8xOhuMGzUfvPWd58gOHIusujvzd8saUGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688040115; a=rsa-sha256; cv=none; b=x+irC5MNplV7ZDHcUp2gs52LjFc3sy5aKbJ+k2BrG5dxdwAozL6eRjIQl16wi7b2kDuxFq e1kAYKg8FivX2ysLGyFI89nnL3p2ZquVwd9xXjCx+fiLqnvHmYSkrsTiFTXJgfdZ1mieUW UA4QhjJBRJcQUDLOk2KRTQDZWxZ3TM5qHc1upiQ0OBq+cdE/pvrEjSL3RQllhEFut2/D5x Q6gfYhLinbMa0ZHVrKEmZNP5GD5QV5v6Ew3B36SdRU9KzE145s35m2i6RY2LPcOyXjr2YV ZYnHT6lcWqyt0NmmfC16bEqxNlwZIH11/Umtv9xuSD31F0GEkXScyYxQbdyoOg== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QsH9v1S0Xz14xG; Thu, 29 Jun 2023 12:01:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id F12A748E14; Thu, 29 Jun 2023 14:01:53 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_57EC5856-2533-4E38-BF6C-AE79D7386F65"; protocol="application/pgp-signature"; micalg=pgp-sha1 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 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: __cxa_thread_call_dtors: dtr 0x........ from unloaded dso, skipping From: Dimitry Andric In-Reply-To: <9e0a27a0-acb3-d30c-14db-ea59042d435b@digiware.nl> Date: Thu, 29 Jun 2023 14:01:38 +0200 Cc: "Bjoern A. Zeeb" , current@freebsd.org Message-Id: <363E70BD-DD8C-4038-B11C-536FD604B233@FreeBSD.org> References: <46pq4r4n-p46r-47nn-r1ss-7r2984891pn7@yvfgf.mnoonqbm.arg> <16A8852E-DEA9-408E-80BC-94322FB2415E@FreeBSD.org> <0A55614E-3577-4933-9CCD-4D723DFA86E8@FreeBSD.org> <08035b3a-7356-efc8-616b-cbf46c1904e7@digiware.nl> <9e0a27a0-acb3-d30c-14db-ea59042d435b@digiware.nl> To: Willem Jan Withagen X-Mailer: Apple Mail (2.3731.600.7) X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_57EC5856-2533-4E38-BF6C-AE79D7386F65 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 29 Jun 2023, at 13:52, Willem Jan Withagen wrote: >=20 > On 29-6-2023 12:37, Dimitry Andric wrote: >> On 29 Jun 2023, at 12:25, Willem Jan Withagen = wrote: >>> On 26-6-2023 17:38, Dimitry Andric wrote: >>>> On 26 Jun 2023, at 17:29, Bjoern A. Zeeb = wrote: >>>>> On Mon, 26 Jun 2023, Dimitry Andric wrote: >>>>>=20 >>>>>> On 26 Jun 2023, at 17:00, Bjoern A. Zeeb = wrote: >>>>>>> while building world and current I see a lot of: >>>>>>>=20 >>>>>>> __cxa_thread_call_dtors: dtr 0x...... from unloaded dso, = skipping >>>>>>>=20 >>>>>>> Can anyone shed light on that? >>>>>> You need (thanks to Kostik): >>>>>> = https://cgit.freebsd.org/src/commit/?id=3D42ceab3ea1a997db93b65404be0ee4b1= 7b5382d7 >>>>>>=20 >>>>>> Build libc and install it, then the messages should disappear. >>>>> Great! Basically update world and it'll go. >>>>> Do we add an UPDATING note for this or do we consider it developer = noise? >>>> I think the message has been there for a long time, but was not = often >>>> noticed. It happened when the buildworld bootstrap decides to build = a >>>> static bootstrap lld ("SYSTEM_LINKER: libclang will be built for >>>> bootstrapping a cross-linker"), so usually when lld's version is = bumped. >>>> And that is because lld is one of the few threaded build tools in = the >>>> tree. >>>>=20 >>>> The messages themselves are harmless and can be ignored. Feel free = to >>>> add an UPDATING note to that effect, otherwise worried users might = think >>>> something is off. :) >>> Actually I had that in my Ceph-ports as well, and chose to ignore = it.... >>> Looked into the difference between FreeBSD and Linux. >>> Linux prevents that message by counting the number of loads, and = only unloads >>> when the counter hits zero. FreeBSD just seems to unload, and report = illegal access. >> There is no "loading" and "unloading" going on, since this is about a >> static executable. What happened was that __cxa_thread_call_dtors() = was >> giving a misleading message, because _rtld_addr_phdr() always = returned >> 0. Kostik has now made it so _rtld_addr_phdr() does the right thing = for >> static executables. >=20 > So the "feature" I described is still in there? > Any chance of that getting fixed? I'm not sure which "feature" you mean. The only thing that is happening in this particular case is that a static executable uses threads, and when those threads exit, their destructors should be called. If you are talking about dynamic executables, then something entirely different may be going on. And there might certainly be bugs in there. -Dimitry --Apple-Mail=_57EC5856-2533-4E38-BF6C-AE79D7386F65 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZJ1yogAKCRCwXqMKLiCW oxT2AKCzs+A6m43QbH6nzBkQh8Y2EDkvUwCg5DtBDr9vMO2NFYj7VZ97VHByFNs= =bF0p -----END PGP SIGNATURE----- --Apple-Mail=_57EC5856-2533-4E38-BF6C-AE79D7386F65--