Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-138122: Skip threads on EPERM in blocking mode profiler#143368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ambv merged 1 commit intopython:mainfrompablogsal:stop-perm
Jan 3, 2026

Conversation

@pablogsal
Copy link
Member

@pablogsalpablogsal commentedJan 2, 2026
edited by bedevere-appbot
Loading

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.

When using blocking mode in the remote debugging profiler, ptrace callsto seize threads can fail with EPERM if the thread has exited betweenlisting and attaching, is in a special kernel state, or is already beingtraced. Previously this raised a RuntimeError that was caught by thePython sampling loop,and retried indefinitely since EPERM isa persistent condition that will not resolve on its own.Treat EPERM the same as ESRCH by returning 1 (skip this thread) insteadof -1 (fatal error). This allows profiling to continue with the threadsthat can be traced rather than entering an endless retry loop printingthe same error message repeatedly.
@ambvambv merged commit27434c6 intopython:mainJan 3, 2026
46 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

type-bugAn unexpected behavior, bug, or error

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@pablogsal@ambv

[8]ページ先頭

©2009-2026 Movatter.jp