unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: spd@toadstyle.org,  pipcet@protonmail.com,  emacs-devel@gnu.org
Subject: Re: igc, macOS avoiding signals
Date: Mon, 30 Dec 2024 08:13:16 +0100	[thread overview]
Message-ID: <m2a5cdfxtf.fsf@gmail.com> (raw)
In-Reply-To: <m2ed1r6f3k.fsf@gmail.com> ("Gerd Möllmann"'s message of "Sat, 28 Dec 2024 15:45:35 +0100")

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>> So maybe Pip is right, and MPS always runs in the main (Lisp) thread,
>> even on macOS?  Can you catch it on a non-main thread?
>
> It's well possible that I misunderstand what the MPS guide says about it
> being concurrent (see my reply to Pip), and that the thread I see here
> is something else.
>
> If you don't see an additional thread on Linux, just don't listen to me
> and do what you think is TRT. I don't know anything about MPS internals.

I've investigated this a bit using LLDB. Starting Emacs and attaching to
it, I see 3 threads.

  (lldb) thread list
  Process 55210 stopped
  * thread #1: tid = 0x8b6558, 0x0000000190be51a8 libsystem_kernel.dylib`__pselect + 8, queue 
    thread #2: tid = 0x8b655c, 0x0000000190bdef54 libsystem_kernel.dylib`mach_msg2_trap + 8
    thread #3: tid = 0x8b65df, 0x0000000190be0ba4 libsystem_kernel.dylib`__workq_kernreturn + 8

Thread 1 is Emacs main thread.

  (lldb) thread backtrace
  * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x0000000190be51a8 libsystem_kernel.dylib`__pselect + 8
    frame #1: 0x0000000190be5080 libsystem_kernel.dylib`pselect$DARWIN_EXTSN + 64
      frame #2: 0x0000000100775948 emacs`really_call_select(arg=0x000000016f851990) at thread.c:620:16 [opt]
      frame #3: 0x00000001007758bc emacs`thread_select [inlined] flush_stack_ca
      frame #4: 0x00000001007758ac emacs`thread_select(func=<unavailable>, max_
      frame #5: 0x0000000100744e78 emacs`wait_reading_process_output(time_limit=<unavailable>, n

Thread 2 is MPS' port, for EXC_BAD_ACCESS

  (lldb) thread backtrace
  * thread #2
    frame #0: 0x0000000190bdef54 libsystem_kernel.dylib`mach_msg2_trap + 8
    frame #1: 0x0000000190bf169c libsystem_kernel.dylib`mach_msg2_internal + 232
    frame #2: 0x0000000190be7af8 libsystem_kernel.dylib`mach_msg_overwrite + 480
    frame #3: 0x0000000190bdf29c libsystem_kernel.dylib`mach_msg + 24
      frame #4: 0x000000010080ae20 emacs`protCatchThread [inlined] protCatchOne at protxc.c:207:8 [opt]
      frame #5: 0x000000010080adf0 emacs`protCatchThread(p=<unavailable>) at protxc.c:284:5 [opt]
    frame #6: 0x0000000190c202e4 libsystem_pthread.dylib`_pthread_start + 136

The protxc.c is from MPS.

Thread 3 is something I can't explain.

  (lldb) thread backtrace
  * thread #3
    frame #0: 0x0000000190be0ba4 libsystem_kernel.dylib`__workq_kernreturn + 8

The __workq_kernreturn should indicate a thread that it is in the
process of finishing, but I have no idea what that could have been.

Anyway, it definitely seems to be the case that MPS is _not_ running GCs
concurrently, unless it would do things that I find highly unlikely.

I find that a bit, let's say, disappointing, TBH :-(.





  reply	other threads:[~2024-12-30  7:13 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-28 13:24 igc, macOS avoiding signals Sean Devlin
2024-12-28 13:28 ` Gerd Möllmann
2024-12-28 14:31   ` Eli Zaretskii
2024-12-28 14:45     ` Gerd Möllmann
2024-12-30  7:13       ` Gerd Möllmann [this message]
2024-12-30  7:23         ` Gerd Möllmann
2024-12-30  7:39         ` Helmut Eller
2024-12-30  7:51           ` Gerd Möllmann
2024-12-30  8:02             ` Helmut Eller
2024-12-30  8:47               ` Gerd Möllmann
2024-12-30  9:29                 ` Helmut Eller
2024-12-30  9:47                   ` Helmut Eller
2024-12-30 11:54                     ` Gerd Möllmann
2024-12-30 10:05                   ` Gerd Möllmann
2024-12-30 10:27                     ` Helmut Eller
2024-12-30 11:53                       ` Gerd Möllmann
2024-12-30 14:54                         ` Eli Zaretskii
2024-12-30 15:05                           ` Gerd Möllmann
2024-12-30 15:05                           ` Pip Cet via Emacs development discussions.
2024-12-30 12:32                       ` Pip Cet via Emacs development discussions.
2024-12-30 14:24                         ` Eli Zaretskii
2024-12-30 14:59                         ` Helmut Eller
2024-12-30 15:15                           ` Eli Zaretskii
2024-12-30 15:24                             ` Helmut Eller
2024-12-30 15:25                           ` Pip Cet via Emacs development discussions.
2024-12-30 15:34                             ` Gerd Möllmann
2024-12-30 19:02                             ` Helmut Eller
2024-12-30 20:03                               ` Pip Cet via Emacs development discussions.
2024-12-30 15:30                           ` Gerd Möllmann
2024-12-30 16:57                             ` Helmut Eller
2024-12-30 17:41                               ` Gerd Möllmann
2024-12-30 17:49                               ` Pip Cet via Emacs development discussions.
2024-12-30 18:33                                 ` Helmut Eller
2024-12-30 17:49                               ` Eli Zaretskii
2024-12-30 18:37                                 ` Gerd Möllmann
2024-12-30 19:15                                   ` Eli Zaretskii
2024-12-30 19:55                                     ` Gerd Möllmann
2024-12-31  7:34                                       ` Helmut Eller
2024-12-31  9:19                                         ` Gerd Möllmann
2024-12-31  9:51                                           ` Helmut Eller
2024-12-31 10:00                                             ` Gerd Möllmann
2024-12-31 13:49                                             ` Pip Cet via Emacs development discussions.
2024-12-31 14:13                                               ` Eli Zaretskii
2024-12-31  9:51                                           ` Gerd Möllmann
2024-12-31 13:18                                           ` Eli Zaretskii
2024-12-31 14:15                                             ` Gerd Möllmann
2024-12-31 14:27                                               ` Eli Zaretskii
2024-12-31 15:05                                                 ` Gerd Möllmann
2024-12-31 15:14                                                   ` Eli Zaretskii
2024-12-31 15:20                                                     ` Gerd Möllmann
2024-12-31 15:12                                               ` Helmut Eller
2024-12-31 15:31                                                 ` Gerd Möllmann
2024-12-31 15:37                                                   ` Helmut Eller
2024-12-31 15:39                                                     ` Gerd Möllmann
2024-12-31 10:09                                         ` Pip Cet via Emacs development discussions.
2024-12-31 13:27                                           ` Eli Zaretskii
2024-12-31 14:29                                             ` Pip Cet via Emacs development discussions.
2024-12-31 14:34                                               ` Eli Zaretskii
2024-12-31 15:08                                                 ` Gerd Möllmann
2024-12-31 15:07                                               ` Gerd Möllmann
2024-12-31 13:14                                         ` Eli Zaretskii
2024-12-31 14:19                                           ` Pip Cet via Emacs development discussions.
2024-12-31 14:31                                             ` Eli Zaretskii
2024-12-31 14:40                                           ` Helmut Eller
2024-12-31 14:55                                             ` Gerd Möllmann
2024-12-31 15:07                                               ` Eli Zaretskii
2024-12-31 15:13                                                 ` Gerd Möllmann
2024-12-31 15:16                                                   ` Helmut Eller
2025-01-02  8:37                                                   ` Stefan Kangas
2025-01-02  9:05                                                     ` Eli Zaretskii
2025-01-02 10:00                                                       ` Helmut Eller
2025-01-02 12:34                                                       ` Pip Cet via Emacs development discussions.
2025-01-02 13:08                                                         ` Gerd Möllmann
2025-01-02 15:42                                                         ` Eli Zaretskii
2024-12-30 12:42                       ` Pip Cet via Emacs development discussions.
2024-12-30 13:40                         ` Gerd Möllmann
2024-12-30 13:53                           ` Pip Cet via Emacs development discussions.
2024-12-30 14:02                             ` Gerd Möllmann
2024-12-30 14:32                               ` Pip Cet via Emacs development discussions.
2024-12-30 14:52                                 ` Gerd Möllmann
2024-12-30 11:18                 ` Pip Cet via Emacs development discussions.
2024-12-30 12:23                   ` Gerd Möllmann
2024-12-30 11:11             ` Pip Cet via Emacs development discussions.
2024-12-30 12:13               ` Gerd Möllmann
2024-12-30 10:53           ` Pip Cet via Emacs development discussions.
2024-12-30 10:46         ` Pip Cet via Emacs development discussions.
2024-12-30 12:00           ` Gerd Möllmann
2024-12-30 12:07           ` Gerd Möllmann
2024-12-28 15:12 ` Pip Cet via Emacs development discussions.
2024-12-28 17:30   ` Eli Zaretskii
2024-12-28 18:40     ` Pip Cet via Emacs development discussions.
2024-12-28 18:50       ` Eli Zaretskii
2024-12-28 19:07         ` Eli Zaretskii
2024-12-28 19:20           ` Pip Cet via Emacs development discussions.
2024-12-28 19:36             ` Eli Zaretskii
2024-12-28 20:54               ` Pip Cet via Emacs development discussions.
2024-12-29  5:51                 ` Eli Zaretskii
2024-12-28 19:15         ` Pip Cet via Emacs development discussions.
2024-12-28 19:30           ` Eli Zaretskii
2024-12-28 16:29 ` Pip Cet via Emacs development discussions.
2024-12-29  2:21   ` Sean Devlin
2024-12-29 12:22     ` Pip Cet via Emacs development discussions.
2024-12-29 15:01       ` Gerd Möllmann
2024-12-29 19:44         ` Pip Cet via Emacs development discussions.
2024-12-30  6:16           ` Gerd Möllmann
2024-12-30 12:51             ` Gerd Möllmann
2024-12-30 13:09               ` Pip Cet via Emacs development discussions.
2024-12-30 13:28                 ` Gerd Möllmann
2024-12-30  5:24         ` Sean Devlin
2024-12-30  6:17           ` Gerd Möllmann
2024-12-30  5:23       ` Sean Devlin
  -- strict thread matches above, loose matches on Subject: below --
2024-12-28  6:40 Gerd Möllmann
2024-12-28 12:49 ` Pip Cet via Emacs development discussions.
2024-12-28 12:55   ` Gerd Möllmann
2024-12-28 13:50     ` Óscar Fuentes
2024-12-29  8:02       ` Helmut Eller

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2a5cdfxtf.fsf@gmail.com \
    --to=gerd.moellmann@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=pipcet@protonmail.com \
    --cc=spd@toadstyle.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).