all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gerd.moellmann@gmail.com, 75275@debbugs.gnu.org
Subject: bug#75275: 30.0.92; `make-thread` bug on macOS 15.2
Date: Thu, 2 Jan 2025 01:58:09 -0600	[thread overview]
Message-ID: <CADwFkmkQRyjG5a59T3D_bpgECX9QsoHYyHo3d2MHMU284gh+6g@mail.gmail.com> (raw)
In-Reply-To: <868qrtlkiq.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> writes:

>> Cc: 75275@debbugs.gnu.org
>> From: Stefan Kangas <stefankangas@gmail.com>
>> Date: Thu, 2 Jan 2025 00:47:06 -0600
>>
>> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>>
>> > Stefan Kangas <stefankangas@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?
>>
>> Yes, I do see a beach ball.  It takes a second or so to show up, which I
>> guess is expected.
>>
>> >> 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?
>>
>> After recompiling with NSTRACE_ENABLED, and based on reading at the
>> terminal output, it seems like it does not return to ns_select_1 after
>> the first line that reads
>>
>>     nextEventMatchingMask should only be called from the Main Thread!
>>
>> Is there a better way to see if it returns to that function?
>
> Who calls nextEventMatchingMask?  I don't see it in the backtraces you
> posted.

I believe the below two lines are relevant, but note that the function
in that case is actually called "_nextEventMatchingEventMask".  IOW, I
had assumed that "nextEventMatchingMask" is just what the error message
(perhaps confusingly) said:

2   AppKit 0x0000000192721c24 -[NSApplication(NSEventRouting)
_nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3072
3   AppKit 0x0000000191db0060 -[NSApplication run] + 480





  reply	other threads:[~2025-01-02  7:58 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-02  4:57 bug#75275: 30.0.92; `make-thread` bug on macOS 15.2 Stefan Kangas
2025-01-02  5:46 ` Gerd Möllmann
2025-01-02  5:55   ` Gerd Möllmann
2025-01-02  6:47   ` Stefan Kangas
2025-01-02  7:12     ` Gerd Möllmann
2025-01-02 14:35       ` Stefan Kangas
2025-01-02 14:38         ` Gerd Möllmann
2025-01-02 14:45           ` Gerd Möllmann
2025-01-02 15:19             ` Stefan Kangas
2025-01-02 16:06               ` Alan Third
2025-01-02 16:47                 ` Alan Third
2025-01-02 16:58                 ` Eli Zaretskii
2025-01-02 17:09                   ` Gerd Möllmann
2025-01-02 17:22                     ` Eli Zaretskii
2025-01-02 17:25                       ` Gerd Möllmann
2025-01-02 17:42                         ` Alan Third
2025-01-02 17:48                           ` Gerd Möllmann
2025-01-02 17:37                       ` Alan Third
2025-01-02 17:46                         ` Gerd Möllmann
2025-01-02 17:52                           ` Gerd Möllmann
2025-01-02 19:26                             ` Alan Third
2025-01-02 19:59                               ` Gerd Möllmann
2025-01-02 16:46               ` Eli Zaretskii
2025-01-02  7:53     ` Eli Zaretskii
2025-01-02  7:58       ` Stefan Kangas [this message]
2025-01-02  7:13 ` Eli Zaretskii
2025-01-02  7:30   ` Gerd Möllmann
2025-01-02  8:28     ` Eli Zaretskii
2025-01-02  8:33       ` Gerd Möllmann
2025-01-02  8:41         ` Gerd Möllmann
2025-01-02  8:55           ` Eli Zaretskii
2025-01-02 10:04             ` Gerd Möllmann
2025-01-02 11:03               ` Alan Third
2025-01-02 13:05                 ` Gerd Möllmann
2025-01-02 13:53                   ` Alan Third
2025-01-02 14:03                     ` Gerd Möllmann
2025-01-02 14:17                       ` Alan Third
2025-01-02 15:31                 ` Eli Zaretskii
2025-01-02 15:37                   ` Gerd Möllmann
2025-01-02 15:55                     ` Alan Third
2025-01-02 16:08                       ` Gerd Möllmann
2025-01-02  8:51         ` Gerd Möllmann
2025-01-02  7:31   ` Stefan Kangas
2025-01-02  8:31     ` Eli Zaretskii
2025-01-02 10:31     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=CADwFkmkQRyjG5a59T3D_bpgECX9QsoHYyHo3d2MHMU284gh+6g@mail.gmail.com \
    --to=stefankangas@gmail.com \
    --cc=75275@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=gerd.moellmann@gmail.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.