Repository navigation
Conversation
Dropping the get-sockname output future can leave the Watchman CLI running if socket discovery stalls. Enable Tokio kill-on-drop for the subprocess and exercise cancellation with a helper that otherwise stays alive.
|
This pull request has been imported. If you are a Meta employee, you can view this in D133408172. (Because this pull request was imported automatically, there will not be any future comments.) |
|
@genevievehelsel merged this pull request in 8cbd117. |
meta-codesync Bot
pushed a commit
to meta/sapling
that referenced
this pull request
Nov 20, 2026
Summary: When a caller times out during `Connector::connect()`, dropping the socket-discovery future can leave `watchman get-sockname` running. A caller that retries can leave a new helper running each time the server stalls. Enable Tokio's `kill_on_drop` for the socket-discovery command so cancellation kills the helper. The Unix regression test waits for a fake `watchman` to start, cancels discovery, and verifies that the process goes away. It times out with the original code. All nine `watchman_client` library tests and the nightly rustfmt check passed on Linux. X-link: meta/watchman#1375 Reviewed By: SBones Differential Revision: D133408172 Pulled By: genevievehelsel fbshipit-source-id: 1f8113e6c96af4f9cad2ae16311ee66c01e8c8ef
meta-codesync Bot
pushed a commit
to meta/hhvm
that referenced
this pull request
Nov 20, 2026
Summary: When a caller times out during `Connector::connect()`, dropping the socket-discovery future can leave `watchman get-sockname` running. A caller that retries can leave a new helper running each time the server stalls. Enable Tokio's `kill_on_drop` for the socket-discovery command so cancellation kills the helper. The Unix regression test waits for a fake `watchman` to start, cancels discovery, and verifies that the process goes away. It times out with the original code. All nine `watchman_client` library tests and the nightly rustfmt check passed on Linux. X-link: meta/watchman#1375 Reviewed By: SBones Differential Revision: D133408172 Pulled By: genevievehelsel fbshipit-source-id: 1f8113e6c96af4f9cad2ae16311ee66c01e8c8ef
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.
When a caller times out during
Connector::connect(), dropping the socket-discovery future can leavewatchman get-socknamerunning. A caller that retries can leave a new helper running each time the server stalls.Enable Tokio's
kill_on_dropfor the socket-discovery command so cancellation kills the helper. The Unix regression test waits for a fakewatchmanto start, cancels discovery, and verifies that the process goes away. It times out with the original code.All nine
watchman_clientlibrary tests and the nightly rustfmt check passed on Linux.