From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.bugs Subject: bug#54715: 28.0.92; crash when X server died Date: Tue, 05 Apr 2022 15:10:45 -0400 Message-ID: <87sfqrs5vu.fsf@redhat.com> References: <87tub8v94y.fsf@redhat.com> <87ilro5ohc.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18870"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.92 (gnu/linux) Cc: 54715@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 05 21:11:11 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 1nboa6-0004ic-Je for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Apr 2022 21:11:10 +0200 Original-Received: from localhost ([::1]:57308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nboa5-000720-6H for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Apr 2022 15:11:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nboZy-00071n-OJ for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2022 15:11:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34104) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nboZy-0003dJ-Dm for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2022 15:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nboZy-00075z-9q for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2022 15:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Raeburn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Apr 2022 19:11:02 +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.164918585127253 (code B ref 54715); Tue, 05 Apr 2022 19:11:02 +0000 Original-Received: (at 54715) by debbugs.gnu.org; 5 Apr 2022 19:10:51 +0000 Original-Received: from localhost ([127.0.0.1]:56234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nboZm-00075U-Rv for submit@debbugs.gnu.org; Tue, 05 Apr 2022 15:10:51 -0400 Original-Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:53378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nboZl-00075M-6d for 54715@debbugs.gnu.org; Tue, 05 Apr 2022 15:10:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649185848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5PIAC0VNBP/CP+rpNX0A4XUpASLo4IvyQlKQyp+AN44=; b=bzS+mxyrGkwzIAeaQPy826BXGmnze2ReRf4MRivqGOHFLioxpAsnsblBbO3seYfJ7wr549 pAnJee3QbbBvF7trORzqNKyHsGB6fD9Q5PukZm5qzIjppRC81nToHv0qRuf3buzzIHampq 9WkA33PKdD+kG8WVAqTuIA5m8GAa2/0= Original-Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-528-PCGXhCf1OLWBELUWlNh4MA-1; Tue, 05 Apr 2022 15:10:47 -0400 X-MC-Unique: PCGXhCf1OLWBELUWlNh4MA-1 Original-Received: by mail-qv1-f69.google.com with SMTP id g1-20020a0562140ac100b00443ca5e8059so416539qvi.17 for <54715@debbugs.gnu.org>; Tue, 05 Apr 2022 12:10:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=5PIAC0VNBP/CP+rpNX0A4XUpASLo4IvyQlKQyp+AN44=; b=Istux3QOpL8NuOF2120ZVjff6/33xcVdHcRSjrmQq+Sv8w0waoy/T0ClHsxAZjE616 qxSG0ImvJPjAgOKrMpG+dSKWpv9gL1vT0GZYwtJh1AK8aoo64BYJVKWQBIVU74Najf5f iHqSgjp5YhZ81Q5dtrWYEE4W/KUZVkRBZhM3pcNU23C3X7BhFe7GfhLolYJL1ExQFSOZ ESTkLO9af8rubKn79SCozpOk9u99I5TygUw4G89fdUkSij2gvmhDqxSev8A8650Q3ZQQ 93nUZ+fjsAv/sUydtYHb8Lw/m34r7Vsc5w+KU6qk+tXFw0ogDt3kYh5Oe3QObKLtuxBU QWSA== X-Gm-Message-State: AOAM530G2PNHsF5ipyr6qW8IHFjYQ4M472ZNUda5PQ3MlHHTMUhObLMi 4XKAzH4jRRlvncXMmEsIh69gJRHxGoeRD0HHfhtF2y/Pl7F2xnuukX9Brt18xacnn1FzDsbEb13 ulD4RdjdaVtgIf7s= X-Received: by 2002:a05:6214:4016:b0:441:28be:7c45 with SMTP id kd22-20020a056214401600b0044128be7c45mr4328240qvb.80.1649185847257; Tue, 05 Apr 2022 12:10:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEvNU3Gzd/u8lkR0wkrRY9QiMcwLsR2ttLkrWDrjIEM4TQdUBguyAUpr1mQry75aNrSocemA== X-Received: by 2002:a05:6214:4016:b0:441:28be:7c45 with SMTP id kd22-20020a056214401600b0044128be7c45mr4328226qvb.80.1649185847066; Tue, 05 Apr 2022 12:10:47 -0700 (PDT) Original-Received: from crash (c-24-60-138-149.hsd1.ma.comcast.net. [24.60.138.149]) by smtp.gmail.com with ESMTPSA id h27-20020a05620a13fb00b0067b3615e4acsm8079134qkl.70.2022.04.05.12.10.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 12:10:46 -0700 (PDT) In-Reply-To: <87ilro5ohc.fsf@yahoo.com> (Po Lu's message of "Tue, 05 Apr 2022 09:05:19 +0800") Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=raeburn@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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:229460 Archived-At: Po Lu writes: > :0 and :0.0 are different X servers from the point of view of Xlib. > Don't mix up display names like that: it just wastes display > connections. I haven=E2=80=99t been, intentionally. I think the GNOME environment is do= ing it somewhere. Emacs is launched as one of my startup applications; emacsclient is run via an icon in the top bar on my screen, or a global key binding, or, occasionally, from a Firefox plugin. > 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?), To clarify: I used to run Emacs as a daemon (which would=E2=80=99ve been relevant if it meant there was another, invisible terminal frame), but apparently I stopped a while ago. That=E2=80=99s what I meant that my use = of it had =E2=80=9Cfallen by the wayside=E2=80=9D. (Perhaps I should=E2=80=99ve = just not mentioned it.) So with both instances of the local display connection dead at the same time, there are no working frames left. Eli wrote: >> 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. In server-start, hooks are added to kill-emacs-hook and delete-frame-functions, among others; tramp-dump-connection-properties and org-babel-remove-temporary-directory are also on the list. But server-force-stop appears in the stack trace. It calls server-start, which calls delete-process, which calls redisplay_preserve_echo_area. Ken