Linux Trace Development
 help / color / mirror / Atom feed
* [PATCH 0/3] libtracefs utest: Fix trace cpu pipe and test_mem failures
@ 2026-11-18 13:30 Frank Heimes
  2026-11-18 13:30 ` [PATCH 1/3] libtracefs utest: Scale trace cpu pipe test to the sub-buffer size Frank Heimes
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Frank Heimes @ 2026-11-18 13:30 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Steven Rostedt, Benjamin Drung, Jamie Dolan

These fix unit test failures reported here:

  https://lore.kernel.org/linux-trace-devel/39efe87bec205b7f809b8aa49db635b6465ee530.camel@canonical.com/

 - Patch 1: on architectures with 64K pages (ppc64el), the large step of
   "trace cpu pipe" writes more than 13 GB into /tmp with the memory
   mapped buffer, which fails with ENOSPC on a tmpfs /tmp.

 - Patch 2: "make test_mem" hangs in "trace pid events filter", as the
   spinning threads starve the main thread under valgrind.

 - Patch 3: "trace cpu pipe" fails under valgrind when the memory mapped
   reader can not keep up and the kernel overwrites events.

The patches are independent of each other. I can also send them
separately, if that's preferred.

Related fixes for the same report:

 - kbuffer: Fix out-of-bounds write in kbuffer_read_buffer()
   https://lore.kernel.org/linux-trace-devel/cover.1794988946.git.frank.heimes@canonical.com/T/#u
 - libtracefs: Do not miss sub-buffers when reading a memory mapped buffer
   https://lore.kernel.org/linux-trace-devel/20261118102644.3392133-1-frank.heimes@canonical.com/T/#u
 - libtracefs utest: Fix buffer size in follow events clear test
   https://lore.kernel.org/linux-trace-devel/20261116235650.21314-1-jldolan@us.ibm.com/

Tested on ppc64el (POWER9, 64K pages, kernel 7.3) on top of master,
together with the related fixes above: "trace cpu pipe" passes in "make
test" and "make test_mem", and "make test_mem" no longer hangs.

Frank Heimes (3):
  libtracefs utest: Scale trace cpu pipe test to the sub-buffer size
  libtracefs utest: Run valgrind memory test with fair scheduling
  libtracefs utest: Account for overruns in the trace cpu pipe test

 Makefile              |  1 +
 utest/tracefs-utest.c | 42 ++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 41 insertions(+), 2 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-18 13:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 13:30 [PATCH 0/3] libtracefs utest: Fix trace cpu pipe and test_mem failures Frank Heimes
2026-11-18 13:30 ` [PATCH 1/3] libtracefs utest: Scale trace cpu pipe test to the sub-buffer size Frank Heimes
2026-11-18 13:30 ` [PATCH 2/3] libtracefs utest: Run valgrind memory test with fair scheduling Frank Heimes
2026-11-18 13:30 ` [PATCH 3/3] libtracefs utest: Account for overruns in the trace cpu pipe test Frank Heimes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox