Subject: RE: bug#65811: 27.1; zzzzzzzz forever

From: Bruce Adams <[email-masked]>
Date: Fri, 8 Sep 2023 19:54:56 +0000

Here is another instance of the idle crash with full backtrace.
By "idle crash" I mean I was AFK for a few hours and came back and there was a SIGABRT.

gdb) cont
Continuing.
[Detaching after vfork from child process 24730]
[Detaching after vfork from child process 24731]
[Detaching after vfork from child process 25402]
[Detaching after vfork from child process 25403]
[Detaching after vfork from child process 25454]
[Detaching after vfork from child process 25455]
[Detaching after vfork from child process 25456]

Thread 1 "emacs" received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140210052194304) at ./nptl/pthread_kill.c:44
44      ./nptl/pthread_kill.c: No such file or directory.
(gdb) thread apply all bt

Thread 7 (Thread 0x7f8519ffb640 (LWP 23561) "dconf worker"):
#0  0x00007f853544ad7f in __GI___poll (fds=0x5604b7104350, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f8536b9f1f6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f8536b473e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f85305f733d in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007f8536b78a51 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f85353c6b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#6  0x00007f8535458a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 6 (Thread 0x7f851a7fc640 (LWP 23560) "emacs"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f8514000b98) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f8514000b98) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f8514000b98, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f85353c5ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5604b6f37d50, cond=0x7f8514000b70) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f8514000b70, mutex=0x5604b6f37d50) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f8530ae1caf in ?? () from /usr/lib/wsl/lib/libd3d12core.so
#6  0x00007f8530dbc7bb in ?? () from /usr/lib/wsl/lib/libd3d12core.so
#7  0x00007f8530dbcd6b in ?? () from /usr/lib/wsl/lib/libd3d12core.so
#8  0x00007f85353c6b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f8535458a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 5 (Thread 0x7f851affd640 (LWP 23559) "emacs"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f8514000b98) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f8514000b98) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f8514000b98, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f85353c5ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5604b6f37d50, cond=0x7f8514000b70) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f8514000b70, mutex=0x5604b6f37d50) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f8530ae1caf in ?? () from /usr/lib/wsl/lib/libd3d12core.so
#6  0x00007f8530dbc7bb in ?? () from /usr/lib/wsl/lib/libd3d12core.so
#7  0x00007f8530dbcd6b in ?? () from /usr/lib/wsl/lib/libd3d12core.so
#8  0x00007f85353c6b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f8535458a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 4 (Thread 0x7f851b7fe640 (LWP 23558) "emacs"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f8514000b98) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f8514000b98) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f8514000b98, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f85353c5ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5604b6f37d50, cond=0x7f8514000b70) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f8514000b70, mutex=0x5604b6f37d50) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f8530ae1caf in ?? () from /usr/lib/wsl/lib/libd3d12core.so
#6  0x00007f8530dbc7bb in ?? () from /usr/lib/wsl/lib/libd3d12core.so
#7  0x00007f8530dbcd6b in ?? () from /usr/lib/wsl/lib/libd3d12core.so
#8  0x00007f85353c6b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f8535458a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
--Type <RET> for more, q to quit, c to continue without paging--

