cpython/Modules/_remote_debugging
Pablo Galindo Salgado 27434c68f8
gh-138122: Skip threads on EPERM in blocking mode profiler (GH-143368)
When using blocking mode in the remote debugging profiler, ptrace calls
to seize threads can fail with EPERM if the thread has exited between
listing and attaching, is in a special kernel state, or is already being
traced. Previously this raised a RuntimeError that was caught by the
Python sampling loop,and retried indefinitely since EPERM is
a persistent condition that will not resolve on its own.

Treat EPERM the same as ESRCH by returning 1 (skip this thread) instead
of -1 (fatal error). This allows profiling to continue with the threads
that can be traced rather than entering an endless retry loop printing
the same error message repeatedly.
2026-01-03 15:37:16 +01:00
..
clinic gh-138122: Add blocking mode for accurate stack traces in Tachyon (#142998) 2025-12-23 10:49:47 +00:00
_remote_debugging.h gh-140739: Fix crashes from corrupted remote memory (#143190) 2025-12-26 16:06:48 +00:00
asyncio.c gh-140739: Fix crashes from corrupted remote memory (#143190) 2025-12-26 16:06:48 +00:00
binary_io.h gh-138122: Extend binary profiling format with full source location and opcode (#143088) 2025-12-24 16:15:11 +00:00
binary_io_reader.c gh-138122: Extend binary profiling format with full source location and opcode (#143088) 2025-12-24 16:15:11 +00:00
binary_io_writer.c gh-140739: Fix missing exception on allocation failure in BinaryWriter (#143204) 2025-12-27 01:39:21 +00:00
code_objects.c gh-140739: Fix crashes from corrupted remote memory (#143190) 2025-12-26 16:06:48 +00:00
frame_cache.c gh-138122: Add blocking mode for accurate stack traces in Tachyon (#142998) 2025-12-23 10:49:47 +00:00
frames.c gh-140739: Fix crashes from corrupted remote memory (#143190) 2025-12-26 16:06:48 +00:00
module.c gh-138122: fix AC warnings in Modules/_remote_debugging/module.c (#143218) 2025-12-27 12:57:03 +00:00
object_reading.c gh-140739: Fix crashes from corrupted remote memory (#143190) 2025-12-26 16:06:48 +00:00
subprocess.c gh-138122: Add --subprocesses flag to profile child processes in tachyon (#142636) 2025-12-15 12:11:40 +00:00
threads.c gh-138122: Skip threads on EPERM in blocking mode profiler (GH-143368) 2026-01-03 15:37:16 +01:00