GNU bug report logs - #39343
27.0.50; Thrad signal crashes Emacs with sgmentation fault

Previous Next

Package: emacs;

Reported by: Christian Johansson <christian <at> cvj.se>

Date: Wed, 29 Jan 2020 11:29:01 UTC

Severity: normal

Found in version 27.0.50

Full log


View this message in rfc822 format

From: Alan Third <alan <at> idiocy.org>
To: Christian Johansson <christian <at> cvj.se>
Cc: 39343 <at> debbugs.gnu.org
Subject: bug#39343: 27.0.50; Thrad signal crashes Emacs with sgmentation fault
Date: Wed, 29 Jan 2020 20:42:34 +0000
On Wed, Jan 29, 2020 at 12:27:19PM +0100, Christian Johansson wrote:
> Running following works on Linux but not on macOS.
> 
> (let ((loop t)
>       (iterations 1))
>   (while loop
>     (make-thread
>      (lambda()
>        (message "Thread %d" iterations)
>        (signal 'error (list "My error"))))
>     (setq iterations (1+ iterations))))
> 
> Error in console: Fatal error 11: Segmentation faultAbort trap: 6
> 
> It seems to be some kind of issue with quitting threads on macOS which is
> not present on Linux

It’s a stack overflow caused by the main thread getting stuck in a
loop processing calls to ns_send_appdefined which must be coming from
the 2000‐odd threads the script starts.

Presumably it’s the call to ns_run_loop_break in sys_cond_broadcast
that’s doing it.

I don’t think there’s really any way round this other than the massive
rewrite the NS port needs to make it handle threads correctly.

-- 
Alan Third




This bug report was last modified 3 years and 241 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.