From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#32502: 27.0.50; Tramp; C-g during asynchronous remote find-file kills Emacs Date: Sat, 25 Aug 2018 12:53:02 +0200 Message-ID: <87o9dqbtv5.fsf@gmx.de> References: <87mutep8ll.fsf@runbox.com> <83o9dub5nx.fsf@gnu.org> <83muteb4nb.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1535195347 4056 195.159.176.226 (25 Aug 2018 11:09:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 25 Aug 2018 11:09:07 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: gazally@runbox.com, 32502@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 25 13:09:03 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ftWRB-0000ui-ML for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Aug 2018 13:09:01 +0200 Original-Received: from localhost ([::1]:45363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ftWTH-0002l7-Un for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Aug 2018 07:11:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ftWRm-0000T9-7D for bug-gnu-emacs@gnu.org; Sat, 25 Aug 2018 07:09:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ftWCg-00077I-Cs for bug-gnu-emacs@gnu.org; Sat, 25 Aug 2018 06:54:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55211) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ftWCg-00077C-84 for bug-gnu-emacs@gnu.org; Sat, 25 Aug 2018 06:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ftWCg-0004Ru-3E for bug-gnu-emacs@gnu.org; Sat, 25 Aug 2018 06:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Aug 2018 10:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32502 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32502-submit@debbugs.gnu.org id=B32502.153519439417045 (code B ref 32502); Sat, 25 Aug 2018 10:54:02 +0000 Original-Received: (at 32502) by debbugs.gnu.org; 25 Aug 2018 10:53:14 +0000 Original-Received: from localhost ([127.0.0.1]:60229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ftWBu-0004Qr-IQ for submit@debbugs.gnu.org; Sat, 25 Aug 2018 06:53:14 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:44581) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ftWBs-0004Qd-6Q for 32502@debbugs.gnu.org; Sat, 25 Aug 2018 06:53:12 -0400 Original-Received: from detlef.gmx.de ([213.220.149.148]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M2cDB-1fcwi51T1R-00sJn4; Sat, 25 Aug 2018 12:53:04 +0200 In-Reply-To: <83muteb4nb.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 22 Aug 2018 22:08:40 +0300") X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4Kz+qu+a1M0= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:149742 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: Hi Eli, >> > #3 0x000000000057115b in Fsignal (error_symbol=, >> > data=) at eval.c:1582 >> > #4 0x00000000005d5555 in post_acquire_global_lock >> > (self=self@entry=0xc19320 ) at thread.c:93 >> >> And in frame #4, what is current_thread->error_symbol? > > Michael, unless I'm missing something, it sounds like Tramp signals > the main thread in this scenario. (current_thread->error_symbol is > only set by thread-signal.) Is that really necessary? If so, can you > describe why you needed to signal the main thread, while it was > waiting for input? Tramp propagates all signals to the main thread, otherwise they are not visible. But this might be problematic for the quit signal. I could not reproduce the problem myself, but this was said already by Gemini that it isn't easy. The following patch does not propagate the quit (and debug) signals do the main thread. Does it help? However, if we apply this I don't know how to quit (let's say) 250 threads. One quit signal is good for one thread only. I believe we need also a mechanism to quit many threads at once. Best regards, Michael. --=-=-= Content-Type: text/plain Content-Disposition: attachment diff --git a/lisp/tramp.el b/lisp/tramp.el index c913640e..3a09674c 100644 --- a/lisp/tramp.el +++ b/lisp/tramp.el @@ -2342,8 +2342,9 @@ If Emacs is compiled --with-threads, the body is protected by a mutex." (tramp-message v 1 "Interrupt received in operation %s" (cons operation args))) - ;; Propagate the quit signal. - (tramp-compat-signal (car err) (cdr err))) + ;; Propagate the signal. We do not want this + ;; to go to the main thread. + (signal (car err) (cdr err))) ;; When we are in completion mode, some failed ;; operations shall return at least a default @@ -2361,7 +2362,7 @@ If Emacs is compiled --with-threads, the body is protected by a mutex." (memq operation '(expand-file-name file-name-as-directory))) filename) - ;; Propagate the error. + ;; Propagate the error to the main thread. (t (tramp-compat-signal (car err) (cdr err)))))) ;; Nothing to do for us. However, since we are in --=-=-=--