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 Option to Restart Language Server After Multiple Crashes #920

Open
lihaohong6 opened this issue Sep 30, 2024 · 0 comments
Open

Add Option to Restart Language Server After Multiple Crashes #920

lihaohong6 opened this issue Sep 30, 2024 · 0 comments

Comments

@lihaohong6
Copy link

When writing a proof in proof mode, I frequently encounter this message The Coq Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information. I would then need to restart VS Code to continue using the language server.

I would assume this mechanism is designed to prevent infinite restart loops from happening. However, sometimes I won't mind the language server restarting once every 10 seconds. Is it possible to have some additional configuration to adjust this behavior? For example, vscoq would not restart the language server after it crashed 50 (instead of 5) times in the last 3 minutes. The number of retries would be an adjustable parameter.

As for language server crashes, I found that it can be reproduced by repeatedly inserting and deleting a character in proof mode in quick succession. In particular, if I repeatedly hit d and Backspace in proof mode, the language server would reach 5 crashes only after a few seconds. However, if I wait for a few seconds between each keystroke, no crash would occur. I would assume this error occurred because I set proof.mode to Continuous: if I make a change to the document when the language server is reevaluating the document, the language server would somehow crash.

Here's some more info in case they are needed:

vscoq version: v2.2.1
language server version: v2.2.1
coq version: v8.20.0

OS: Fedora 40
Frequent language server crashes also occur on a macbook, but I did not run detailed experiments on it.

Language server output:

[Error - 6:29:48 PM] Server process exited with code 0.
[Info  - 6:29:48 PM] Connection to server got closed. Server will restart.
true
[Error - 6:29:49 PM] Server process exited with code 0.
[Info  - 6:29:49 PM] Connection to server got closed. Server will restart.
true
[Error - 6:29:50 PM] Server process exited with code 0.
[Info  - 6:29:50 PM] Connection to server got closed. Server will restart.
true
[Error - 6:29:51 PM] Server process exited with code 0.
[Info  - 6:29:51 PM] Connection to server got closed. Server will restart.
true
[Error - 6:29:51 PM] Server process exited with code 0.
[Error - 6:29:51 PM] The Coq Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant