From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#45117: 28.0.50; process-send-string mysteriously exiting non-locally when called from timer Date: Tue, 08 Dec 2020 19:01:18 +0200 Message-ID: <83360g6xlt.fsf@gnu.org> References: <87h7ow4j4o.fsf@gmail.com> <83mtyo71dh.fsf@gnu.org> <877dps47ge.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27432"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45117@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 08 18:25:28 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmgjv-00072J-H8 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 18:25:27 +0100 Original-Received: from localhost ([::1]:45812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmgju-0005vi-Ie for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 12:25:26 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmgNG-0002H5-Jq for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 12:02:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kmgNG-0004Hx-Ad for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 12:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kmgNG-0006lN-7e for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 12:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2020 17:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45117 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160744689224468 (code B ref -1); Tue, 08 Dec 2020 17:02:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Dec 2020 17:01:32 +0000 Original-Received: from localhost ([127.0.0.1]:59418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmgMl-0006M3-BJ for submit@debbugs.gnu.org; Tue, 08 Dec 2020 12:01:31 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:49434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmgMj-0006K8-Ej for submit@debbugs.gnu.org; Tue, 08 Dec 2020 12:01:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmgMh-0001fO-Hx for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2020 12:01:29 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54352) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmgMh-000468-9g; Tue, 08 Dec 2020 12:01:27 -0500 Original-Received: from [176.228.60.248] (port=3104 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kmgMe-0004t9-RX; Tue, 08 Dec 2020 12:01:26 -0500 In-Reply-To: <877dps47ge.fsf@gmail.com> (message from =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= on Tue, 08 Dec 2020 15:56:49 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:195399 Archived-At: > From: João Távora > Cc: bug-gnu-emacs@gnu.org > Date: Tue, 08 Dec 2020 15:56:49 +0000 > > > Can you elaborate on the evidence you found of this non-local exit? > > It was evidenced by M-x trace-function process-send-string RET and also > by substituting the snippet I posted earlier with: > > (unwind-protect > (progn > (sly-send `(:emacs-rex ,form ,package ,thread ,id ,@extra-options)) > (setq send-success t)) > (if send-success > (push (cons id continuation) (sly-rex-continuations)) > (sly-message > "[issue#385] likely `process-send-string' exited non-locally from timer.") > (sly-log-event `(:issue-385-sly-send-fishiness :id ,id > :form > ,form ) > sly-dispatching-connection))) > > Once in a while, the else branch of the if triggered. > > Anyway, here's an observation: > > 1 -> (process-send-string # "00044d(:emacs-rex > (slynk:autodoc (quote (\"defpackage\" \":slynk\" (\":use\" \":cl\" > \":slynk-backend\" \":slynk-match\" \":slynk-rpc\") (\":export\" > \"#:startup-multiprocessing\" \"#:start-server\" \"#:create-server\" > \"#:stop-server\" \"#:restart-server\" \"#:ed-in-emacs\" > \"#:inspect-in-emacs\" \"#:print-indentation-lossage\" > \"#:invoke-sly-debugger\" \"#:slynk-debugger-hook\" \"#:emacs-inspect\" > \"#:authenticate-client\" \"#:*loopback-interface*\" > \"#:*buffer-readtable*\" \"#:process-requests\") (\":export\" > \"#:*communication-style*\" \"#:*dont-close*\" > \"#:*fasl-pathname-function*\" \"#:*log-events*\" \"#:*log-output*\" > \"#:*configure-emacs-indentation*\" \"#:*readtable-alist*\" > \"#:*global-debugger*\" \"#:*sly-db-quit-restart*\" > \"#:*backtrace-printer-bindings*\" > \"#:*default-worker-thread-bindings*\" > \"#:*macroexpand-printer-bindings*\" \"#:*slynk-pprint-bindings*\" > \"#:*string-elision-length*\" \"#:*inspector-verbose*\" > \"#:*require-module*\" \"#:*eval-for-emacs-wrappers*\" > \"#:*debugger-extra-options*\" \"#:*globally-redirect-io*\" > \"#:*use-dedicated-output-stream*\" \"#:*dedicated-output-stream-port*\" > slynk::%cursor-marker%))) :print-right-margin 80) \":slynk\" t 100) ") 1 > <- process-send-string: !non-local\ exit! Then my suggestion is to run this under GDB with a breakpoint on the few places we call sys_longjmp, and when it breaks, show the C and Lisp backtrace from there.