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.bugs Subject: bug#60220: 29.0.60; macOS 13.1 crash shortly after starting Emacs Date: Thu, 22 Dec 2022 10:18:09 +0200 Message-ID: <831qoram2m.fsf@gnu.org> References: <9D33F867-56DD-4612-9E21-ADC1AA09E5CB@gmail.com> 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="12405"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60220@debbugs.gnu.org, aaronjensen@gmail.com To: Gerd =?UTF-8?Q?M=C3=B6llmann?= , Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 22 09:19:36 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1p8Gnf-0002vC-He for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Dec 2022 09:19:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8Gn9-0006MY-Oq; Thu, 22 Dec 2022 03:19:03 -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 1p8Gn8-0006M7-DS for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2022 03:19:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p8Gn7-00072J-PY for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2022 03:19:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p8Gn7-0004Av-Kt for bug-gnu-emacs@gnu.org; Thu, 22 Dec 2022 03:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Dec 2022 08:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60220 X-GNU-PR-Package: emacs Original-Received: via spool by 60220-submit@debbugs.gnu.org id=B60220.167169711416038 (code B ref 60220); Thu, 22 Dec 2022 08:19:01 +0000 Original-Received: (at 60220) by debbugs.gnu.org; 22 Dec 2022 08:18:34 +0000 Original-Received: from localhost ([127.0.0.1]:56907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8Gmg-0004Ac-26 for submit@debbugs.gnu.org; Thu, 22 Dec 2022 03:18:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8Gme-0004AV-KP for 60220@debbugs.gnu.org; Thu, 22 Dec 2022 03:18:32 -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 1p8GmY-0006zC-HX; Thu, 22 Dec 2022 03:18:26 -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=NIYFto7mkHsWbMI/Yt0yIOqOzVG9dp226Lsvo/Gevyk=; b=dUR6OStjBNfzXsBgFovx E5HzAIr+LI4Tfl0ehux/qXIEc8m4nUow5chVxvxAvbxWA4UDiuPRDLPv/i41zrkpSBL/PayLF6vAE /N55EsGnZr3NtSkjlGMYR40u+yMek/xuL1eLLXr9NEA6z+chJ8YFCnxEMHkaWzoUDgh4anZH0kp3M Tqg+BeRw7Etx7SZq+biUBmfJx6QFPpO3yoaFQwHxURgVd5N9977ToORK8tzsgRTP6aLNkGyPZA+vp mlJlckzq5bl29eIHQpEthNmkZHhxEIajPhpYWAZ3HvfcL7zlJfP76DyBsscHLioY3rWV+j6ytDCaB o4nVSrHJG7XOwg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8GmW-0000Ex-RB; Thu, 22 Dec 2022 03:18:25 -0500 In-Reply-To: <9D33F867-56DD-4612-9E21-ADC1AA09E5CB@gmail.com> (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Thu, 22 Dec 2022 06:36:43 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251650 Archived-At: > From: Gerd Möllmann > Date: Thu, 22 Dec 2022 06:36:43 +0100 > Cc: Eli Zaretskii , 60220@debbugs.gnu.org > > I was more thinking of something like this: > > A SIGALRM handler is installed in the original process. SIGALRM continues to be delivered to the new process after execve but the signal handler is now the default handler which terminates the process. > > The man pages I mentioned should say somewhere if that’s plausible. It looks to me like that could be what’s happening. But it’s a guess. > > If it is that, one would need to arrange for SIGALRM to be ignored before execve and reinitialize a timers in the new process. Or something like that. Yes, I think our implementation of restart-emacs might be too naïve. Paul, could you perhaps audit the code which implements restart-emacs, and see if we need to make it safer, in particular wrt signals and *.eln files loaded via dynlib. Note that on Posix platforms we currently load *.eln files with RTLD_LAZY and without RTLD_GLOBAL -- is this of any significance for "restarting" Emacs that was built with native-compilation enabled and has *.eln files loaded? Maybe we need to unload the *.eln before calling execvp? Or maybe we should consider re-implementing restart-emacs in some different way, to avoid these problems? Thanks.