Skip to content

Visual Studio: Shutdown Sequence leaves orphan language server processes #77

Open
@chrissimon-au

Description

@chrissimon-au

Describe the bug
After closing visual Studio, there are intermittently orphan Contextive.LanguageServer.exe processes

To Reproduce
Start Visual Studio with contextive installed and open a folder with a definitions file in .contextive/definitions.yml open a file and see a hover response (to confirm extension is working). Close Visual Studio.

Check task manager and see a Contextive.LanguageServer.exe process

Expected behavior
After existing visual Studio, there should be no Contextive.LanguageServer.exe process

Desktop (please complete the following information):

  • OS: Windows

Additional context
The LSP protocol defines that clients should send a shutdown request and wait for a response, which allows the language server to clean up resources. On successful response, they should send an exit notification and allow the language server to exit itself (ideally with process exit code 0). See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#shutdown

From logs collected by @FH-Inway, we don't see any shutdown or exit messages, just a textDocument/didClose and then immediately Could not write to output handler, perhaps serialization failed? - which suggests the output pipe is disconnected - but the language server stays running.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions