X-Loop: help-debbugs@HIDDEN Subject: bug#70522: 29.2.50; eglot-shutdown sends SIGKILL before LSP server can exit gracefully Resent-From: Aaron Zeng <azeng@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 22 Apr 2024 21:41:02 +0000 Resent-Message-ID: <handler.70522.B.171382205116787 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 70522 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 70522 <at> debbugs.gnu.org Cc: app-emacs-dev <app-emacs-dev@HIDDEN> X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.171382205116787 (code B ref -1); Mon, 22 Apr 2024 21:41:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Apr 2024 21:40:51 +0000 Received: from localhost ([127.0.0.1]:48024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rz1P5-0004MJ-RV for submit <at> debbugs.gnu.org; Mon, 22 Apr 2024 17:40:50 -0400 Received: from lists.gnu.org ([2001:470:142::17]:42086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <azeng@HIDDEN>) id 1rz1P0-0004Kf-Q7 for submit <at> debbugs.gnu.org; Mon, 22 Apr 2024 17:40:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <azeng@HIDDEN>) id 1rz1Oa-0006en-Nl for bug-gnu-emacs@HIDDEN; Mon, 22 Apr 2024 17:40:17 -0400 Received: from mxout1.mail.janestreet.com ([38.105.200.78]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <azeng@HIDDEN>) id 1rz1OX-00033Q-Ht for bug-gnu-emacs@HIDDEN; Mon, 22 Apr 2024 17:40:15 -0400 Received: from mail-lj1-f200.google.com ([209.85.208.200]) by mxgoog2.mail.janestreet.com with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) (Exim 4.97.1) id 1rz1OV-00000006O3U-3ldb for bug-gnu-emacs@HIDDEN; Mon, 22 Apr 2024 17:40:11 -0400 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2d9ebfd9170so45023431fa.0 for <bug-gnu-emacs@HIDDEN>; Mon, 22 Apr 2024 14:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; t=1713822009; x=1714426809; darn=gnu.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=/+JCE2vW+pNPwoNjSbx/SM+UyFYrY+/W8UpFKdgS1xc=; b=L/2e0cXWHm1uMOprjmmPagjtmCrzIq+7UBlUtDkGLx2i5mN4phc2xpDOV5rvYWZU0m N5GOrAgNHOgimJUrbMLNl0zC6+i+0eM4boFcst0Ql1UemJWdaCSW0iitIU2hMofSqXck 7oEn94FRaDM2axg2sBBhpXmJUwtzwtu7xIAx0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1713822011; bh=/+JCE2vW+pNPwoNjSbx/SM+UyFYrY+/W8UpFKdgS1xc=; h=From:Date:Subject:To:Cc; b=27NCkj2My60DM71wcKqMoYCA1S78sQIZKHzLL9AJ2DgN98N2w3V92+JugsZpmjS7H WsCUOvbdJbRaUHgyvA5KJkkgxJ724olRSGQToYNSfXpIsO82Ho13azIr2oqrPA1hfA iGyquckSy2oMJjjoSspEJNlV2JcaU2gp2JsD4N3z5Rz4xbkiygrylXf7KJT7JU/DUB JSQUp0oE2A4bftsTATHSgE7vlbKYmfKwlZTgiq3TZIjaEjNHAaZTWKA0cVRdMK8zF1 dMVmScwpCVREWTy8OC+Rw2Px1u6tdo+6l6I3TXDHu8eiYE/4E299jct4MSuTgRKukh gdajiGaN1VQ4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713822009; x=1714426809; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/+JCE2vW+pNPwoNjSbx/SM+UyFYrY+/W8UpFKdgS1xc=; b=PNLO8aRX9kLqo65JMInxlzfC+mNbqetCS1h/7T4C/YIh6fbt8cFaXUgLPJs0vjv83u +D5ZEr/JkNIeOFEYTCmsOaZ+T0dA0P/oxSFEqYs2D0skmXDDRvBQFbGSRNsDHUnDgf2x Mye06mVyLtrSsB/OFQlswkvVRbTsrtMaCcPRljQgqRmUulQ9gZQRlmhehzyZ3INTIzkk 2M4AJttyrHan61J/VXytQtJte0B5MlCX7R86k6sTzDlXsFiTElEecdTI5LHgjTrC+vYm vRWo2JtwsnoWoWwghtnGY+ePURlD1t+qSG+dFWkX15uE9ocmi9vig5ciQ3gR/4YNGPHP KAtA== X-Gm-Message-State: AOJu0YzBx1pRAPsLodgHJdsneCPLGDKxh3V/3MSKoyInVKApXCVaXj5O iGKlFcXuDtcJS3LdsFs2EEGEn6XrktuVZRkqNXKoA/oahWlRK2rM6HYvHfF+ZeZq9co17ZZg5se eq7uvLDGs2uMLCLhbr9F28EQOonSCGv7XbixMaxby4SQ+1L3O8kxzziNf2We5ARTIiUfgRGUgZa 7LLqDqt7ChtcAnunRixGrSrkiuz8pvJ9rt61E= X-Received: by 2002:a05:651c:446:b0:2d8:36f9:67af with SMTP id g6-20020a05651c044600b002d836f967afmr9481359ljg.44.1713822009524; Mon, 22 Apr 2024 14:40:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHoRy1XkRBUD+msDdsW4OMmN5OkKzHmLXfmwEzyEJPiU7z+OaxgqMeUn4Hc3LNWT2VLgifb64t0wKL2tgQOCkU= X-Received: by 2002:a05:651c:446:b0:2d8:36f9:67af with SMTP id g6-20020a05651c044600b002d836f967afmr9481355ljg.44.1713822009168; Mon, 22 Apr 2024 14:40:09 -0700 (PDT) MIME-Version: 1.0 From: Aaron Zeng <azeng@HIDDEN> Date: Mon, 22 Apr 2024 17:39:32 -0400 Message-ID: <CAB7SQMGS4KuAEx4RH6452c0yrOoQAQCxW=QTvcKgyyB0UvCg9w@HIDDEN> Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=38.105.200.78; envelope-from=azeng@HIDDEN; helo=mxout1.mail.janestreet.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) 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))) In GNU Emacs 29.2.50 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.15.12, Xaw scroll bars) of 2024-04-15 built on psr-qws-hydra382 Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Rocky Linux 8.9 (Green Obsidian) Configured using: 'configure --config-cache --with-x-toolkit=lucid --without-gpm --without-gconf --without-selinux --without-imagemagick --with-modules --with-gif=no --with-cairo --with-rsvg --without-compress-install --prefix=/j/office/app/emacs/store/20240415-155142' Configured features: CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM LUCID ZLIB Important settings: value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo x-toolkit xinput2 x multi-tty make-network-process emacs) Memory information: ((conses 16 38416 8673) (symbols 48 5185 0) (strings 32 14033 2273) (string-bytes 1 396649) (vectors 16 10266) (vector-slots 8 156275 9779) (floats 8 40 13) (intervals 56 253 0) (buffers 976 10))
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Aaron Zeng <azeng@HIDDEN> Subject: bug#70522: Acknowledgement (29.2.50; eglot-shutdown sends SIGKILL before LSP server can exit gracefully) Message-ID: <handler.70522.B.171382205116787.ack <at> debbugs.gnu.org> References: <CAB7SQMGS4KuAEx4RH6452c0yrOoQAQCxW=QTvcKgyyB0UvCg9w@HIDDEN> X-Gnu-PR-Message: ack 70522 X-Gnu-PR-Package: emacs Reply-To: 70522 <at> debbugs.gnu.org Date: Mon, 22 Apr 2024 21:41:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 70522 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 70522: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D70522 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.