[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fWXQBdg8Uq1hFgRPC4z4vQAvUuT6TnUkPHSBfdGPNaYwg@mail.gmail.com>
Date: Tue, 17 Jun 2025 14:32:37 -0700
From: Ian Rogers <irogers@...gle.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Howard Chu <howardchu95@...il.com>, Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>, Kan Liang <kan.liang@...ux.intel.com>,
Michael Petlan <mpetlan@...hat.com>, Andi Kleen <ak@...ux.intel.com>,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>, Tiezhu Yang <yangtiezhu@...ngson.cn>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 3/4] perf trace: Add missed freeing of ordered events
and thread
On Tue, Jun 17, 2025 at 2:30 PM Arnaldo Carvalho de Melo
<acme@...nel.org> wrote:
>
> On Mon, Jun 16, 2025 at 01:27:04PM -0300, Arnaldo Carvalho de Melo wrote:
> > On Fri, Jun 13, 2025 at 09:16:26PM -0700, Howard Chu wrote:
> > > TL;DR: (definitely lost: 5,248 bytes in 17 blocks, 3,586 bytes in 12
> > > blocks) -> (definitely lost: 4,992 bytes in 16 blocks, indirectly
> > > lost: 0 bytes in 0 blocks), the leak of thread__new() is fixed.
> > >
> > > Thank you so much for fixing this.
> > >
> > > On Fri, Jun 13, 2025 at 5:41 PM Ian Rogers <irogers@...gle.com> wrote:
> > > >
> > > > Caught by leak sanitizer running "perf trace BTF general tests".
> > > >
> > > > Signed-off-by: Ian Rogers <irogers@...gle.com>
> > >
> > > Acked-by: Howard Chu <howardchu95@...il.com>
> >
> > Small enough, applied to perf-tools.
>
> root@...ber:~# 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@...ber:~#
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@google.com/
Ian
> ⬢ [acme@...lbx perf-tools]$ git bisect good
> e340815ea559052d8d590a145bab7d7105608e7d is the first bad commit
> commit e340815ea559052d8d590a145bab7d7105608e7d
> Author: Ian Rogers <irogers@...gle.com>
> Date: Fri Jun 13 17:41:06 2025 -0700
>
> perf trace: Add missed freeing of ordered events and thread
>
> Caught by leak sanitizer running "perf trace BTF general tests".
>
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> Acked-by: Howard Chu <howardchu95@...il.com>
> Cc: Adrian Hunter <adrian.hunter@...el.com>
> Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
> Cc: Andi Kleen <ak@...ux.intel.com>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> Cc: Jiri Olsa <jolsa@...nel.org>
> Cc: Kan Liang <kan.liang@...ux.intel.com>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Michael Petlan <mpetlan@...hat.com>
> Cc: Namhyung Kim <namhyung@...nel.org>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Tiezhu Yang <yangtiezhu@...ngson.cn>
> Link: https://lore.kernel.org/r/20250614004108.1650988-3-irogers@google.com
> Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
>
> tools/perf/builtin-trace.c | 2 ++
> 1 file changed, 2 insertions(+)
> ⬢ [acme@...lbx perf-tools]$
>
> Removing it:
>
> root@...ber:~# perf trace -e *sleep sleep 1
> 0.000 (1000.057 ms): sleep/2693449 clock_nanosleep(rqtp: { .tv_sec: 1, .tv_nsec: 0 }, rmtp: 0x7fffedc43ab0) = 0
> root@...ber:~#
>
> - Arnaldo
Powered by blists - more mailing lists