From: George P <georgepanagopo@gmail.com>
To: 66151@debbugs.gnu.org
Subject: bug#66151: 29.1.50; daemon crashing after X forwarding disconnects
Date: Tue, 9 Apr 2024 10:16:09 -0500 [thread overview]
Message-ID: <CAGcjMxmg029kmHjH7V_FnpqsJbPRZxjtM3JtZoO9v38j0Fsg-A@mail.gmail.com> (raw)
In-Reply-To: <CA+CxCG_5ZA0OEDuOuRq8V++pSyZwM0eQ0y5rCt0GvpEKETfMsA@mail.gmail.com>
Hi,
I am able to reproduce this bug without launching a new emacsclient.
Steps to reproduce:
- Start emacs daemon.
- Connect using emacsclient -c.
- Connect remotely to the daemon and run another emacsclient -c using
X forwarding.
- Crash the X forwarding connection created in the previous step.
- Go back to the emacsclient running locally on the daemon and run
(set-fontset-font t '(#xe000 . #xf8ff) "Symbols Nerd Font Mono")
The reason that Ben was seeing a crash with a new emacsclient is
because he is using Doom (an Emacs framework) that attached a function
to server-after-make-hook that called set-fontset-font in the above
way. As Eli said, there is really no good reason to run such a hook
after the first frame, and this behavior has been fixed in Doom. (To
Ben: try upgrading Doom and see if it fixes your issue, if not let me
know!)
Surprisingly, the segfault still happens even if I explicitly call
delete-frame on the dead frame before calling set-fontset-font. Also,
I am unable to reproduce this bug without Doom (i.e. launching the
daemon with -Q).
I am confused as to why emacs doesn't automatically clean up frames
that have been disconnected like this. If emacs survives a crash of
the X server, it should be able to identify that the display is dead
(e.g. by checking the validity of output_data.x) and remove it from
the (frame-list), preventing any subsequent commands from acting on
these frames. It has to do something more than what delete-frame does,
as that does not fix the issue (even though it removes the frame from
the (frame-list)).
Note: using GTK is very different, as emacs crashes *without* having
to run set-fontset-font (i.e. emacs crashes when the X forwarding
connection crashes). With lucid, emacs continues to run fine with the
exception of this bug for me.
next prev parent reply other threads:[~2024-04-09 15:16 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 10:22 bug#66151: 29.1.50; daemon crashing after X forwarding disconnects Benjamin Schwehn
2023-09-22 12:22 ` Eli Zaretskii
2023-09-22 13:12 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-22 13:16 ` Eli Zaretskii
2023-09-22 14:28 ` Benjamin Schwehn
2023-09-22 15:07 ` Eli Zaretskii
2023-09-22 16:51 ` Benjamin Schwehn
2023-09-22 23:42 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-09 15:02 ` bug#66151: George P
2024-04-09 15:16 ` George P [this message]
2024-04-09 17:28 ` bug#66151: 29.1.50; daemon crashing after X forwarding disconnects George P
2024-04-10 2:02 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-10 15:42 ` George P
2024-04-11 0:50 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-12 2:03 ` George P
2024-04-13 1:51 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-13 7:46 ` George P
2024-04-13 11:45 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-13 17:56 ` George P
2024-04-18 10:40 ` Eli Zaretskii
2024-04-19 9:07 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-19 11:15 ` Eli Zaretskii
2024-04-19 12:00 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-27 8:37 ` Eli Zaretskii
2024-05-05 16:25 ` George P
2024-05-06 11:02 ` Eli Zaretskii
2024-05-07 0:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-09 20:36 ` George P
2024-05-07 20:26 ` Benjamin Schwehn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGcjMxmg029kmHjH7V_FnpqsJbPRZxjtM3JtZoO9v38j0Fsg-A@mail.gmail.com \
--to=georgepanagopo@gmail.com \
--cc=66151@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).