unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gazally@runbox.com, 32502@debbugs.gnu.org
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	[thread overview]
Message-ID: <87o9dqbtv5.fsf@gmx.de> (raw)
In-Reply-To: <83muteb4nb.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 22 Aug 2018 22:08:40 +0300")

[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

Hi Eli,

>> > #3 0x000000000057115b in Fsignal (error_symbol=<optimized out>,
>> > data=<optimized out>) at eval.c:1582
>> > #4 0x00000000005d5555 in post_acquire_global_lock
>> > (self=self@entry=0xc19320 <main_thread>) 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.


[-- Attachment #2: Type: text/plain, Size: 1022 bytes --]

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

  parent reply	other threads:[~2018-08-25 10:53 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22 18:19 bug#32502: 27.0.50; Tramp; C-g during asynchronous remote find-file kills Emacs Gemini Lasswell
2018-08-22 18:46 ` Eli Zaretskii
2018-08-22 19:08   ` Eli Zaretskii
2018-08-22 19:23     ` Michael Albinus
2018-08-25 10:53     ` Michael Albinus [this message]
2018-08-25 12:42       ` Eli Zaretskii
2018-08-25 15:52         ` Michael Albinus
2018-08-25 16:07           ` Eli Zaretskii
2018-08-26 13:50             ` Gemini Lasswell
2018-08-30  9:24               ` Michael Albinus
2018-08-30 13:23                 ` Eli Zaretskii
2018-08-30 13:28                   ` Michael Albinus
2018-08-25 21:53       ` Gemini Lasswell
2018-08-26 14:12         ` Eli Zaretskii
2018-08-30  7:19           ` Michael Albinus
2018-08-30 12:34             ` Michael Albinus
2018-08-29 16:01         ` Michael Albinus
2018-08-29 16:23           ` Eli Zaretskii
2018-08-29 16:46             ` Michael Albinus
2018-08-29 17:03               ` Eli Zaretskii
2018-08-29 17:15                 ` Michael Albinus
2018-08-29 20:22                   ` Michael Albinus
2018-08-29 20:57                     ` Michael Albinus
2018-08-30  2:36                       ` Eli Zaretskii
2018-08-30  7:09                         ` Michael Albinus
2018-08-30 13:18                           ` Eli Zaretskii
2018-08-30 13:32                             ` Michael Albinus
2018-08-30 13:51                               ` Eli Zaretskii
2018-08-30 13:59                                 ` Michael Albinus
2018-08-30 16:48                                   ` Michael Albinus
2018-08-30 17:44                                     ` Eli Zaretskii
2018-08-30 19:30                                       ` Michael Albinus
2018-09-02 17:58                                         ` Michael Albinus
2018-09-02 20:03                                           ` Gemini Lasswell
2018-09-02 20:50                                             ` Michael Albinus
2018-08-30 19:29                                     ` Gemini Lasswell
2018-08-30 19:37                                       ` Michael Albinus
2018-08-31  6:52                                       ` Eli Zaretskii
2018-08-31 15:07                                         ` Gemini Lasswell
2018-08-31 17:45                                           ` Eli Zaretskii
2018-08-22 21:12   ` Gemini Lasswell
2018-08-23 14:01     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9dqbtv5.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=32502@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=gazally@runbox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).