[DTrace-devel] [PATCH] Revert "dt_pid: pid grabs should be shortlived"
eugene.loh at oracle.com
eugene.loh at oracle.com
Thu May 22 18:10:16 UTC 2025
From: Eugene Loh <eugene.loh at oracle.com>
Commit 4aec5c9931eb ("dt_pid: pid grabs should be shortlived") made
grabs short-lived. No test cases show the utility of this patch.
Meanwhile, the patch causes roughly a dozen tests to fail on OL9
when the test suite is started remotely using ssh, closing ttys. The
problem is that DTrace tries to determine if a process is a "system
daemon." There is no robust way of doing so. In particular, the
test suite starts trigger processes as root and in many cases closes
all file descriptors, making such processes hard to distinguish from
system daemons.
As long as the patch causes so many test regressions -- and in the
absence of any demonstration of any benefit -- revert this patch.
Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
libdtrace/dt_pid.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libdtrace/dt_pid.c b/libdtrace/dt_pid.c
index 9abbd474c..e2d4e540d 100644
--- a/libdtrace/dt_pid.c
+++ b/libdtrace/dt_pid.c
@@ -1257,8 +1257,7 @@ dt_pid_create_pid_probes(dtrace_probedesc_t *pdp, dtrace_hdl_t *dtp, dt_pcb_t *p
return 0;
/* Grab the process. */
- if (dt_proc_grab_lock(dtp, pid, DTRACE_PROC_WAITING |
- DTRACE_PROC_SHORTLIVED) < 0) {
+ if (dt_proc_grab_lock(dtp, pid, DTRACE_PROC_WAITING) < 0) {
dt_pid_error(dtp, pcb, NULL, D_PROC_GRAB,
"failed to grab process %d", (int)pid);
return -1;
--
2.43.5
More information about the DTrace-devel
mailing list