From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#54715: 28.0.92; crash when X server died Date: Tue, 05 Apr 2022 20:52:32 +0800 Message-ID: <87ilrn3d67.fsf@yahoo.com> References: <87tub8v94y.fsf@redhat.com> <87ilro5ohc.fsf@yahoo.com> <83czhvened.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27921"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: raeburn@redhat.com, 54715@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 05 15:06:08 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 1nbisq-0006HE-E1 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Apr 2022 15:06:08 +0200 Original-Received: from localhost ([::1]:45772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbiga-0002GG-Qi for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Apr 2022 08:53:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbigA-0002Fp-Cq for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2022 08:53:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60161) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nbig9-0008PU-Sx for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2022 08:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nbig9-0003jw-NB for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2022 08:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Apr 2022 12:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54715 X-GNU-PR-Package: emacs Original-Received: via spool by 54715-submit@debbugs.gnu.org id=B54715.164916317114358 (code B ref 54715); Tue, 05 Apr 2022 12:53:01 +0000 Original-Received: (at 54715) by debbugs.gnu.org; 5 Apr 2022 12:52:51 +0000 Original-Received: from localhost ([127.0.0.1]:54058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbify-0003jW-Ud for submit@debbugs.gnu.org; Tue, 05 Apr 2022 08:52:51 -0400 Original-Received: from sonic313-56.consmr.mail.ne1.yahoo.com ([66.163.185.31]:35440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbifx-0003jC-6u for 54715@debbugs.gnu.org; Tue, 05 Apr 2022 08:52:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1649163163; bh=kFaFxOfTSmVsQzDqT92cbHayGTWB+FvlxnzJA6o31og=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=S9hSADvG7qRFKeTqkRKXIBMd2alHZfo0m44bs9b0UaGa7DV1W0drRJnapth84UylU858tTcKbk+JOmzaenCoaa0GPj2AM9YmNem4dyLSlXOAAeEgzI2aKHVM3Nt8SvHtdacPidKkK4bFeZLSIl6e+cHoo4q2Nn9pjz9QZd5UabOZypeEWDyjX3yVtFe4JhCSulgpaVSScMCj27Ed/8eBjzmonWVnZFhNgyxqZob7kkk/QTsAOtcTjlWC/PZZkzAMOA2sWpBIjLQbajVrcOrIm1uwpi5SYSqyFboibq5zB68/aebvGpM8pDBntXeesI/IGqB9gfzl7V3uh45yfQcGKg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1649163163; bh=LzDCBKnnKgUfX3eJLJ719fEOiZvuNwOvcxovMvFr/uV=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=h7uI+GS36VegT9ZPg3f8tT1EfdKYqDUUSuT9zshFM7cU2H3sucEVhs6HL+wo6w7XrURrH2G4JNuCT9cacIL2jpOVqaHedoJr9g65pjNKQb+GkU8lQ1JXtzIuLPRWuJooj3OYfT4nymIM0gDWtR+enEfiDOBIN69R1/0H9RTMNpcM3Ej7lh0TxEFKP+U2MdhWYp3qMXlJ5PSeWfnQdzpZ8dcxwdcfcj9GXtMR0T18NXb33zO1KaAs8NOAlyih2dH0rcrvqfuOB00wbYVOLPsLLIXTYSU0xACsGoD0yLdr3Kyf0Pi7pnl09MJKIZ+aWaIWjWMP+aVCLKYjBIb4r/YMAg== X-YMail-OSG: ZZ9piIkVM1kTsYy8RFHhT20pKUJtP.mMmLVtlKPsKhw9B_CXKNL1MoUubPw32wQ WUL4FAb6Q8.2Um5AQofLA7U55_B5zWKrSlhgRr86y5xFWgbejSWW78PD1PJlN1WHopKCTCcNDk4p Gyhts69YKVauIos84_8Za89pFnhCtp3UY.UJJQ1UYuHq4830r_XpYwSehk3f9xSQKBXge7cB3NCb jaGQVkmOcyQi96TRZrZdvGOfvm2rWOazze6mEHM5aCNwswPAWfVTh.wOs6QNPkCgeX.Wa42EMJeP KNNtKmLjnoCJdV9J8YkRzSRx2PIwDf9VQBQfO2qp0vg1d_A91vFfwEXZZPaO15f0nJUIPHIhzjFW EF8TK9faHv2OEt16IRLkR2HwtMzl._5IFrp8HeWssUpT.y4SgfiuCCOYuT2uAE.fAQkI_6wPxVZA lbp.6NM1Wbe6y18J54F_nBUApMrbZkALeWJjucgUI9GhoggtFzJeo0MlJ5Elhyhgrvjd4JHfNLDJ rPEzvKL8WhhnrK8Tos1RnzmVT0DcSUfnYW0p1ojJH8P0uOh5mfEf0rPQxN3dU8z6En2FB_CQwFa0 lDagaZMecQ6OXLieeKT11g9ceyX9ZHxf1Wua1qthOfSB5nNGTJcYm5tibZ0onQZ_rrQ1GF7JYR5p pmtVM9_QyE9qXM5MSL8E8z_o2Mp7LL1Bgs_EiEY7ab5yyZwIwVK80nXQ4707wnqZUH5qnJGv03Rt GPbkoin6Vw0Px.L5cCUD6OEsASLmFxhn8g46tLM5_x.Z9vguwSMHOZclsptlFPf8kp0zsA9J0nCg .wWxUrP73MC94JZ6mNrHFdT0mxHorXxfNcCZHiqTLQ X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Tue, 5 Apr 2022 12:52:43 +0000 Original-Received: by hermes--canary-production-sg3-65d7bd97b5-srcdp (VZM Hermes SMTP Server) with ESMTPA ID 2a9c13e7368cc54b9ae7622d1a5dc0af; Tue, 05 Apr 2022 12:52:36 +0000 (UTC) In-Reply-To: <83czhvened.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 05 Apr 2022 15:16:10 +0300") X-Mailer: WebService/1.1.20001 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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" Xref: news.gmane.io gmane.emacs.bugs:229441 Archived-At: Eli Zaretskii writes: > /* No redisplay if running in batch mode or frame is not yet fully > initialized, or redisplay is explicitly turned off by setting > Vinhibit_redisplay. */ > if ((FRAME_INITIAL_P (SELECTED_FRAME ()) <<<<<<<<<<<<<<<<<<<<<<<<< > && redisplay_skip_initial_frame) > || !NILP (Vinhibit_redisplay)) > return; > > Crystal ball says something is wrong with SELECTED_FRAME, and that > causes the abort. Yes, thanks. I think the problem is that selected_frame is dead. But if my reading of the code is correct, x_connection_closed calls delete_frame on all the frames on the disconnected terminal before Fkill_emacs is called (BTW, is that really right if Emacs is running as a daemon?), and delete_frame tries to find another frame to select, which in this case must be the initial frame, since there are no other terminals left. So I think the problem lies somewhere in delete_frame. Alternatively, selected_frame might have become dead before delete_frame was called on the frames in the second terminal, but I don't see how that could have happened. > My guess would be that Ken's kill-emacs-hooks were called when the X > server died, and one of those hooks is unsafe, in that it causes > redisplay. And the selected frame was something other than the initial frame when redisplay was called, which is probably what's at fault here. > Or maybe we should refrain from calling redisplay_preserve_echo_area > in delete-process when Emacs is shutting down due to a fatal error? I think this isn't supposed to happen at all, especially since Ken is running a daemon, so we shouldn't bubble wrap delete-process because of this. I will try to reproduce this again, hopefully I can get Emacs to crash on my side as well. Thanks.