From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: igc, macOS avoiding signals Date: Mon, 30 Dec 2024 08:13:16 +0100 Message-ID: References: <799DDBC5-2C14-4476-B1E0-7BA2FE9E7901@toadstyle.org> <86ed1rswup.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27906"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: spd@toadstyle.org, pipcet@protonmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 30 08:14:10 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tS9yc-00078x-2m for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Dec 2024 08:14:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tS9xw-0006wI-Au; Mon, 30 Dec 2024 02:13:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tS9xr-0006ur-7n for emacs-devel@gnu.org; Mon, 30 Dec 2024 02:13:23 -0500 Original-Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tS9xp-0004QL-Bm; Mon, 30 Dec 2024 02:13:22 -0500 Original-Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-aa6c0dbce1fso1230904066b.2; Sun, 29 Dec 2024 23:13:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735542799; x=1736147599; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oU0I2xhOoWRTYcxazr1eg0JFt/tMag0HCt/bm3UihG0=; b=DIs4O5C9Zep4b3+FwMeZabFGMjYutpz1WfZwPe6cyqSmTVPgZYnx0s7xuAGRBxyOuf aZ3RIuzCFckOOuxmx7jonciclEafmdsjBCV231BgKWyR4gtqj9MTs+pzsFeTeSInqCRc quCsXw979pCpO4H4iOnWyDJ3jvhL8d7cN2i/NH/7a15e1jCvdlEXOLkY/f/NdYHxRMwR D2MtGApzFtkhWAw8FbbkMnQ2NOqZE/hQGGEQFNsf74XZKbVnCXD6TXqC+XUV0mcKlZp+ iCpTclUOxtekkezdACIz0Tiaj96rSCs7FcYWJuwJsmC3d3K2lPOe45QRLqhTUtEAKgTu uhiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735542799; x=1736147599; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=oU0I2xhOoWRTYcxazr1eg0JFt/tMag0HCt/bm3UihG0=; b=ASLa7VEKp8Um5UZ8uSicvEqrR2HSiNXHeZqJZLI2ndq6sNmlnZh7XNprPJTXH4F3tJ GAoOovJduFHmFdncWXe0tc5Mktl8vB8au8KlynC7/62MEDXuWsf7YpsUhgLvGqmpu5II mCdeOMSpz8i9BtOPe+edBD7/IYplppdDdqS4KWRk98yvECFvbIcYuqd7h/sw+2jJ2MYw 0ZR0fr2YFMTk1VGqmLSx22fc/HeHOny+due/JQ0Dbp/VvVnNShEWDay7rISayaRTsbUk cR/qfKYDuY6ZPXfkluXf0kDqx4F7C5v4bnbs6rz/RdXJ5zt7HHNZPESXzVNevz1UtaAU /9gg== X-Forwarded-Encrypted: i=1; AJvYcCU/D+BWwVjvQdAw/00KKHx28FpSQ+2jLhmbMR/gr3cw575WsjQbWm4zfve+5RBkBW0ZrV5fLwLpd2thdg==@gnu.org X-Gm-Message-State: AOJu0Ywlw758lHuhw7IlrS1AU5JiU3HXOfuroIJW1kYZ8JGtgMr+jDG8 JzPtR/CnWO7dDRuyndJ1gPoPvWN+FvpPq+xwhoJBrmo6/hua+QUJM0h88g== X-Gm-Gg: ASbGncshERTpeQm6U92j9He/EFzcWJN33+8MjtmOWw9TJFF4mN8bL4h8ZX6p1Ma6nCZ PutZlvAtLffq9Ch2Gb/0ctipYn5PD4xGAAddqr3c33sG73CvFpu4j1SBwxRtRZ6sHWUjWDDSKX4 xdpHYrKuPp914nBaoas05AZKqdCY260FRIh7Yk8bttjC+i3rJbA5SiywCydzYpT0jiX3+LEQ0p+ StG5rKUffaTLzZ26uyEquSA42PWJ6dvGXqi3pfCHJtwxcWtlbUVhMYCGe4XU651jVBJ+ktjgtKX BfNRP56Du3JaaN5bxGiOkMGSz9RiTfQh4Wy90PCxLPzRvyZ+rHgKruZOw9m5hpyU X-Google-Smtp-Source: AGHT+IECKnqyQKs9aAf9PJin+bjPj/OGfHXre5pmcbv6ASxCZo3vlHgKLnXLNKC69iqP1x0w0aw2qg== X-Received: by 2002:a05:6402:2802:b0:5d3:cff5:635e with SMTP id 4fb4d7f45d1cf-5d81de065b8mr81323032a12.26.1735542798579; Sun, 29 Dec 2024 23:13:18 -0800 (PST) Original-Received: from pro2 (p200300e0b7156f000dceccb84ca1ba38.dip0.t-ipconnect.de. [2003:e0:b715:6f00:dce:ccb8:4ca1:ba38]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895194sm1431619166b.70.2024.12.29.23.13.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 23:13:18 -0800 (PST) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llmann=22'?= =?utf-8?Q?s?= message of "Sat, 28 Dec 2024 15:45:35 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327388 Archived-At: Gerd M=C3=B6llmann writes: > Eli Zaretskii 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 =3D 0x8b6558, 0x0000000190be51a8 libsystem_kernel.dylib`= __pselect + 8, queue=20 thread #2: tid =3D 0x8b655c, 0x0000000190bdef54 libsystem_kernel.dylib`= mach_msg2_trap + 8 thread #3: tid =3D 0x8b65df, 0x0000000190be0ba4 libsystem_kernel.dylib`= __workq_kernreturn + 8 Thread 1 is Emacs main thread. (lldb) thread backtrace * thread #1, queue =3D 'com.apple.main-thread', stop reason =3D signal SI= GSTOP frame #0: 0x0000000190be51a8 libsystem_kernel.dylib`__pselect + 8 frame #1: 0x0000000190be5080 libsystem_kernel.dylib`pselect$DARWIN_EXTS= N + 64 frame #2: 0x0000000100775948 emacs`really_call_select(arg=3D0x0000000= 16f851990) at thread.c:620:16 [opt] frame #3: 0x00000001007758bc emacs`thread_select [inlined] flush_stac= k_ca frame #4: 0x00000001007758ac emacs`thread_select(func=3D= , max_ frame #5: 0x0000000100744e78 emacs`wait_reading_process_output(time_l= imit=3D, 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] protCatc= hOne at protxc.c:207:8 [opt] frame #5: 0x000000010080adf0 emacs`protCatchThread(p=3D)= at protxc.c:284:5 [opt] frame #6: 0x0000000190c202e4 libsystem_pthread.dylib`_pthread_start + 1= 36 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 :-(.