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: Some experience with the igc branch Date: Thu, 26 Dec 2024 17:23:43 +0200 Message-ID: <86ttaqxybk.fsf@gnu.org> References: <87o713wwsi.fsf@telefonica.net> <87ldw6as5f.fsf@protonmail.com> <86o7112rnq.fsf@gnu.org> <867c7p2nz4.fsf@gnu.org> <861pxx2lh7.fsf@gnu.org> <86ldw40xbo.fsf@gnu.org> <86a5cj2a0e.fsf@gnu.org> <867c7n28sf.fsf@gnu.org> <877c7n962e.fsf@gmail.com> <8634ib24gp.fsf@gnu.org> <875xn75w7u.fsf@gmail.com> <86ttaryn1x.fsf@gnu.org> <877c7mzxbw.fsf@gmail.com> <861pxuzt61.fsf@gnu.org> <87wmfmy6mq.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25920"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, pipcet@protonmail.com, emacs-devel@gnu.org To: Helmut Eller , Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 26 16:24:35 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 1tQpj1-0006bc-Fm for ged-emacs-devel@m.gmane-mx.org; Thu, 26 Dec 2024 16:24:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQpiI-0005FD-AG; Thu, 26 Dec 2024 10:23:50 -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 1tQpiG-0005Ec-3G for emacs-devel@gnu.org; Thu, 26 Dec 2024 10:23:48 -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 1tQpiE-0007Q2-St; Thu, 26 Dec 2024 10:23:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=2zLyGZ2sdtjM/bsSjgd/HVtjTd3RQUP1LIHiM5R7RBA=; b=lsv7aleteo5y VWIx9ybCChiG3FccGm/Xu2TxWWCzw4WVs+4aar71oaguD8aZ3nfhguBnAslY2Zn8eVqn7qxpYm1hG s6l3J9ue9NiJJE9OLCK58gYknVC9zhxXNp6+ym/z/HfiTNeBqGO/0sNzIvGv9yUSaoMhh+LCzKcD2 Y/BSdb4HyPP+3YeM8i7a9FI7JMRC8rzEeY1/jQn6L2j16FwHhLUC9KoRZZYqgDZevsWNiWZyLQG1Q kmwT8QZGj5WbBCA4wOqxbz+ziGIyB6Tb+pFFv2ZtTsK+8KFJDtPIy5UzDFI97uIbDr0DjgHsBQrmi qStWj+yFognwv2QOb4zWRQ==; In-Reply-To: <87wmfmy6mq.fsf@gmail.com> (message from Helmut Eller on Thu, 26 Dec 2024 13:24:13 +0100) 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:327154 Archived-At: > From: Helmut Eller > Cc: gerd.moellmann@gmail.com, pipcet@protonmail.com, ofv@wanadoo.es, > emacs-devel@gnu.org, acorallo@gnu.org > Date: Thu, 26 Dec 2024 13:24:13 +0100 > > On Thu, Dec 26 2024, Eli Zaretskii wrote: > > >> I quite like Pip's proposal of re-installing the SIGSEGV handler with an > >> additional sa_mask argument to block other signals. That would be nice > >> because a) we can do that without changing MPS and b) it's likely more > >> efficient than callbacks. > > > > Are we sure doing so will solve the problem? AFAIU, MPS can take the > > lock before SIGSEGV is delivered, or without its being delivered at > > all, isn't that so? > > Ahem. I completely forgot that. > > An alternative to callbacks would be to implement our own lock module as > described here: > > https://memory-pool-system.readthedocs.io/en/latest/topic/porting.html > > It would probably be a clean and efficient solution; but it would > basically be our own fork of MPS. Probably. I still think we should talk to the MPS folks and hear what they suggest. > >> It would still be nice to simplify some signal handlers, like > >> handle_interrupt_signal, but with other signals blocked for SIGSEGV, it > >> would all be quite independent of MPS. > > > > Maybe. What bothers me more is whether the signals are delivered only > > to the main thread or to other threads. AFAIU, this behavior is > > system-dependent, and currently we seem to rely on the fact that the > > signals is delivered to the main thread. Given that we have other > > threads, including the MPS thread, I'm not sure we have this figured > > out. > > I thought deliver_process_signal was there to forward signals to the > main thread but you certainly know better what it does and doesn't. Actually, we need Paul Eggert to chime in, because he knows much more about this than I do. We have arrangements for when a signal is delivered to a thread, but I think Paul said this should rarely if ever happen. My bother is what if the signal is delivered when the MPS thread runs.