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:23:10 +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="24257"; 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:24: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 1tSA8I-0006BT-G9 for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Dec 2024 08:24:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSA7h-0002mF-K6; Mon, 30 Dec 2024 02:23:34 -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 1tSA7X-0002lt-B3 for emacs-devel@gnu.org; Mon, 30 Dec 2024 02:23:24 -0500 Original-Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tSA7P-0005Ua-3s; Mon, 30 Dec 2024 02:23:20 -0500 Original-Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-aa679ad4265so1799786566b.0; Sun, 29 Dec 2024 23:23:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735543392; x=1736148192; 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=g1uJPwZgPiYACaITZ1fpJXA6E7S31XIf9443FtFWijM=; b=aCxQjB4jIYTSl9uJH6Ywk2tTQUs97gfQfK2owVW0W++H+3x8RXiPpkj07TO39/Zo7v LQ/e6YgVcJ9G19iNhHA5j8aIDewAG/AcAHTxyYTVNsB49C1VSOw7u6AjAeFZAm51uYTN BFdSjjIWOZHJRNmG7MWquGYy+07XPjAqHhAD9TCLsfr1lovA/TAIKcsKsbS5dn/rjByy RdE1s/6PfhR8FpbU+LycS6+T3mK1KhXIp9+jlEOBPdmDzjUefUzHPMvxDotLmFtyBV2m C22Ct7iCFAx8v43EPxyts8Zzhb4jy+FFmOUctLl0KhEUs1A6ALxdeUeOqLk++hIlla3/ wttA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735543392; x=1736148192; 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=g1uJPwZgPiYACaITZ1fpJXA6E7S31XIf9443FtFWijM=; b=hAPuFOslWPHiZJCWpVUx3xdHLaQCeoVKbW/i+IIoBR8wSabhIZbD59HYey0eQzJaeM 1Tu7CYEcSlXPJ4Qmukn5XQ40GUeFzXscUgf4Db6WSZziIiXrfv5jCf76PvugNSKJkUM2 rUkUGubzSt4JSar+aomWvWD2Fpr1rtF97ppPhOI5nXkRfq/FgPxB5r8CD/+ePTB3raiL s+K0ax3crkyJvgWUqyechd+E2GcFzJssE2YV8awDgfxwjRBleRHmrNoytzCVgAXR8RDo dy8g8xO60V4Vp8IZFmY6z78C5BB9v9TVnfsIkM9L3DrWeObtG0q1Im+D3q1vCY36rIF7 r2bQ== X-Forwarded-Encrypted: i=1; AJvYcCW2xVraN4FZMMIpRsbrscEXNdsaHeNW+g0T2GM3/RVF3EvhP6gbzzPssm978TSstTUtP1G/4z7VXmPAIQ==@gnu.org X-Gm-Message-State: AOJu0YzyUn896kz0aOih2oDeVO0u9d5lclMNLOU08wSa4DOjlaNE60bF R+K9N8Oc3LAjWS7IozgLz/uAGX5excu8+hQKtATeTmLOGfjsK1QC8WQhEA== X-Gm-Gg: ASbGncvVObpNSTZbvAx9k5N726AVijukUGZmAIDoeBJnSdulj6EZXG4i8GjoAa6lWxO sr2jGuFrrWOKVRJXYO3zAueo4aDojxW2la4aMVQY4eyQIeBmJNfAe8NO4vjx7d7NEOTV4cfKoUQ DF9kEXktcm/mrV0nD7TBZP67Ly2xOEw7FXZHRsqOQkrwT5UoQw5GNRwJYnaHnSj0hWfe8xNCHyo 013uIkbzfRxABCaLVq5lFtXWQcxn4CX4b2aTouxO99A9+IXaVoXyg7XnkiJUUcXDaoP2gE6QP3H 4hDns/wf/YgrTaHXAMgmWB1VDW87lZoefh5Ov7Kmf6kAy1YV7Ip3WAKKsZLk4vHp X-Google-Smtp-Source: AGHT+IHEU+VC4e63mVnTCWM3qZA8oSI90w1RsM7kFTAue63TaNwRM5Z9A2pgsatOm9QIc7oQLKwZ3Q== X-Received: by 2002:a17:907:704:b0:aa6:489e:5848 with SMTP id a640c23a62f3a-aac34695112mr2974906666b.25.1735543391726; Sun, 29 Dec 2024 23:23:11 -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-aac0efe3958sm1427407766b.96.2024.12.29.23.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 23:23:11 -0800 (PST) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llmann=22'?= =?utf-8?Q?s?= message of "Mon, 30 Dec 2024 08:13:16 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x62e.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:327389 Archived-At: Gerd M=C3=B6llmann writes: > 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.dyli= b`__pselect + 8, queue=20 > thread #2: tid =3D 0x8b655c, 0x0000000190bdef54 libsystem_kernel.dyli= b`mach_msg2_trap + 8 > thread #3: tid =3D 0x8b65df, 0x0000000190be0ba4 libsystem_kernel.dyli= b`__workq_kernreturn + 8 > > Thread 1 is Emacs main thread. > > (lldb) thread backtrace > * thread #1, queue =3D 'com.apple.main-thread', stop reason =3D signal = SIGSTOP > frame #0: 0x0000000190be51a8 libsystem_kernel.dylib`__pselect + 8 > frame #1: 0x0000000190be5080 libsystem_kernel.dylib`pselect$DARWIN_EX= TSN + 64 > frame #2: 0x0000000100775948 emacs`really_call_select(arg=3D0x00000= 0016f851990) at thread.c:620:16 [opt] > frame #3: 0x00000001007758bc emacs`thread_select [inlined] flush_st= ack_ca > frame #4: 0x00000001007758ac emacs`thread_select(func=3D, max_ > frame #5: 0x0000000100744e78 emacs`wait_reading_process_output(time= _limit=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_interna= l + 232 > frame #2: 0x0000000190be7af8 libsystem_kernel.dylib`mach_msg_overwrit= e + 480 > frame #3: 0x0000000190bdf29c libsystem_kernel.dylib`mach_msg + 24 > frame #4: 0x000000010080ae20 emacs`protCatchThread [inlined] protCa= tchOne 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 += 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_kernretur= n + 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 :-(. And now, git grep in MPS, reveals Concurrent collection ..................... _`.improv.concurrent`: The MPS currently does not collect concurrently, however the only thing that makes it not-concurrent is a :-(