[Development] CI failing due to ASan tst_selftest

Milian Wolff mail at milianw.de
Mon Sep 4 07:32:31 CEST 2023


On Sonntag, 27. August 2023 17:42:58 CEST Thiago Macieira wrote:
> On Sunday, 27 August 2023 02:35:39 PDT Ulf Hermann via Development wrote:
> > I've seen this one before. I suspect certain versions of fontconfig have
> > an internal memory leak. For me, it fixed itself after an upgrade of
> > some packages. Can we install debug symbols for fontconfig on the
> > respective platforms? Then we could see a proper stack trace.
> 
> That rings a bell, indeed.
> 
> But I'm not convinced it's a leak, as opposed to reachable memory that
> wasn't freed before exit.

LSAN doesn't do a still-reachable analysis.

> I also don't think debug symbols will help here, since this is coming from
> the dynamic symbols of the module in question, not from the debug info. If
> you look at the qFatal() leak I fixed, you see that there are unknown
> QtCore frames printed, meaning the stack trace didn't use debug symbols.

By default, LSAN will rely purely on frame pointers. As such, if fontconfig is 
compiled without them, the backtraces will be unhelpful. You can force usage 
of .eh_frame et al by exporting

    LSAN_OPTIONS=fast_unwind_on_malloc=false

But this option is really very slow, as the sanitizers don't use a caching 
unwinding library. I do not recommend running tests with this always enabled, 
but for one-off investigations it should be useful.

Hope that helps

-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20230904/d3129eb9/attachment-0001.sig>


More information about the Development mailing list