Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PR_SET_PTRACER to allow the minidumper child to attach to the parent #74

Open
sfackler opened this issue Sep 7, 2022 · 1 comment

Comments

@sfackler
Copy link
Member

sfackler commented Sep 7, 2022

What happened?

When running in a ptrace-restricted Linux environment, the child minidumper process isn't allowed to attach to the parent process via ptrace to perform minidump operations.

What did you want to happen?

We should use PR_SET_PTRACER when booting up the minidumper child process to allow it to trace properly.

@sfackler
Copy link
Member Author

sfackler commented Sep 8, 2022

The rstack library we use for thread dump diagnostics also uses PR_SET_PTRACER with a different child process which is a bit unfortunate. Once we use minidumps for everything we can just set the minidump child as the ptracer immediately, but for now the best option is to probably call prctl in the signal handler right before we request the dump. prctl isn't explicitly documented to be async-signal-safe, but I assume (hope?) it's just a wrapper around the raw syscall so it should be fine.

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

No branches or pull requests

1 participant