Thread 3 (Thread 0x7f851bfff640 (LWP 23557) "emacs"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7f8514000b98) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f8514000b98) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f8514000b98, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f85353c5ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5604b6f37d50, cond=0x7f8514000b70) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7f8514000b70, mutex=0x5604b6f37d50) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f8530ae1caf in ?? () from /usr/lib/wsl/lib/libd3d12core.so
#6  0x00007f8530dbc7bb in ?? () from /usr/lib/wsl/lib/libd3d12core.so
#7  0x00007f8530dbcd6b in ?? () from /usr/lib/wsl/lib/libd3d12core.so
#8  0x00007f85353c6b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f8535458a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 2 (Thread 0x7f8531b1c640 (LWP 23556) "gmain"):
#0  0x00007f853544ad7f in __GI___poll (fds=0x5604b6ba9930, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f8536b9f1f6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f8536b473e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f8536b47431 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f8536b78a51 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f85353c6b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#6  0x00007f8535458a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 1 (Thread 0x7f85325ae000 (LWP 23555) "emacs"):
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140210052194304) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140210052194304) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140210052194304, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007f8535374476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00005604b4c5ba65 in terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=40) at ./debian/build-src/src/emacs.c:409
#5  0x00005604b4c5bf4f in emacs_abort () at ./debian/build-src/src/sysdep.c:2461
#6  0x00005604b4c58e0c in redisplay_internal () at ./debian/build-src/src/xdisp.c:15298
#7  0x00005604b4ca70d6 in redisplay_preserve_echo_area (from_where=from_where@entry=13) at ./debian/build-src/src/xdisp.c:16111
#8  0x00005604b4e04868 in Fdelete_process (process=0x5604b6d1f175) at ./debian/build-src/src/process.c:1095
#9  0x00005604b4e0c525 in kill_buffer_processes (buffer=buffer@entry=0x0) at ./debian/build-src/src/process.c:8050
#10 0x00005604b4d46a9a in shut_down_emacs (sig=0, stuff=0x0) at ./debian/build-src/src/emacs.c:2465
#11 0x00005604b4c5aefc in x_connection_closed (dpy=dpy@entry=0x5604b6df6e90, error_message=error_message@entry=0x7fffb2d49d28 "Connection lost to X server ':0'", ioerror=ioerror@entry=true) at ./debian/build-src/src/xterm.c:10058
#12 0x00005604b4c5aff3 in x_io_error_quitter (display=0x5604b6df6e90) at ./debian/build-src/src/xterm.c:10161
#13 0x00007f85369cd2f3 in _XIOError () from /lib/x86_64-linux-gnu/libX11.so.6
#14 0x00007f85369d256f in _XReply () from /lib/x86_64-linux-gnu/libX11.so.6
#15 0x00007f85369b1568 in XGetWindowProperty () from /lib/x86_64-linux-gnu/libX11.so.6
#16 0x00007f853716f1f9 in ?? () from /lib/x86_64-linux-gnu/libgdk-3.so.0
#17 0x00007f853716f30e in ?? () from /lib/x86_64-linux-gnu/libgdk-3.so.0
#18 0x00007f85371704dc in gdk_x11_screen_supports_net_wm_hint () from /lib/x86_64-linux-gnu/libgdk-3.so.0
#19 0x00007f8537176b4f in ?? () from /lib/x86_64-linux-gnu/libgdk-3.so.0
#20 0x00007f8536c60700 in g_signal_emit_valist () from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007f8536c60863 in g_signal_emit () from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#22 0x00007f853713d966 in ?? () from /lib/x86_64-linux-gnu/libgdk-3.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#23 0x00007f853712a2ad in ?? () from /lib/x86_64-linux-gnu/libgdk-3.so.0
#24 0x00007f8536b4a2c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007f8536b49c44 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007f8536b9f258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007f8536b473e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007f8537448d99 in gtk_main_iteration () from /lib/x86_64-linux-gnu/libgtk-3.so.0
#29 0x00005604b4d15fd3 in XTread_socket (terminal=<optimized out>, hold_quit=0x7fffb2d4a520) at ./debian/build-src/src/xterm.c:9382
#30 0x00005604b4d4e3e2 in gobble_input () at ./debian/build-src/src/keyboard.c:6891
#31 0x00005604b4d4e9d5 in handle_async_input () at ./debian/build-src/src/keyboard.c:7128
#32 process_pending_signals () at ./debian/build-src/src/keyboard.c:7142
#33 0x00005604b4e09c95 in wait_reading_process_output (time_limit=time_limit@entry=0, nsecs=nsecs@entry=0, read_kbd=read_kbd@entry=-1, do_display=true, wait_for_cell=wait_for_cell@entry=0x0, wait_proc=wait_proc@entry=0x0, just_wait_proc=0) at ./debian/build-src/src/process.c:5250
#34 0x00005604b4d5258f in kbd_buffer_get_event (end_time=0x0, used_mouse_menu=0x7fffb2d4b02b, kbp=<synthetic pointer>) at ./debian/build-src/src/keyboard.c:3866
#35 read_event_from_main_queue (used_mouse_menu=0x7fffb2d4b02b, local_getcjmp=0x7fffb2d4ac30, end_time=0x0) at ./debian/build-src/src/keyboard.c:2156
#36 read_decoded_event_from_main_queue (used_mouse_menu=<optimized out>, prev_event=<optimized out>, local_getcjmp=<optimized out>, end_time=<optimized out>) at ./debian/build-src/src/keyboard.c:2220
#37 read_char (commandflag=1, map=0x5604b7e61683, prev_event=0x0, used_mouse_menu=0x7fffb2d4b02b, end_time=0x0) at ./debian/build-src/src/keyboard.c:2830
#38 0x00005604b4d54b6a in read_key_sequence (keybuf=<optimized out>, prompt=0x0, dont_downcase_last=<optimized out>, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=<optimized out>) at ./debian/build-src/src/keyboard.c:9553
#39 0x00005604b4d5630c in command_loop_1 () at ./debian/build-src/src/keyboard.c:1350
#40 0x00005604b4dc3f67 in internal_condition_case (bfun=bfun@entry=0x5604b4d56110 <command_loop_1>, handlers=handlers@entry=0x90, hfun=hfun@entry=0x5604b4d4ca80 <cmd_error>) at ./debian/build-src/src/eval.c:1356
#41 0x00005604b4d470f0 in command_loop_2 (ignore=ignore@entry=0x0) at ./debian/build-src/src/keyboard.c:1091
#42 0x00005604b4dc3ea9 in internal_catch (tag=tag@entry=0xd530, func=func@entry=0x5604b4d470c0 <command_loop_2>, arg=arg@entry=0x0) at ./debian/build-src/src/eval.c:1117
#43 0x00005604b4d4707e in command_loop () at ./debian/build-src/src/keyboard.c:1070
#44 0x00005604b4d4c68a in recursive_edit_1 () at ./debian/build-src/src/keyboard.c:714
#45 0x00005604b4d4c9c9 in Frecursive_edit () at ./debian/build-src/src/keyboard.c:786
#46 0x00005604b4c63aca in main (argc=1, argv=<optimized out>) at ./debian/build-src/src/emacs.c:2062

