On 6/4/26 14:49, Christian Brauner wrote:
> On 2026-06-03 15:54 +0200, David Hildenbrand (Arm) wrote:
>>> However, the exited-leader case is a real limitation for profilers.
>>> OpenTelemetry eBPF Profiler wants to profile a process where the main thread
>>> has exited but secondary threads are still running [2].
>>> [2] https://github.com/open-telemetry/opentelemetry-ebpf-profiler/pull/376
>>>
>>> Using plain TIDs (flags=0) would work, but it means users cannot use
>>> PROCESS_VM_PIDFD in this scenario.
>>>
>>> What do you think this patch should do? I see two options:
>>>  - Address this limitation in a separate future patch that fixes
>>>    pidfd_get_task() to use PIDTYPE_PID when PIDFD_THREAD is detected in
>>>    f_flags, benefiting all callers (process_vm_readv, process_madvise,
>>>    and any future users).
>>
>> Extending it consistently for that scenario seems like the right thing to do?
>> @Christian?
> 
> Yes, but I cannot vouch whether the mm operations deal correctively with
> subthreads.
> 

I'd think so, but I could give it a detailed look when reviewing a patch :)

-- 
Cheers,

David

Reply via email to