GNU bug report logs -
#37892
27.0.50; Crash when signaling a thread
Previous Next
Reported by: Michał Krzywkowski <mkrzywkow <at> gmail.com>
Date: Wed, 23 Oct 2019 17:08:02 UTC
Severity: normal
Found in version 27.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Michał Krzywkowski <mkrzywkow <at> gmail.com>
> Cc: Michał Krzywkowski <mkrzywkow <at> gmail.com>,
> 37892 <at> debbugs.gnu.org
> Date: Sat, 26 Oct 2019 14:29:43 +0200
>
> Eli> Emacs doesn't allow signals while it waits for input.
>
> Eli> We could ignore thread-signal in such cases, or we could make it an
> Eli> error (which will then signal an error in the thread which called
> Eli> thread-signal). What do people think? Are there any other ideas for
> Eli> handling this situation?
>
> Maybe the signal should be raised in the thread right after it returns
> from sit-for?
We don't have any mechanism for doing that.
> Ignoring signals sounds like a bad idea.
It is better than crashing. It is also not much worse than
interrupting the thread at some arbitrary random point.
> Eli> Michał, can you tell why you needed to call thread-signal while the
> Eli> thread was in sit-for?
>
> I wanted to signal some background thread which was doing some work and
> then Emacs crashed, because it just so happened that it was in sit-for.
> The thread function was doing _more_ than just sit-for.
>
> I actually don't care (and can't know) what another thread is doing, I
> just want to send a signal to it.
But thread-signal is not for causing an error in a thread, it is for
unblocking a thread that waits on a mutex or a condvar. So why would
you use it when the thread is not blocked?
This bug report was last modified 3 years and 252 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.