Repository navigation
sensor/ptrace fix: don't re-inject kernel-generated SIGSTOPs into tracees - #200
Merged
Merged
Conversation
…cees The collect loop re-injected every non-SIGTRAP stop signal on resume, including the SIGSTOP the kernel queues on a freshly auto-attached thread (PTRACE_O_TRACECLONE). Delivering it puts the whole thread group into a group-stop. Traced threads get resumed by the next PTRACE_SYSCALL, but untraced kernel threads in the group (io_uring iou-sqp-*/iou-wrk-* used by Node.js/libuv) stay stopped forever, so the app never starts listening and the HTTP probe fails or hangs. Use PTRACE_GETSIGINFO to tell a real stop signal (sent via kill) from the auto-attach SIGSTOP and group-stop notifications, and only inject the real one. Also resume the stopped tracee after a syscall handler error instead of the previous pid, and finish collection on wait4 ECHILD instead of spinning. Fixes the hang with ghcr.io/iximiuz/labs/mintoolkit/nuxt-web-app:v1.0.0. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Reviewed by free · Input: 66.5K · Output: 23.7K · Cached: 337.3K |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The collect loop re-injected every non-SIGTRAP stop signal on resume, including the SIGSTOP the kernel queues on a freshly auto-attached thread (PTRACE_O_TRACECLONE). Delivering it puts the whole thread group into a group-stop. Traced threads get resumed by the next PTRACE_SYSCALL, but untraced kernel threads in the group (io_uring iou-sqp-/iou-wrk- used by Node.js/libuv) stay stopped forever, so the app never starts listening, and the HTTP probe fails or hangs.
Use PTRACE_GETSIGINFO to tell a real stop signal (sent via kill) from the auto-attach SIGSTOP and group-stop notifications, and only inject the real one. Also resume the stopped tracee after a syscall handler error instead of the previous pid, and finish collection on wait4 ECHILD instead of spinning.
Fixes the hang with ghcr.io/iximiuz/labs/mintoolkit/nuxt-web-app:v1.0.0.