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: Tue, 31 Dec 2024 16:27:45 +0200 Message-ID: <86a5cclyfy.fsf@gnu.org> References: <799DDBC5-2C14-4476-B1E0-7BA2FE9E7901@toadstyle.org> <87h66loc17.fsf@gmail.com> <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> <86msgcm1nm.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="22165"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eller.helmut@gmail.com, pipcet@protonmail.com, spd@toadstyle.org, emacs-devel@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 31 15:28:16 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 1tSdEG-0005eh-K0 for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Dec 2024 15:28:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSdDy-0003Q4-Qd; Tue, 31 Dec 2024 09:27:58 -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 1tSdDq-0003Oo-Il for emacs-devel@gnu.org; Tue, 31 Dec 2024 09:27:52 -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 1tSdDp-00042g-G2; Tue, 31 Dec 2024 09:27:49 -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=Ur8+7ASOMIn+8A+DOKs5lfChO0BnOa2p3MRVVDKcxv0=; b=iSiQw4XUPI19nWHoVzuC HtWtO+3qSnJX+tjUTB5QPX4D97TsP1HczwwT6Iul0WLOamI3LiVeqbn760yySkBI1mWPRkyaAnUi5 MnbPBK3saqAMwVWb99+W/d7DeFPwqdScemnRI5qkw/u94SEesi5pP6mGCUkeWrcfowWqvGJMwcaPv gr1Y0iTU95CYyNI0jMTtUJ6SA/N/KsfjFiY/0H9QuKaCvwuRjC6JAqHazKc1L+gvk4viTTk9fPbqP iRG0IMiHwU+g+jJPUSqTRoaKoX1Wvt+s06hUJ/dDfgTACfxhUHwtkgg3yojrU92wLjCA9xxxrzenq NtK3wHfRZ4PhGg==; In-Reply-To: (message from Gerd =?utf-8?Q?M?= =?utf-8?Q?=C3=B6llmann?= on Tue, 31 Dec 2024 15:15:04 +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:327513 Archived-At: > From: Gerd Möllmann > Cc: eller.helmut@gmail.com, pipcet@protonmail.com, spd@toadstyle.org, > emacs-devel@gnu.org > Date: Tue, 31 Dec 2024 15:15:04 +0100 > > Eli Zaretskii writes: > > > If the problem is other signals in [t1, t2], we could install the > > signal handler in a way that masks all other signals while the handler > > runs. > > That would be necessary, but there's another thing Helmut pointed out. > At t0, when we enter the SIGPROF handler, we may have interrupted > pthread code in the Emacs thread, so pthread may currently be in an > inconsistent state. If that really can happen, then pthreads is more fragile than I hoped. I hoped they don't let signals interrupt them when they are in critical sections like that. Are we sure this danger is real? > I'd like to instead revive the idea of getting the backtrace in the > signal handler and doing anything else elsewhere. If it works, sure. But I thought copying the data had the same problems as accessing it from the handler? > Maybe, after reading igc.org, that is acceptable maintenance-wise? Can you show a patch?