* [PATCH] Revert "dt_pid: pid grabs should be shortlived"
@ 2025-05-22 18:10 eugene.loh
2025-06-13 14:23 ` Nick Alcock
0 siblings, 1 reply; 5+ messages in thread
From: eugene.loh @ 2025-05-22 18:10 UTC (permalink / raw)
To: dtrace, dtrace-devel
From: Eugene Loh <eugene.loh@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@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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Revert "dt_pid: pid grabs should be shortlived"
2025-05-22 18:10 [PATCH] Revert "dt_pid: pid grabs should be shortlived" eugene.loh
@ 2025-06-13 14:23 ` Nick Alcock
2025-06-13 20:12 ` [DTrace-devel] " Sam James
0 siblings, 1 reply; 5+ messages in thread
From: Nick Alcock @ 2025-06-13 14:23 UTC (permalink / raw)
To: eugene.loh; +Cc: dtrace, dtrace-devel
On 22 May 2025, eugene loh verbalised:
> From: Eugene Loh <eugene.loh@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
I think this is a consequence of another bug (Psystem_daemon() was
failing to detect that systemd was running correctly on systemd v2
systems, and we were falling back to the old approach, which is indeed
going to conclude that processes in system groups without controlling
terminals or associated TTYs are system daemons).
I have a fix for this detection failure under test now and will post it
shortly.
--
NULL && (void)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [DTrace-devel] [PATCH] Revert "dt_pid: pid grabs should be shortlived"
2025-06-13 14:23 ` Nick Alcock
@ 2025-06-13 20:12 ` Sam James
2025-06-14 22:04 ` Sam James
0 siblings, 1 reply; 5+ messages in thread
From: Sam James @ 2025-06-13 20:12 UTC (permalink / raw)
To: Nick Alcock via DTrace-devel; +Cc: eugene.loh, Nick Alcock, dtrace
Nick Alcock via DTrace-devel <dtrace-devel@oss.oracle.com> writes:
> On 22 May 2025, eugene loh verbalised:
>
>> From: Eugene Loh <eugene.loh@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
>
> I think this is a consequence of another bug (Psystem_daemon() was
> failing to detect that systemd was running correctly on systemd v2
(Do you mean cgroup v2?)
> systems, and we were falling back to the old approach, which is indeed
> going to conclude that processes in system groups without controlling
> terminals or associated TTYs are system daemons).
>
> I have a fix for this detection failure under test now and will post it
> shortly.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [DTrace-devel] [PATCH] Revert "dt_pid: pid grabs should be shortlived"
2025-06-13 20:12 ` [DTrace-devel] " Sam James
@ 2025-06-14 22:04 ` Sam James
2025-06-19 12:51 ` Nick Alcock
0 siblings, 1 reply; 5+ messages in thread
From: Sam James @ 2025-06-14 22:04 UTC (permalink / raw)
To: Sam James via DTrace-devel; +Cc: dtrace
Sam James via DTrace-devel <dtrace-devel@oss.oracle.com> writes:
> Nick Alcock via DTrace-devel <dtrace-devel@oss.oracle.com> writes:
>
>> On 22 May 2025, eugene loh verbalised:
>>
>>> From: Eugene Loh <eugene.loh@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
>>
>> I think this is a consequence of another bug (Psystem_daemon() was
>> failing to detect that systemd was running correctly on systemd v2
>
> (Do you mean cgroup v2?)
Nevermind, I see that in the patch you posted.
>
>> systems, and we were falling back to the old approach, which is indeed
>> going to conclude that processes in system groups without controlling
>> terminals or associated TTYs are system daemons).
>>
>> I have a fix for this detection failure under test now and will post it
>> shortly.
>
> _______________________________________________
> DTrace-devel mailing list
> DTrace-devel@oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/dtrace-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [DTrace-devel] [PATCH] Revert "dt_pid: pid grabs should be shortlived"
2025-06-14 22:04 ` Sam James
@ 2025-06-19 12:51 ` Nick Alcock
0 siblings, 0 replies; 5+ messages in thread
From: Nick Alcock @ 2025-06-19 12:51 UTC (permalink / raw)
To: Sam James; +Cc: dtrace-devel, dtrace
On 14 Jun 2025, Sam James outgrape:
> Sam James via DTrace-devel <dtrace-devel@oss.oracle.com> writes:
>
>> Nick Alcock via DTrace-devel <dtrace-devel@oss.oracle.com> writes:
>>
>>> On 22 May 2025, eugene loh verbalised:
>>>
>>>> From: Eugene Loh <eugene.loh@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
>>>
>>> I think this is a consequence of another bug (Psystem_daemon() was
>>> failing to detect that systemd was running correctly on systemd v2
>>
>> (Do you mean cgroup v2?)
Yes indeed. The heat and pollen is ruining my brain :/
$random_related_word v2
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-06-19 12:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22 18:10 [PATCH] Revert "dt_pid: pid grabs should be shortlived" eugene.loh
2025-06-13 14:23 ` Nick Alcock
2025-06-13 20:12 ` [DTrace-devel] " Sam James
2025-06-14 22:04 ` Sam James
2025-06-19 12:51 ` Nick Alcock
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox