haskell / haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Apache License 2.0
2.72k stars 368 forks source link

Problems with process handling? #499

Closed hasufell closed 10 months ago

hasufell commented 4 years ago

Subject of the issue

HLS doesn't seem to shut down all processes. After a while of using it in gvim I seem to have multiple HLS processes. This happens very frequently (although only one editor is opened and the by default no server is started). When I tell my client to shut down the server, only one of those processes will exit and haskell-language-server-wrapper will always remain active.

This happens with multiple clients:

To me, it's not clear what the issue is:

  1. if HLS is not supposed to spawn multiple processes
    • why does this happen across many clients? Does the server confuse them into thinking it's exited and needs to be respawned?
  2. if HLS is supposed to spawn multiple processes
    • then it seems the server doesn't correctly process the exit message
  3. it could still be all 3 clients are buggy?

Your environment

haskell-language-server version: 0.5.1.0 (GHC: 8.10.1) (PATH: /mnt/sdd2/.ghcup/bin/haskell-language-server-wrapper-0.5.1) (GIT hash: e3fe0e7546aa91e44cc56cfe8ec078a026cf533a)
Tool versions found on the $PATH
cabal:      3.4.0.0
stack:      2.3.3
ghc:        8.8.4

Steps to reproduce

Use hls for a while and observe processes, then try to issue an exit message via the client.

Expected behaviour

All processes exit.

Actual behaviour

Only one process exits.

Include debug information

I currently don't have more isolated debug info. I'll try next time it happens.

expipiplus1 commented 4 years ago

Are you able to reproduce this in coc.nvim using my port of the vscode plugin?

https://github.com/expipiplus1/vscode-hie-server/

It does have some session management functionality (pretty much the only thing it does actually).

I've been using this for a while and have not noticed this (although I haven't looked for it)

hasufell commented 4 years ago

Are you able to reproduce this in coc.nvim using my port of the vscode plugin?

I haven't tried. I try to stay away from coc.


Just now I tried to enable hls on ghcup codebase and this is what I got:

hls-processes-many

I had to kill everything, because my editor was becoming unresponsive.

hasufell commented 3 years ago

Screenshot_2021-03-01_23-26-46

With hls-1.0.0 ghc-8.10.4 on ghcup codebase (which is fairly small). This was maybe after an hour of editing.

Anton-Latukha commented 2 years ago

How is the status of it now?

michaelpj commented 10 months ago

Closing as it's old and hasn't had new reproductions.