Re: __cxa_thread_call_dtors: dtr 0x........ from unloaded dso, skipping
Date: Thu, 29 Jun 2023 12:01:38 UTC
> On 29 Jun 2023, at 13:52, Willem Jan Withagen <wjw@digiware.nl> wrote: > > 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: >>>>> >>>>>> 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: >>>>>>> >>>>>>> __cxa_thread_call_dtors: dtr 0x...... from unloaded dso, skipping >>>>>>> >>>>>>> Can anyone shed light on that? >>>>>> You need (thanks to Kostik): >>>>>> https://cgit.freebsd.org/src/commit/?id=42ceab3ea1a997db93b65404be0ee4b17b5382d7 >>>>>> >>>>>> 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. >>>> >>>> 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. > > 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