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

Add a heartbeat/keep-alive to detect orphaned cpptools processes #7262

Closed
Colengms opened this issue Mar 31, 2021 · 2 comments
Closed

Add a heartbeat/keep-alive to detect orphaned cpptools processes #7262

Colengms opened this issue Mar 31, 2021 · 2 comments
Assignees
Milestone

Comments

@Colengms
Copy link
Collaborator

Breaking this out of #5316 , as it's not entirely clear that making this change would address that issue.

Opening this to track adding a heartbeat or keep-alive in cpptools. In a separate thread, cpptools would send a message to the TypeScript side. The TypeScript side, if present, would send a response immediately when receiving it. In another separate thread in cpptools, it would check to see if a response had been received (by the main thread), using a timeout. If that timeout was exceeded, it would assume that either the TypeScript side is not present or the main thread has not been able to process message, and would kill the process.

@Colengms Colengms added this to the 1.4.0 milestone Mar 31, 2021
@Colengms Colengms self-assigned this Mar 31, 2021
@Colengms
Copy link
Collaborator Author

Colengms commented Apr 1, 2021

The response timeout needs to be sufficiently long to include any valid amount of time spent processing a single message in the message handler. That would include cases in which some operations pause to wait for a TU creation to complete (so should include maximum acceptable TU creation time). Otherwise, existing perf issues will be transformed into apparent crash issues, as cpptools will go missing.

@sean-mcmanus
Copy link
Collaborator

I think the keep-alive should be checked in a completely separate thread from any thread that can get blocked on an IntelliSense operation.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants