GNU bug report logs -
#75629
30.0.93; restart-emacs does not reliably restart Emacs
Previous Next
To reply to this bug, email your comments to 75629 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75629
; Package
emacs
.
(Fri, 17 Jan 2025 11:07:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Daniel Mendler <mail <at> daniel-mendler.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 17 Jan 2025 11:07:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Sometimes `restart-emacs' fails to restart Emacs. In my setup this
happens in particular after recompiling my init.el and then invoking
`restart-emacs'. This is an unfortunate coincidence, since my only
motivation to restart Emacs is in the case where I've applied
significant configuration changes. My Emacs is started from .xsession
via `exec emacs' since EXWM is my window manager. Unfortunately I've not
managed to create a minimal recipe so far. Has this problem been
observed before?
In GNU Emacs 30.0.93 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.18.2, Xaw scroll bars)
Windowing system distributor 'The X.Org Foundation', version 11.0.12101015
System Description: Debian GNU/Linux trixie/sid
Configured using:
'configure --with-tree-sitter
--with-native-compilation --with-x-toolkit=athena --with-dbus
--without-selinux --without-threads --without-gsettings --without-gpm
--with-cairo --with-cairo-xcb --disable-gc-mark-trace --with-xinput2'
Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBOTF LIBSYSTEMD
LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP
SOUND SQLITE3 TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM
XINPUT2 XPM LUCID ZLIB
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75629
; Package
emacs
.
(Fri, 17 Jan 2025 11:16:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 75629 <at> debbugs.gnu.org (full text, mbox):
Daniel Mendler <mail <at> daniel-mendler.de> writes:
> Sometimes `restart-emacs' fails to restart Emacs. In my setup this
> happens in particular after recompiling my init.el and then invoking
> `restart-emacs'. This is an unfortunate coincidence, since my only
> motivation to restart Emacs is in the case where I've applied
> significant configuration changes. My Emacs is started from .xsession
> via `exec emacs' since EXWM is my window manager. Unfortunately I've not
> managed to create a minimal recipe so far. Has this problem been
> observed before?
>
> In GNU Emacs 30.0.93 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
> version 1.18.2, Xaw scroll bars)
> Windowing system distributor 'The X.Org Foundation', version 11.0.12101015
> System Description: Debian GNU/Linux trixie/sid
>
> Configured using:
> 'configure --with-tree-sitter
> --with-native-compilation --with-x-toolkit=athena --with-dbus
> --without-selinux --without-threads --without-gsettings --without-gpm
> --with-cairo --with-cairo-xcb --disable-gc-mark-trace --with-xinput2'
>
> Configured features:
> CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBOTF LIBSYSTEMD
> LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP
> SOUND SQLITE3 TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM
> XINPUT2 XPM LUCID ZLIB
I've found the following backtrace in my .xsession-errors file. It seems
that Emacs is somehow crashing during shutdown. So maybe the problem is
not really about restart, but about some redisplay problem happening
during shutdown.
X protocol error: BadDrawable (invalid Pixmap or Window parameter) on protocol request 62
Serial no: 6422
Failing resource ID (if any): 0x60014c
Minor code: 0
This is a bug! Please report this to bug-gnu-emacs <at> gnu.org!
Backtrace:
emacs(emacs_backtrace+0x3b) [0x55943fdecdfb]
emacs(terminate_due_to_signal+0x6f) [0x55943fca1f4b]
emacs(+0x8a4db) [0x55943fca24db]
emacs(+0x8759c) [0x55943fc9f59c]
emacs(redisplay_preserve_echo_area+0xc5) [0x55943fcfd5c5]
emacs(Fdelete_process+0x106) [0x55943feb8946]
emacs(Ffuncall+0xf6) [0x55943fe5eae6]
~/.config/emacs/eln-cache/30.0.93-9cf938b6/server-0cc44189-400d6018.eln(F7365727665722d73746f70_server_stop_0+0x34a) [0x7f3042f90d3a]
emacs(Ffuncall+0xf6) [0x55943fe5eae6]
~/.config/emacs/eln-cache/30.0.93-9cf938b6/server-0cc44189-400d6018.eln(F7365727665722d666f7263652d73746f70_server_force_stop_0+0x9c) [0x7f3042f91cfc]
emacs(Ffuncall+0xf6) [0x55943fe5eae6]
~/.local/share/emacs/bin/../lib/emacs/30.0.93/native-lisp/30.0.93-9cf938b6/preloaded/subr-13adf6a6-122bc881.eln(F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_148+0x156) [0x7f30467b9c06]
emacs(Ffuncall+0xf6) [0x55943fe5eae6]
emacs(+0x24718d) [0x55943fe5f18d]
emacs(run_hook_with_args+0xd2) [0x55943fe5a9d2]
~/.local/share/emacs/bin/../lib/emacs/30.0.93/native-lisp/30.0.93-9cf938b6/preloaded/subr-13adf6a6-122bc881.eln(F72756e2d686f6f6b2d71756572792d6572726f722d776974682d74696d656f7574_run_hook_query_error_with_timeout_0+0x33) [0x7f30467b9c63]
emacs(Ffuncall+0xf6) [0x55943fe5eae6]
emacs(Fkill_emacs+0xca) [0x55943fca1e30]
emacs(+0x89219) [0x55943fca1219]
emacs(+0x17bebb) [0x55943fd93ebb]
emacs(+0x17c08b) [0x55943fd9408b]
/lib/x86_64-linux-gnu/libX11.so.6(_XError+0x11c) [0x7f304ebe26dc]
/lib/x86_64-linux-gnu/libX11.so.6(+0x4524f) [0x7f304ebdf24f]
/lib/x86_64-linux-gnu/libX11.so.6(+0x452fd) [0x7f304ebdf2fd]
/lib/x86_64-linux-gnu/libX11.so.6(_XReply+0x1fd) [0x7f304ebe048d]
/lib/x86_64-linux-gnu/libX11.so.6(XGetWindowProperty+0x112) [0x7f304ebc44e2]
emacs(+0x182049) [0x55943fd9a049]
emacs(+0x1890fa) [0x55943fda10fa]
emacs(+0x1918fd) [0x55943fda98fd]
emacs(gobble_input+0x111) [0x55943fdd3da1]
emacs(unblock_input+0x55) [0x55943fdd5945]
emacs(redisplay_preserve_echo_area+0xb2) [0x55943fcfd5b2]
emacs(Fdelete_process+0x106) [0x55943feb8946]
emacs(exec_byte_code+0x3dd) [0x55943fea79ed]
emacs(Ffuncall+0xf6) [0x55943fe5eae6]
emacs(Fapply+0x2e8) [0x55943fe5eff8]
emacs(exec_byte_code+0x3dd) [0x55943fea79ed]
emacs(Ffuncall+0xf6) [0x55943fe5eae6]
~/.config/emacs/eln-cache/30.0.93-9cf938b6/xcb-708db4e5-752e3495.eln(F7863623a2d636f6e6e656374696f6e2d73656e74696e656c_xcb_connection_sentinel_0+0x95) [0x7f3042f40945]
emacs(Ffuncall+0xf6) [0x55943fe5eae6]
emacs(Fapply+0x150) [0x55943fe5ee60]
...
Aborted
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75629
; Package
emacs
.
(Fri, 17 Jan 2025 13:13:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 75629 <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 17 Jan 2025 12:06:30 +0100
> From: Daniel Mendler via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> Sometimes `restart-emacs' fails to restart Emacs. In my setup this
> happens in particular after recompiling my init.el and then invoking
> `restart-emacs'. This is an unfortunate coincidence, since my only
> motivation to restart Emacs is in the case where I've applied
> significant configuration changes. My Emacs is started from .xsession
> via `exec emacs' since EXWM is my window manager. Unfortunately I've not
> managed to create a minimal recipe so far. Has this problem been
> observed before?
No, not that I know of.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75629
; Package
emacs
.
(Fri, 17 Jan 2025 13:17:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 75629 <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 17 Jan 2025 12:15:22 +0100
> From: Daniel Mendler via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> I've found the following backtrace in my .xsession-errors file. It seems
> that Emacs is somehow crashing during shutdown. So maybe the problem is
> not really about restart, but about some redisplay problem happening
> during shutdown.
>
> X protocol error: BadDrawable (invalid Pixmap or Window parameter) on protocol request 62
> Serial no: 6422
> Failing resource ID (if any): 0x60014c
> Minor code: 0
> This is a bug! Please report this to bug-gnu-emacs <at> gnu.org!
So please run Emacs under GDB, and in X synchronous mode (see
etc/DEBUG for details), and when it crashes during shutdown, show the
full backtrace produced by GDB (the "thread apply all bt" command when
GDB kicks in).
I think I understand what causes this problem, but more detailed
backtrace is needed to make sure my understanding is correct and the
solution is right.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75629
; Package
emacs
.
(Thu, 30 Jan 2025 13:54:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 75629 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Date: Fri, 17 Jan 2025 12:15:22 +0100
>> From: Daniel Mendler via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>
>> I've found the following backtrace in my .xsession-errors file. It seems
>> that Emacs is somehow crashing during shutdown. So maybe the problem is
>> not really about restart, but about some redisplay problem happening
>> during shutdown.
>>
>> X protocol error: BadDrawable (invalid Pixmap or Window parameter) on protocol request 62
>> Serial no: 6422
>> Failing resource ID (if any): 0x60014c
>> Minor code: 0
>> This is a bug! Please report this to bug-gnu-emacs <at> gnu.org!
>
> So please run Emacs under GDB, and in X synchronous mode (see
> etc/DEBUG for details), and when it crashes during shutdown, show the
> full backtrace produced by GDB (the "thread apply all bt" command when
> GDB kicks in).
>
> I think I understand what causes this problem, but more detailed
> backtrace is needed to make sure my understanding is correct and the
> solution is right.
I am sorry, but I failed to obtain a more detailed backtrace. The
problem does not seem to occur at all with (x-synchronize t). Also I
have difficulties running gdb from the .xsession. In my case, Emacs is
started by X, since it acts as window manager. When Emacs crashes after
M-x restart-emacs (without x-synchronize), I cannot access the gdb repl.
Daniel
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75629
; Package
emacs
.
(Thu, 30 Jan 2025 15:36:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 75629 <at> debbugs.gnu.org (full text, mbox):
> From: Daniel Mendler <mail <at> daniel-mendler.de>
> Cc: 75629 <at> debbugs.gnu.org
> Date: Thu, 30 Jan 2025 14:53:01 +0100
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> Date: Fri, 17 Jan 2025 12:15:22 +0100
> >> From: Daniel Mendler via "Bug reports for GNU Emacs,
> >> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> >>
> >> I've found the following backtrace in my .xsession-errors file. It seems
> >> that Emacs is somehow crashing during shutdown. So maybe the problem is
> >> not really about restart, but about some redisplay problem happening
> >> during shutdown.
> >>
> >> X protocol error: BadDrawable (invalid Pixmap or Window parameter) on protocol request 62
> >> Serial no: 6422
> >> Failing resource ID (if any): 0x60014c
> >> Minor code: 0
> >> This is a bug! Please report this to bug-gnu-emacs <at> gnu.org!
> >
> > So please run Emacs under GDB, and in X synchronous mode (see
> > etc/DEBUG for details), and when it crashes during shutdown, show the
> > full backtrace produced by GDB (the "thread apply all bt" command when
> > GDB kicks in).
> >
> > I think I understand what causes this problem, but more detailed
> > backtrace is needed to make sure my understanding is correct and the
> > solution is right.
>
> I am sorry, but I failed to obtain a more detailed backtrace. The
> problem does not seem to occur at all with (x-synchronize t). Also I
> have difficulties running gdb from the .xsession. In my case, Emacs is
> started by X, since it acts as window manager. When Emacs crashes after
> M-x restart-emacs (without x-synchronize), I cannot access the gdb repl.
Can you use the recipe in the node "Crashing" of the Emacs manual to
produce a readable backtrace from what you have in .xsession-errors?
If thyat succeeds, please post the backtreace.
And maybe Po Lu (CC'ed) has some advice how to debug this further? Or
why redisplay_preserve_echo_area signals a BadDrawable error in this
case? Can we do something (like set some C variable or bind some Lisp
variable) to prevent fatal X errors in redisplay when we are shutting
down Emacs?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75629
; Package
emacs
.
(Thu, 30 Jan 2025 15:58:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 75629 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Daniel Mendler <mail <at> daniel-mendler.de>
>> Cc: 75629 <at> debbugs.gnu.org
>> Date: Thu, 30 Jan 2025 14:53:01 +0100
>>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> >> Date: Fri, 17 Jan 2025 12:15:22 +0100
>> >> From: Daniel Mendler via "Bug reports for GNU Emacs,
>> >> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>> >>
>> >> I've found the following backtrace in my .xsession-errors file. It seems
>> >> that Emacs is somehow crashing during shutdown. So maybe the problem is
>> >> not really about restart, but about some redisplay problem happening
>> >> during shutdown.
>> >>
>> >> X protocol error: BadDrawable (invalid Pixmap or Window parameter) on protocol request 62
>> >> Serial no: 6422
>> >> Failing resource ID (if any): 0x60014c
>> >> Minor code: 0
>> >> This is a bug! Please report this to bug-gnu-emacs <at> gnu.org!
>> >
>> > So please run Emacs under GDB, and in X synchronous mode (see
>> > etc/DEBUG for details), and when it crashes during shutdown, show the
>> > full backtrace produced by GDB (the "thread apply all bt" command when
>> > GDB kicks in).
>> >
>> > I think I understand what causes this problem, but more detailed
>> > backtrace is needed to make sure my understanding is correct and the
>> > solution is right.
>>
>> I am sorry, but I failed to obtain a more detailed backtrace. The
>> problem does not seem to occur at all with (x-synchronize t). Also I
>> have difficulties running gdb from the .xsession. In my case, Emacs is
>> started by X, since it acts as window manager. When Emacs crashes after
>> M-x restart-emacs (without x-synchronize), I cannot access the gdb repl.
>
> Can you use the recipe in the node "Crashing" of the Emacs manual to
> produce a readable backtrace from what you have in .xsession-errors?
> If thyat succeeds, please post the backtreace.
So far no success due to lack of debug info. I have to rebuild Emacs.
> And maybe Po Lu (CC'ed) has some advice how to debug this further? Or
> why redisplay_preserve_echo_area signals a BadDrawable error in this
> case? Can we do something (like set some C variable or bind some Lisp
> variable) to prevent fatal X errors in redisplay when we are shutting
> down Emacs?
Would it be possible to first delete all remaining frames before
proceeding with the shutdown?
Daniel
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75629
; Package
emacs
.
(Thu, 30 Jan 2025 16:37:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 75629 <at> debbugs.gnu.org (full text, mbox):
> From: Daniel Mendler <mail <at> daniel-mendler.de>
> Cc: Po Lu <luangruo <at> yahoo.com>, 75629 <at> debbugs.gnu.org
> Date: Thu, 30 Jan 2025 16:57:38 +0100
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> I am sorry, but I failed to obtain a more detailed backtrace. The
> >> problem does not seem to occur at all with (x-synchronize t). Also I
> >> have difficulties running gdb from the .xsession. In my case, Emacs is
> >> started by X, since it acts as window manager. When Emacs crashes after
> >> M-x restart-emacs (without x-synchronize), I cannot access the gdb repl.
> >
> > Can you use the recipe in the node "Crashing" of the Emacs manual to
> > produce a readable backtrace from what you have in .xsession-errors?
> > If thyat succeeds, please post the backtreace.
>
> So far no success due to lack of debug info. I have to rebuild Emacs.
OK, please do, I think it will help to have a usable backtrace.
> > And maybe Po Lu (CC'ed) has some advice how to debug this further? Or
> > why redisplay_preserve_echo_area signals a BadDrawable error in this
> > case? Can we do something (like set some C variable or bind some Lisp
> > variable) to prevent fatal X errors in redisplay when we are shutting
> > down Emacs?
>
> Would it be possible to first delete all remaining frames before
> proceeding with the shutdown?
That'd be worse, I think. The problem happens in kill-emacs-hook,
which In your case shuts down the server process, but in general could
ask the user some question, see run-hook-query-error-with-timeout. If
we don't have a frame, we cannot ask.
This bug report was last modified 22 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.