Date: Thu, 29 Jun 2023 14:01:38 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: Willem Jan Withagen <wjw@digiware.nl> Cc: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>, current@freebsd.org Subject: Re: __cxa_thread_call_dtors: dtr 0x........ from unloaded dso, skipping Message-ID: <363E70BD-DD8C-4038-B11C-536FD604B233@FreeBSD.org> In-Reply-To: <9e0a27a0-acb3-d30c-14db-ea59042d435b@digiware.nl> References: <46pq4r4n-p46r-47nn-r1ss-7r2984891pn7@yvfgf.mnoonqbm.arg> <16A8852E-DEA9-408E-80BC-94322FB2415E@FreeBSD.org> <p2p1n65r-511q-9oos-6369-0qnq2q7os4q7@yvfgf.mnoonqbm.arg> <0A55614E-3577-4933-9CCD-4D723DFA86E8@FreeBSD.org> <08035b3a-7356-efc8-616b-cbf46c1904e7@digiware.nl> <CDF72440-A1AE-4278-B110-897655BCF9E8@FreeBSD.org> <9e0a27a0-acb3-d30c-14db-ea59042d435b@digiware.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <wjw@digiware.nl> wrote: >=20 > On 29-6-2023 12:37, Dimitry Andric wrote: >> On 29 Jun 2023, at 12:25, Willem Jan Withagen <wjw@digiware.nl> = wrote: >>> On 26-6-2023 17:38, Dimitry Andric wrote: >>>> On 26 Jun 2023, at 17:29, Bjoern A. Zeeb = <bzeeb-lists@lists.zabbadoz.net> wrote: >>>>> On Mon, 26 Jun 2023, Dimitry Andric wrote: >>>>>=20 >>>>>> On 26 Jun 2023, at 17:00, Bjoern A. Zeeb = <bzeeb-lists@lists.zabbadoz.net> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?363E70BD-DD8C-4038-B11C-536FD604B233>