GNU bug report logs -
#70522
29.2.50; eglot-shutdown sends SIGKILL before LSP server can exit gracefully
Previous Next
Reported by: Aaron Zeng <azeng <at> janestreet.com>
Date: Mon, 22 Apr 2024 21:41:02 UTC
Severity: normal
Found in version 29.2.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Cc: app-emacs-dev <app-emacs-dev <at> janestreet.com>
> From: Aaron Zeng <azeng <at> janestreet.com>
> Date: Mon, 22 Apr 2024 17:39:32 -0400
>
> 1. emacs -Q
> 2. M-x eglot in some file (I tested with OCaml-LSP and another language
> server, the latter is internal to my site)
> 3. M-x eglot-shutdown
>
> This messages:
>
> [jsonrpc] Server exited with status 9
>
> Which is a little confusing. One would expect the language server to
> exit with status 0, and not end up with "killed" in the events buffer,
> if the server exited successfully upon user request.
>
> I installed the following patch locally at my site, and it seems to fix
> the issue (now the server exits with status 0). I think it also better
> matches the docstring of `jsonrpc-shutdown'.
>
> diff --git a/jsonrpc.el b/jsonrpc.el
> --- a/jsonrpc.el
> +++ b/jsonrpc.el
> @@ -598,8 +598,8 @@ With optional CLEANUP, kill any associat
> while (not (process-get proc 'jsonrpc-sentinel-cleanup-started))
> unless (zerop i) do
> (jsonrpc--warn "Sentinel for %s still hasn't run, deleting it!" proc)
> + (delete-process proc)
> do
> - (delete-process proc)
> (accept-process-output nil 0.1))
> (when cleanup
> (kill-buffer (process-buffer (jsonrpc--process conn)))
Thanks.
Daniel, could you please look into this issue?
This bug report was last modified 1 year and 26 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.