[DTrace-devel] [PATCH 0/7] libproc and consume-related test fixes

Nick Alcock nick.alcock at oracle.com
Wed Mar 20 14:15:30 UTC 2024


These patches largely fix one test, test/unittest/proc/tst.self-grab.sh,
when that test is invoked under DTRACE_DEBUG=t to slow it down.

This widens races in DTrace and induces a number of libproc problems which
are otherwise invisible but present (patches 1 -- 5) while also showing up a
problem with buffer consumption under extreme probe load (patch 6). A couple
of new tests are added accordingly (one of which is just like
tst.self-grab.sh but with DTRACE_DEBUG=t set and its output thrown away,
which is just as good at inducing these bugs as it is when recording the
output).

The libproc fixes change timings a bit, and make it possible for runtest.sh
to spot a trigger coredumping from an assertion failure: the last commit
fixes that.

All tests pass on OL7/8/9 x86_64 and my rather more limited OL8 aarch64
testing.

Nick Alcock (7):
  libproc: fix mispositioned Pwait()
  libproc: non-ptraceable processes are not dead
  libproc: fix Ptrace() error returns
  libproc: detect dead process faster when updating maps
  proc: improve armouring against self-grabs
  consume: consume only one gulp of buffer data
  test: fix two return tests to not cause trigger buffer overruns

 libdtrace/dt_consume.c                        | 88 +++++++++----------
 libdtrace/dt_proc.c                           | 10 +--
 libproc/Pcontrol.c                            | 29 +++++-
 libproc/Psymtab.c                             | 10 ++-
 libproc/libproc.h                             |  1 +
 libproc/rtld_db.c                             |  2 -
 test/unittest/begin/tst.begin-starvation.sh   | 33 +++++++
 test/unittest/fbtprovider/tst.return1.d       |  7 +-
 test/unittest/proc/tst.self-grab.sh           |  3 +-
 ...tst.self-grab.sh => tst.slow-self-grab.sh} |  6 +-
 test/unittest/syscall/tst.return_args.d       |  5 +-
 11 files changed, 129 insertions(+), 65 deletions(-)
 create mode 100755 test/unittest/begin/tst.begin-starvation.sh
 copy test/unittest/proc/{tst.self-grab.sh => tst.slow-self-grab.sh} (69%)

-- 
2.44.0.273.ge0bd14271f




More information about the DTrace-devel mailing list