Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Tye cannot shutdown with executable service #1128

Closed
philliphoff opened this issue Jul 21, 2021 · 1 comment · Fixed by #1132
Closed

Tye cannot shutdown with executable service #1128

philliphoff opened this issue Jul 21, 2021 · 1 comment · Fixed by #1132
Assignees
Labels
bug Something isn't working

Comments

@philliphoff
Copy link
Contributor

When an "executable" service is part of the application, Tye can't shutdown. This occurs at least within a VS Code Dev Container, with a Node.js based service, but perhaps occurs elsewhere. This happens both when using Ctrl+C from the terminal as well as when using Tye's shutdown command on its control plane. Tye shuts down everything else, but seems to be stuck waiting for that service to stop.

@philliphoff philliphoff added the bug Something isn't working label Jul 21, 2021
@philliphoff
Copy link
Contributor Author

Debugging notes: this seems to be a hang at a Process.WaitForExit() call when shutting down processes. In particular, I see this with dapr.exe processes, but only on Windows and Linux, but not Mac. (I've seen some issues when browsing the .NET runtime repos that seem related, where processes that themselves run long-running processes that redirect output (such as dapr.exe which runs daprd.exe) can sometimes not read to the EOF, which causes the wait to be indefinite.).

Since these are expected to be long running processes and we're typically not concerned with capturing all of its output--that is, it's probably ok for some output to be lost on shutdown, since Tye is shutting down anyway, we might instead just call Process.WaitForProcessExit(timeout) for some suitable timeout as an immediate fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants