Skip to content

Handle exits that internal waits run into during a record step - #4150

Open
Keno wants to merge 1 commit into
rr-debugger:masterfrom
ChronitonAI:execve-collected-exit-stop
Open

Keno wants to merge 1 commit into
rr-debugger:masterfrom
ChronitonAI:execve-collected-exit-stop

Conversation

@Keno

@Keno Keno commented Nov 5, 2026

Copy link
Copy Markdown
Member

[Patch and test by AI based on human suggestion in review of a previous revision - part of the same series as #4147]

When an internal wait while we processed a stop, or the check that resume_execution() makes before resuming the tracee, collected the tracee's PTRACE_EVENT_EXIT stop, we left that stop for the scheduler. While a thread group is in execve the scheduler only waits for new statuses, so recording hung when the exec's SIGKILL reached a thread while we advanced it through the syscallbuf to the desched disarm after its desched'd read returned, or when the exec'ing thread was SIGKILLed while we processed its execve entry. Handle the exit in the same step, as we already did after handle_signal_event(), and add a kill point after the execve's syscall-entry stop to test the latter.

Tests: exec_after_waking_readers, exec_killed_after_entry.

When an internal wait while we processed a stop, or the check that
resume_execution() makes before resuming the tracee, collected the
tracee's PTRACE_EVENT_EXIT stop, we left that stop for the scheduler.
While a thread group is in execve the scheduler only waits for new
statuses, so recording hung when the exec's SIGKILL reached a thread
while we advanced it through the syscallbuf to the desched disarm after
its desched'd read returned, or when the exec'ing thread was SIGKILLed
while we processed its execve entry. Handle the exit in the same step,
as we already did after handle_signal_event(), and add a kill point
after the execve's syscall-entry stop to test the latter.

Tests: exec_after_waking_readers, exec_killed_after_entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant