Skip to content

handle ESRCH in more ptrace callsites#91

Merged
jackyzha0 merged 2 commits intomainfrom
jackyzha0/ptrace-esrch
Sep 23, 2025
Merged

handle ESRCH in more ptrace callsites#91
jackyzha0 merged 2 commits intomainfrom
jackyzha0/ptrace-esrch

Conversation

@jackyzha0
Copy link
Member

@jackyzha0 jackyzha0 commented Sep 23, 2025

we are seeing processes exit with the following:

run process: run_parent03:44
Caused by:03:44
    0: handle_syscall pid=11203:44
    1: get_target_path03:44
    2: ptrace::getregs03:44
    3: ESRCH: No such process

a traced process can exit at any time so any ptrace calls that operate on the pid must check esrch to see if the traced process has exited and handle it appropriately

we already do it in a bunch of places but do it in more

Copy link

@ryantm ryantm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks very straightforward and likely to fix this issue.

🤞

@jackyzha0 jackyzha0 merged commit f243789 into main Sep 23, 2025
9 checks passed
@jackyzha0 jackyzha0 deleted the jackyzha0/ptrace-esrch branch September 23, 2025 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants