From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Kan Liang <kan.liang@linux.intel.com>,
James Clark <james.clark@linaro.org>,
Howard Chu <howardchu95@gmail.com>,
Charlie Jenkins <charlie@rivosinc.com>,
Thomas Richter <tmricht@linux.ibm.com>,
Athira Rajeev <atrajeev@linux.vnet.ibm.com>,
Stephen Brennan <stephen.s.brennan@oracle.com>,
Jean-Philippe Romain <jean-philippe.romain@foss.st.com>,
Junhao He <hejunhao3@huawei.com>,
"Dr. David Alan Gilbert" <linux@treblig.org>,
Dmitry Vyukov <dvyukov@google.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 0/5] perf test: Sanity check file descriptors are cleaned up
Date: Wed, 2 Jul 2025 19:20:28 -0700 [thread overview]
Message-ID: <aGXo7Hp31qZOTx9S@google.com> (raw)
In-Reply-To: <20250624190326.2038704-1-irogers@google.com>
On Tue, Jun 24, 2025 at 12:03:20PM -0700, Ian Rogers wrote:
> Some recent patches showed we were leaking file descriptors:
> https://lore.kernel.org/lkml/20250617223356.2752099-2-irogers@google.com/
>
> When a test is forked the file descriptors >3 can be closed and then
> any file descriptors >3 left after the test are leaks. Add this
> checking to the forked test code. Prior to that clean up some file
> descriptor usage so we can assert that only file descriptors are
> cleaned up. Sometimes the file descriptor being held open is the
> result of a memory leak, so fix those.
Interesting, I can see a few more tests are failing with this. But we
can figure it out later.
Thanks,
Namhyung
>
> Ian Rogers (5):
> perf dso: Add missed dso__put to dso__load_kcore
> perf test code-reading: Avoid a leak of cpus and threads
> perf hwmon_pmu: Hold path rather than fd
> perf dso: With ref count checking, avoid dso_data holding dso live
> perf test: In forked mode add check that fds aren't leaked
>
> tools/perf/tests/builtin-test.c | 69 +++++++++++++++++++++++++++++++++
> tools/perf/tests/code-reading.c | 7 ----
> tools/perf/tests/hwmon_pmu.c | 11 +++---
> tools/perf/util/dso.c | 4 ++
> tools/perf/util/hwmon_pmu.c | 38 +++++++++++++-----
> tools/perf/util/hwmon_pmu.h | 4 +-
> tools/perf/util/pmus.c | 2 +-
> tools/perf/util/pmus.h | 2 +-
> tools/perf/util/symbol.c | 1 +
> 9 files changed, 112 insertions(+), 26 deletions(-)
>
> --
> 2.50.0.714.g196bf9f422-goog
>
next prev parent reply other threads:[~2025-07-03 2:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 19:03 [PATCH v1 0/5] perf test: Sanity check file descriptors are cleaned up Ian Rogers
2025-06-24 19:03 ` [PATCH v1 1/5] perf dso: Add missed dso__put to dso__load_kcore Ian Rogers
2025-06-24 19:03 ` [PATCH v1 2/5] perf test code-reading: Avoid a leak of cpus and threads Ian Rogers
2025-06-24 19:03 ` [PATCH v1 3/5] perf hwmon_pmu: Hold path rather than fd Ian Rogers
2025-06-24 19:03 ` [PATCH v1 4/5] perf dso: With ref count checking, avoid dso_data holding dso live Ian Rogers
2025-06-24 19:03 ` [PATCH v1 5/5] perf test: In forked mode add check that fds aren't leaked Ian Rogers
2025-07-03 2:20 ` Namhyung Kim [this message]
2025-07-03 3:03 ` [PATCH v1 0/5] perf test: Sanity check file descriptors are cleaned up Ian Rogers
2025-07-03 18:18 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aGXo7Hp31qZOTx9S@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=atrajeev@linux.vnet.ibm.com \
--cc=charlie@rivosinc.com \
--cc=dvyukov@google.com \
--cc=hejunhao3@huawei.com \
--cc=howardchu95@gmail.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jean-philippe.romain@foss.st.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux@treblig.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=stephen.s.brennan@oracle.com \
--cc=tmricht@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.