[llvm-dev] [RFC] Generating LLD reproducers on crashes
Haowei Wu via llvm-dev
llvm-dev at lists.llvm.org
Wed Apr 21 14:56:26 PDT 2021
> 1. Haowei's proposal is a good first step. A reproducer is good for 100%
crashes. The reproducer archive is good for developers that need to iterate
when fixing a crash. That can be achieved by mimicking the behavior of
-fintegrated-cc1 and CC1Command (which is somehow equivalent to
safeLldMain()), followed by something similar to
generateCompilationDiagnostics(). All this controlled by an optional
cmd-line flag. Also worth noting that some LLD drivers (if not all) support
reproducers already.
I think implementing option 1 as a starter is a good idea. The existing
crash reproducer for clang with '-fintegrated-cc1' works pretty good in our
case so if we can have it in lld, It should greatly improve the debug
experience. If there is no further objection, I can start working on this.
> Sounds like a good idea. I suppose in case of a crash,
Driver::generateCompilationDiagnostics() could invoke the linker again with
--reproduce? That would be the "cheap" version of option 2.
I agree with this as well. Though we probably won't need a perfect crash
reproducer, this solution is simple enough and it would cover some rare
cases that an in process lld crash handler cannot handle.
On Wed, Apr 21, 2021 at 10:56 AM Alexandre Ganea <
alexandre.ganea at ubisoft.com> wrote:
> The build system needs to be aware of the core dump files, and deal with
> them before/after the build. It should do an automatic cleanup before and
> compress+upload the core dumps to a network location if a crash occurs. I
> agree that the size is a problem if that isn't dealt with. 50 GB .dmp files
> for LLD crashes aren't uncommon, and you would probably see the same
> figures with production builds on Linux. Mostly likely dumps would need to
> be enabled explicitly with an env.var or a system setting on the build
> system? I personally find it valuable to have .dmp files. As hard as we try
> to make the CI builds the same as the local ones, there's always something
> different that triggers a different behavior on the build system.
>
> -----Message d'origine-----
> De : Fangrui Song <maskray at google.com>
> Envoyé : April 21, 2021 12:56 PM
> À : Alexandre Ganea <alexandre.ganea at ubisoft.com>
> Cc : David Blaikie <dblaikie at gmail.com>; Petr Hosek <phosek at chromium.org>;
> Haowei Wu <haowei at google.com>; llvm-dev at lists.llvm.org
> Objet : Re: [llvm-dev] [RFC] Generating LLD reproducers on crashes
>
> For 3: on Linux, there are many system effects which can suppress crash
> dumps...
> I am still abit concerned with the size of the core file..
> If users find this particular useful and want to go down this route, it is
> fine to me.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210421/0ece11bb/attachment.html>
More information about the llvm-dev
mailing list