Re: [PATCH v1 3/4] perf trace: Add missed freeing of ordered events and thread
From: Ian Rogers
Date: Mon Jun 23 2025 - 18:26:46 EST
On Tue, Jun 17, 2025 at 2:49 PM Arnaldo Carvalho de Melo
<acme@xxxxxxxxxx> wrote:
>
> On Tue, Jun 17, 2025 at 02:32:37PM -0700, Ian Rogers wrote:
> > On Tue, Jun 17, 2025 at 2:30 PM Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
> > > On Mon, Jun 16, 2025 at 01:27:04PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > > On Fri, Jun 13, 2025 at 5:41 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
> > > > > > Caught by leak sanitizer running "perf trace BTF general tests".
>
> > > > > > Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
>
> > > > > Acked-by: Howard Chu <howardchu95@xxxxxxxxx>
>
> > > > Small enough, applied to perf-tools.
>
> > > root@number:~# perf trace -e *sleep ls
> > > anaconda-ks.cfg bin bla commands dtel firefly logind.conf perf-install.txt python
> > > perf: Segmentation fault
> > > Obtained 11 stack frames.
> > > perf() [0x5c595e]
> > > perf() [0x5c59f9]
> > > /lib64/libc.so.6(+0x19c30) [0x7fd43ce27c30]
> > > perf() [0x5dc497]
> > > perf() [0x492d54]
> > > perf() [0x49860e]
> > > perf() [0x49890e]
> > > perf() [0x413413]
> > > /lib64/libc.so.6(+0x35f5) [0x7fd43ce115f5]
> > > /lib64/libc.so.6(__libc_start_main+0x88) [0x7fd43ce116a8]
> > > perf() [0x413a45]
> > > Segmentation fault (core dumped)
> > > root@number:~#
>
> > Thanks, I'll take a look to see if I can spot what's broken. Seeing
> > this stack trace makes me remember we haven't landed:
> > https://lore.kernel.org/lkml/20250611221521.722045-1-irogers@xxxxxxxxxx/
>
> Yeah, I just pushed perf-tools to soak in linux-next/pending-fixes for a
> few days and will switch to processing patches for perf-tools-next, will
> try and pick that one, I also noticed that the backtrace wasn't
> symbolized, thus your patch wasn't there :-\
I sent out a fix for this issue in v2:
https://lore.kernel.org/lkml/20250617223356.2752099-3-irogers@xxxxxxxxxx/
Patches 1 and 2 I see are in the v6.16 fixes PR:
https://lore.kernel.org/lkml/20250620155415.88215-1-acme@xxxxxxxxxx/
Thanks,
Ian
> - Arnaldo