all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Gemini Lasswell <gazally@runbox.com>
Cc: 32487@debbugs.gnu.org
Subject: bug#32487: 26.1.50; keyboard-quit while main thread blocked crashes Emacs
Date: Tue, 21 Aug 2018 18:22:19 +0300	[thread overview]
Message-ID: <83o9dvd9sk.fsf@gnu.org> (raw)
In-Reply-To: <876004r6ij.fsf@runbox.com> (message from Gemini Lasswell on Mon,  20 Aug 2018 15:57:08 -0700)

> From: Gemini Lasswell <gazally@runbox.com>
> Date: Mon, 20 Aug 2018 15:57:08 -0700
> 
> In both emacs-26 and master, it's possible to hang or crash Emacs with
> Lisp code which uses threads and is buggy in ways which cause the main
> thread to be blocked, combined with keyboard-quit.

That's ample punishment for a buggy program, don't you think?

> To reproduce, copy the code listed below into a buffer and evaluate it
> (with emacs -Q if you wish).  Then choose one of:
> 
> M-x my-hang-1 RET
> M-x my-hang-2 RET
> M-x my-hang-3 RET
> 
> Result: Emacs will stop responding to keyboard input.  Repeated use of
> C-g will do nothing when running under X11 and will cause Emacs to crash
> when running in a terminal.

Doing nothing is fine when a program is buggy.

On a TTY, the 1st and the 3rd example are not crashes: they are the
"emergency escape" feature of Emacs.  You can read about it in the
manual.  It is triggered when more than one C-g is pressed without
Emacs being able to process the first one.  Due to the way we process
input nowadays, you cannot see this in action except on a Unix TTY,
where C-g triggers a SIGINT.

The 2nd example seems to be caused by a non-main thread entering
redisplay (I think).  Or something like that.





  reply	other threads:[~2018-08-21 15:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-20 22:57 bug#32487: 26.1.50; keyboard-quit while main thread blocked crashes Emacs Gemini Lasswell
2018-08-21 15:22 ` Eli Zaretskii [this message]
2018-08-22 14:39   ` Gemini Lasswell
2018-08-22 15:06     ` 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

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

  git send-email \
    --in-reply-to=83o9dvd9sk.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=32487@debbugs.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.