From: Noam Postavsky <npostavs@gmail.com>
To: Doug Gilmore <dougjgilmore@gmail.com>
Cc: 23939@debbugs.gnu.org
Subject: bug#23939: Segfault in daemon mode Emacs when detaching an X session
Date: Sun, 05 May 2019 00:15:40 -0400 [thread overview]
Message-ID: <87k1f5mt8z.fsf@gmail.com> (raw)
In-Reply-To: <CADZFUQZ06gySPwYtR__yVkG1LTKXNNZTHc4cx4OU+Ef74C1t=Q@mail.gmail.com> (Doug Gilmore's message of "Sun, 10 Jul 2016 17:00:49 -0700")
#14958 = emacs --daemon crashing when X-frames are removed ungracefully
#11676 = Daemon crashes when ssh dies
#22174 = emacs --daemon crashes when ssh is disconnected. I am using lucid x toolkit.
merge 14958 11676 22174
#11639 = 24.0.95; Emacs daemon hangs when emacsclient was killed
# probably the GTK thing
merge 11639 8501
quit
Doug Gilmore <dougjgilmore@gmail.com> writes:
> I have been running my own build of Emacs 24.2 for quite a while in
> daemon mode for quite a while without any problems except that the
> daemon would on rare occasions crash when I detached a windows frame
> via the delete-frame Emacs command. The other day this happened
> several times in succession when connecting to a daemon running on
> another host and I was able to catch the failure under an attached gdb
> session. I attached a backtrace and a prototype fix.
>
> I have been building my own Emacs on Ubuntu-12/14 configured with the
> --with-x-toolkit=lucid option, so this is not a Gtk issue.
>
> Has anyone else been seeing this problem?
There are some other reports about Emacs daemon dying when closing X
sessions, but the backtraces look different, so I guess it's not the
same problem.
> #0 x_uncatch_errors () at /scratch/dgilmore/emacs-24.2/src/xterm.c:7672
> #1 0x00000000004cb588 in x_catch_errors_unwind (dummy=<optimized out>) at /scratch/dgilmore/emacs-24.2/src/xselect.c:546
> #2 0x000000000055b4ce in unbind_to (count=<optimized out>, value=11872738) at /scratch/dgilmore/emacs-24.2/src/eval.c:3433
> #3 0x000000000055b6e5 in unwind_to_catch (catch=0x7ffc44910f60, value=<optimized out>) at /scratch/dgilmore/emacs-24.2/src/eval.c:1314
> #4 0x000000000055d5a9 in Fsignal (error_symbol=11924850, data=38401462) at /scratch/dgilmore/emacs-24.2/src/eval.c:1764
> (gdb) p x_error_message
> $1 = (struct x_error_message_stack *) 0x0
> Subject: [PATCH] Make sure x_error_message is not NULL.
>
> Before dereferencing the pointer.
> @@ -7665,6 +7665,14 @@ x_uncatch_errors (void)
> {
> struct x_error_message_stack *tmp;
>
> + /* In rare situations when running Emacs run in daemon mode,
> + shutting down an emacsclient via delete-frame can cause
> + x_uncatch_errors to be called when x_error_message is set to
> + NULL. */
> +
> + if (x_error_message == NULL)
> + return;
> +
If this really is possible, I guess a NULL check wouldn't be a bad
thing...
next prev parent reply other threads:[~2019-05-05 4:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-11 0:00 bug#23939: Segfault in daemon mode Emacs when detaching an X session Doug Gilmore
2019-05-05 4:15 ` Noam Postavsky [this message]
2020-08-19 12:06 ` Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1f5mt8z.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=23939@debbugs.gnu.org \
--cc=dougjgilmore@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.