-----Original Message-----
From: Eli Zaretskii <[email-masked]> 
Sent: Friday, September 8, 2023 4:31 PM
To: Bruce Adams <[email-masked]>
Cc: [email-masked]; [email-masked]
Subject: Re: bug#65811: 27.1; zzzzzzzz forever

> From: Bruce Adams <[email-masked]>
> CC: "[email-masked]" <[email-masked]>
> Date: Fri, 8 Sep 2023 15:10:06 +0000
> 
> I have a backtrace here:
> 
> apt-get changelog emacs
> Get:1 https://changelogs.ubuntu.com emacs 1:27.1+1-3ubuntu5.1 
> Changelog [113 kB] Fetched 113 kB in 1s (157 kB/s) 
> brucea@Bruce-PC-23:~/work/git/ubuntu-servers$ Connection lost to X server ':0'
> When compiled with GTK, Emacs cannot recover from X disconnects.
> This is a GTK bug: https://gitlab.gnome.org/GNOME/gtk/issues/221
> For details, see etc/PROBLEMS.
> Backtrace:
> emacs(+0x150e55)[0x55b8db8bde55]
> emacs(+0x4aa38)[0x55b8db7b7a38]
> emacs(+0x4af4f)[0x55b8db7b7f4f]
> emacs(+0x49f22)[0x55b8db7b6f22]
> emacs(+0x49ff3)[0x55b8db7b6ff3]
> /lib/x86_64-linux-gnu/libX11.so.6(_XIOError+0x63)[0x7f076d2c82f3]
> /lib/x86_64-linux-gnu/libX11.so.6(_XReply+0x3ef)[0x7f076d2cd56f]
> /lib/x86_64-linux-gnu/libX11.so.6(XGetWindowProperty+0x108)[0x7f076d2a
> c568] /lib/x86_64-linux-gnu/libgdk-3.so.0(+0x781f9)[0x7f076da6a1f9]
> /lib/x86_64-linux-gnu/libgdk-3.so.0(+0x7830e)[0x7f076da6a30e]
> /lib/x86_64-linux-gnu/libgdk-3.so.0(gdk_x11_screen_supports_net_wm_hin
> t+0x8c)[0x7f076da6b4dc] 
> /lib/x86_64-linux-gnu/libgdk-3.so.0(+0x7fb4f)[0x7f076da71b4f]
> /lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit_valist+0x1290)
> [0x7f076d55b700] 
> /lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit+0x93)[0x7f076d
> 55b863] /lib/x86_64-linux-gnu/libgdk-3.so.0(+0x46966)[0x7f076da38966]
> /lib/x86_64-linux-gnu/libgdk-3.so.0(+0x332ad)[0x7f076da252ad]
> /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x562c8)[0x7f076d4452c8]
> /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x174)[
> 0x7f076d444c44] 
> /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0xab258)[0x7f076d49a258]
> /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x33)[
> 0x7f076d4423e3] 
> /lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_main_iteration+0x19)[0x7f076dd
> 43d99]
> emacs(+0x104fd3)[0x55b8db871fd3]
> emacs(+0x13d3e2)[0x55b8db8aa3e2]
> emacs(+0x13d9d5)[0x55b8db8aa9d5]
> emacs(+0x1f8c95)[0x55b8db965c95]
> emacs(+0x14158f)[0x55b8db8ae58f]
> emacs(+0x143b6a)[0x55b8db8b0b6a]
> emacs(+0x14530c)[0x55b8db8b230c]
> emacs(+0x1b2f67)[0x55b8db91ff67]
> emacs(+0x1360f0)[0x55b8db8a30f0]
> emacs(+0x1b2ea9)[0x55b8db91fea9]
> emacs(+0x13607e)[0x55b8db8a307e]
> emacs(+0x13b68a)[0x55b8db8a868a]
> emacs(+0x13b9c9)[0x55b8db8a89c9]
> emacs(+0x52aca)[0x55b8db7bfaca]
> /lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7f076bc56d90]
> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7f076bc56e40
> ]
> emacs(+0x531b5)[0x55b8db7c01b5]
> 
> [1]+  Aborted                 emacs

Thanks, but those addresses can only be interpreted on your machine.
So either use the method described in the node "Crashing" of the Emacs user manual, or (better) run Emacs under GDB, and when it crashes and GDB gets control, type at the GDB prompt:

  (gdb) thread apply all bt

and post here everything that GDB shows in response.