GNU bug report logs - #75275
30.0.92; `make-thread` bug on macOS 15.2

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Thu, 2 Jan 2025 04:58:01 UTC

Severity: normal

Tags: confirmed

Found in versions 30.0.92, 31.0.50, 30.0.93

Full log


Message #11 received at 75275 <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 75275 <at> debbugs.gnu.org
Subject: Re: bug#75275: 30.0.92; `make-thread` bug on macOS 15.2
Date: Thu, 02 Jan 2025 06:55:51 +0100
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:

> Stefan Kangas <stefankangas <at> gmail.com> writes:
>
>> I have run into a bug with make-thread on macOS 15.2, running on an M2.
>>
>> I can reproduce the issue consistently both on emacs-30 and master by
>> evaluating this in emacs -Q:
>>
>>     (make-thread (lambda () (sleep-for 1)) "bug")
>>
>> This leads to Emacs freezing up completely within a fraction of a
>> second.  I have time to move point once or maybe twice before it gets
>> non-responsive, let's say within a few tenths of a second.
>
> Curious question: Do you see a beach ball?
>
>> When I kill the process in the lldb window with Ctrl+C, I can get the
>> following (this is on emacs-30):
>>
>>     frame #12: 0x0000000100403fec emacs`-[EmacsApp
>> run](self=0x0000000156610fe0, _cmd="run") at nsterm.m:5938:7
>>     frame #13: 0x00000001004024b0 emacs`ns_select_1(nfds=0,
>> readfds=0x00000001708c26bc, writefds=0x00000001708c263c,
>> exceptfds=0x0000000000000000, timeout=0x00000001708c2610,
>> sigmask=0x0000000000000000, run_loop_only=NO) at nsterm.m:4954:3
>>     frame #14: 0x000000010040202c emacs`ns_select(nfds=0,
>> readfds=0x00000001708c26bc, writefds=0x00000001708c263c,
>> exceptfds=0x0000000000000000, timeout=0x00000001708c2610,
>> sigmask=0x0000000000000000) at nsterm.m:5006:10
>
> I'm asking because of bug#72496. The part of the backtrace above reminds
> me a bit of what I trued to describe in that bug: EmacsApp.run never
> returning to ns_select_1. Can you see if it ever returns?

This is what Apple says about Cocoa thread-safety

https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html#:~:text=Guidelines%20for%20using%20Cocoa%20from,are%20generally%20not%20thread%2Dsafe.




This bug report was last modified 163 days ago.

Previous Next


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