From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: igc, macOS avoiding signals Date: Thu, 02 Jan 2025 11:05:14 +0200 Message-ID: <86wmfdk2lx.fsf@gnu.org> References: <799DDBC5-2C14-4476-B1E0-7BA2FE9E7901@toadstyle.org> <878qrxoayj.fsf@gmail.com> <8734i5o6wc.fsf@gmail.com> <87cyh9mpn5.fsf@gmail.com> <874j2l1hei.fsf@protonmail.com> <874j2lmd37.fsf@gmail.com> <87msgdkt29.fsf@gmail.com> <86h66lnjrt.fsf@gnu.org> <868qrxnfrw.fsf@gnu.org> <87a5ccl2zx.fsf@gmail.com> <86o70sm1ts.fsf@gnu.org> <87bjwrgbky.fsf@gmail.com> <865xmznb5c.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3949"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, eller.helmut@gmail.com, pipcet@protonmail.com, emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 02 10:06:20 2025 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 1tTH9o-0000tK-7D for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Jan 2025 10:06:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTH8t-0002zL-R9; Thu, 02 Jan 2025 04:05:23 -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 1tTH8r-0002xr-Mn for emacs-devel@gnu.org; Thu, 02 Jan 2025 04:05:21 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTH8r-0003hw-1t; Thu, 02 Jan 2025 04:05:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=NtOAOujh8A01xzgPVXy8sj5Yfd6zHkYcZyQsA9D5ke8=; b=B0Ef56O6t92zjM5UP3Uh FjCPOAQoFfWw0qPPQKbEtkaYLlaFA/DWbhO5d4ld8ZeBKQGJJn7QUHAm46260fKFOUnJ6Shcy3kpK zZC7l5TsmBLwdb4q5TLfhi6h7UTWc2r2270OvGYXCXvVpWI59A9O21jCCjdvyppX9SIuvgFUqIEaN 85TjBfQpipm+dtuhLjqChsxG1MhuqKSJxJnOtvruajgyayTse0CQNCLSq/98xBXS56W4Dcciqjr/5 1IEitwmxaPtbRSTqr2Vu6Zgfdumm0b0VCS1fFHsUhqdfkFtFombbHb/AicUxgR8HI2zc5AH1Upu7r Bj+Uz941Fvkjwg==; In-Reply-To: (message from Stefan Kangas on Thu, 2 Jan 2025 02:37:12 -0600) 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:327562 Archived-At: > From: Stefan Kangas > Date: Thu, 2 Jan 2025 02:37:12 -0600 > Cc: eller.helmut@gmail.com, pipcet@protonmail.com, emacs-devel@gnu.org > > Gerd Möllmann writes: > > >> Mercy: I have a lot of other Emacs-related stuff on my plate, as you > >> are well aware. Just keeping up with this discussion is already hard > >> for me. Please help me by reaching out to the MPS folks about this > >> issue. > > > > I think it should be something "official". Maybe Stefan Kangas could > > contact them, or Richard. > > I'm happy to reach out to them in official capacity, but I'm not really > close enough to the code to be able to usefully discuss the issue with > them. So I think it might be best to put some or all of you in Cc. > > Before we do anything though, are we sure that it is faster to ask them > to do things for us, instead of, say, just sending a patch? I'm not > sure how confident people are with hacking MPS, but if we are still > seriously entertaining the idea of a fork then maybe we should be, to > some extent. We don't know the answer, AFAIU. We could tell them that if they prefer a patch, we can send one. > If we do decide to contact them, I'm afraid that I don't have sufficient > context to accurately describe the proposed callback. I would need to > ask someone to summarize the idea in sufficient detail so that we can > start a conversation. The problem is that evidently (at least on Posix platforms), if a program that uses MPS runs application code from a SIGPROF or a SIGALRM or a SIGCHLD signal handler can trigger a recursive access to the MPS arena, which causes a fatal signal if that happens while MPS holds the arena lock. So we want to ask for a callback when MPS is about to lock the arena, and another callback immediately after it releases the lock. With that, we could defer the application code of these signal handlers until after the arena is free to be accessed again. Alternatively, if MPS already has a solution for such applications that use signals, we'd like to hear what they suggest. As background, you can point them to this discussion: https://lists.gnu.org/archive/html/emacs-devel/2024-06/msg00568.html