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

wait for killed nailgun processes. (Cherry-pick of #16924) #16939

Merged
merged 1 commit into from
Sep 21, 2022

Conversation

stuhood
Copy link
Member

@stuhood stuhood commented Sep 21, 2022

When a nailgun process run is cancelled, the BorrowedNailgunProcess Drop guard is supposed to kill the process, so that the next request to the pool will start a new process.

But because we weren't waiting for the process to have actually exited after receiving SIGKILL, there was a race condition where we would have sent the signal, but the process had not yet actually exited by the time the next request came along.

To fix that, we introduce a wait. Eventually, we would like this to use async-Drop instead.

Fixes #16895.

When a nailgun process run is cancelled, the `BorrowedNailgunProcess` `Drop` guard is supposed to kill the process, so that the next request to the pool will start a new process.

But because we weren't `wait`ing for the process to have actually exited after receiving `SIGKILL`, there was a race condition where we would have sent the signal, but the process had not yet actually exited by the time the next request came along.

To fix that, we introduce a `wait`. Eventually, we would like this to use async-`Drop` instead.

Fixes pantsbuild#16895.

[ci skip-build-wheels]
@stuhood stuhood added the category:bugfix Bug fixes for released features label Sep 21, 2022
@stuhood stuhood merged commit 86eedcc into pantsbuild:2.14.x Sep 21, 2022
@stuhood stuhood deleted the cherry-pick-16924-to-2.14.x branch September 21, 2022 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants