[Lldb-commits] [PATCH] D134842: Improve dynamic loader support in DynamicLoaderPOSIXDYLD when using core files.

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 29 10:29:25 PDT 2022


clayborg added a comment.

In D134842#3823497 <https://reviews.llvm.org/D134842#3823497>, @labath wrote:

> In D134842#3822740 <https://reviews.llvm.org/D134842#3822740>, @yinghuitan wrote:
>
>> I am surprised other major companies did not hit this issue.
>
> That could be because this is something specific to your environment. Just to be clear, is this happening for *all* core files or only for some of them? If only some, is there anything special about the state of the applications that produced those core files (e.g. are they in the middle of loading a shared library?)

These are produced by the linux kernel. If we produce any core files manually we make Minidumps as they contain more useful information. ELF core files are kind of a joke as they don't include any build IDs for the shared libraries so many people often will try to load a core file on another system and they end up just loading the shared libraries from the current machine (like /usr/lib/libc.so etc) and they will never know. ELF core file are only really useful on the same machine or for looking at the main binary's stack frames.

> Even though this may very well be the right fix for middle-of-dlopen core dumps (we can't really wait for the loading to finish), I suspect this is actually masking some other problem, as the amount of time an application spends in the RT_ADD state is very brief, and it shouldn't be doing anything crash-prone while in there.

Thanks for the background on the eAdd state, makes more sense, there are no docs on what these states mean so I didn't know what the normal values were. I will check our small core files that are checked in and see if they end up in these states as well and report back. I will also check out the core file that has this issue to see if one of the threads is doing dlopen.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134842/new/

https://reviews.llvm.org/D134842



More information about the lldb-commits mailing list