[llvm-exegesis] Fix race condition in subprocess mode (#72778)
If there were some scheduler effects where something like the parent process got interrupted while the child process continued to run, there would be nothing blocking it from exiting before the parent process issued a PTRACE_ATTACH call. This would cause transient failures as this occurred pretty rarely. This patch removes the possibility of a transient failure by ensuring that the parent process attaches to the child process before sending the counter file descriptor through the socket, ensuring that the child process has at most progressed to being blocked in the read call for the counter file descriptor.
Loading
Please sign in to comment