From: Alan Third <alan@idiocy.org>
To: Christian Johansson <christian@cvj.se>
Cc: 39343@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 [thread overview]
Message-ID: <20200129204234.GB60190@breton.holly.idiocy.org> (raw)
In-Reply-To: <f6ac77bf-ef13-c30b-07ac-26712428e652@cvj.se>
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
next prev parent reply other threads:[~2020-01-29 20:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-29 11:27 bug#39343: 27.0.50; Thrad signal crashes Emacs with sgmentation fault Christian Johansson
2020-01-29 20:42 ` Alan Third [this message]
2020-01-29 21:05 ` Christian Johansson
2021-10-20 3:05 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-20 20:43 ` NS port thread problems Alan Third
2021-10-21 0:35 ` Po Lu
2021-10-23 10:27 ` Alan Third
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=20200129204234.GB60190@breton.holly.idiocy.org \
--to=alan@idiocy.org \
--cc=39343@debbugs.gnu.org \
--cc=christian@cvj.se \
/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.