Subject: bug#70914: 29.3; Crashes often on Windows

From: Simen Endsjø <[email-masked]>
Date: Sat, 18 May 2024 20:36:39 +0200

Reading symbols from
D:\tmp\emacs-bug-70914\emacs-no-native-compilation-o0\simendsjo-build\bin\emacs.exe...
(gdb) run --init-directory=d:/.emacs.d
Starting program:
D:\tmp\emacs-bug-70914\emacs-no-native-compilation-o0\simendsjo-build\bin\emacs.exe
--init-directory=d:/.emacs.d
[New Thread 14504.0x6d74]
[New Thread 14504.0x4924]
[New Thread 14504.0x3d34]
[New Thread 14504.0x2eec]
[New Thread 14504.0x3430]
[New Thread 14504.0x6a3c]
[Thread 14504.0x6a3c exited with code 1]
[New Thread 14504.0x6664]
[Thread 14504.0x6664 exited with code 1]
[New Thread 14504.0x23c]
[Thread 14504.0x23c exited with code 1]
[New Thread 14504.0xd80]
[Thread 14504.0xd80 exited with code 1]
[New Thread 14504.0x3dbc]
[Thread 14504.0x3dbc exited with code 1]
[New Thread 14504.0x1404]
[New Thread 14504.0x5c60]
[Thread 14504.0x5c60 exited with code 1]
[New Thread 14504.0x1600]
[Thread 14504.0x1600 exited with code 1]
[New Thread 14504.0x3ae0]
[Thread 14504.0x3ae0 exited with code 1]
[New Thread 14504.0xbec]
[Thread 14504.0xbec exited with code 1]
[New Thread 14504.0x2588]
[New Thread 14504.0x1b80]
[Thread 14504.0x1b80 exited with code 1]
[New Thread 14504.0x32b4]
[New Thread 14504.0x42d8]
[New Thread 14504.0x6e84]
[New Thread 14504.0x6828]
[New Thread 14504.0xaa8]
[Thread 14504.0xaa8 exited with code 1]
[New Thread 14504.0x68bc]
[Thread 14504.0x68bc exited with code 1]
[New Thread 14504.0x6ea4]
[Thread 14504.0x6ea4 exited with code 1]

Thread 1 received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb)rthread apply all bt

Thread 22 (Thread 14504.0x6828):
#0  0x00007fffecb7acf4 in win32u!NtUserMsgWaitForMultipleObjectsEx ()
from C:\WINDOWS\System32\win32u.dll
#1  0x00007fffef619462 in SHTaskPoolQueueTask () from
C:\WINDOWS\System32\SHCore.dll
#2  0x00007fffef617946 in SHCreateThreadRef () from
C:\WINDOWS\System32\SHCore.dll
#3  0x00007fffef617751 in SHCreateThreadRef () from
C:\WINDOWS\System32\SHCore.dll
#4  0x00007fffedaf257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
#5  0x00007fffef78aa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#6  0x0000000000000000 in ?? ()

Thread 21 (Thread 14504.0x6e84):
#0  0x00007fffef7d35a4 in ntdll!ZwWaitForWorkViaWorkerFactory () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007fffef76537e in ntdll!RtlClearThreadWorkOnBehalfTicket ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x00007fffedaf257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
#3  0x00007fffef78aa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#4  0x0000000000000000 in ?? ()

Thread 20 (Thread 14504.0x42d8):
#0  0x00007fffef7d35a4 in ntdll!ZwWaitForWorkViaWorkerFactory () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007fffef76537e in ntdll!RtlClearThreadWorkOnBehalfTicket ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x00007fffedaf257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
#3  0x00007fffef78aa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#4  0x0000000000000000 in ?? ()

Thread 19 (Thread 14504.0x32b4):
#0  0x00007fffef7d04a4 in ntdll!ZwWaitForMultipleObjects () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007fffed10fda9 in WaitForMultipleObjectsEx () from
C:\WINDOWS\System32\KernelBase.dll
#2  0x00007fffef2c8bbd in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
#3  0x00007fffef2c8a2a in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
#4  0x00007fffef2c881f in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
#5  0x00007fffef2c8719 in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
#6  0x00007fffedaf257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
#7  0x00007fffef78aa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#8  0x0000000000000000 in ?? ()

Thread 17 (Thread 14504.0x2588 "pool"):
#0  0x00007fffef7d3544 in ntdll!ZwWaitForAlertByThreadId () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007fffef7991db in ntdll!RtlSleepConditionVariableSRW () from
C:\WINDOWS\SYSTEM32\ntdll.dll
--Type <RET> for more, q to quit, c to continue without paging--c
#2  0x00007fffed122b79 in SleepConditionVariableSRW () from
C:\WINDOWS\System32\KernelBase.dll
#3  0x00007fff5d106903 in ?? () from C:\msys64\mingw64\bin\libglib-2.0-0.dll
#4  0x00007fff5d174619 in ?? () from C:\msys64\mingw64\bin\libglib-2.0-0.dll
#5  0x00007fff5d173c91 in ?? () from C:\msys64\mingw64\bin\libglib-2.0-0.dll
#6  0x00007fff5d1a85f7 in ?? () from C:\msys64\mingw64\bin\libglib-2.0-0.dll
#7  0x00007fffedd8e634 in msvcrt!_beginthreadex () from
C:\WINDOWS\System32\msvcrt.dll
#8  0x00007fffedd8e70c in msvcrt!_endthreadex () from
C:\WINDOWS\System32\msvcrt.dll
#9  0x00007fffedaf257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
#10 0x00007fffef78aa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#11 0x0000000000000000 in ?? ()

Thread 12 (Thread 14504.0x1404):
#0  0x00007fffecb7acf4 in win32u!NtUserMsgWaitForMultipleObjectsEx ()
from C:\WINDOWS\System32\win32u.dll
#1  0x00007fffeee35e67 in USER32!MsgWaitForMultipleObjects () from
C:\WINDOWS\System32\user32.dll
#2  0x00007fffd5bf3c90 in gdiplus!GdiplusStartup () from
C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.22621.3527_none_57f93980ce19a444\GdiPlus.dll
#3  0x00007fffd5bf3be9 in gdiplus!GdiplusStartup () from
C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.22621.3527_none_57f93980ce19a444\GdiPlus.dll
#4  0x00007fffedaf257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
#5  0x00007fffef78aa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#6  0x0000000000000000 in ?? ()

Thread 6 (Thread 14504.0x3430):
#0  0x00007fffecb71534 in win32u!NtUserGetMessage () from
C:\WINDOWS\System32\win32u.dll
#1  0x00007fffeee35eca in USER32!GetMessageW () from
C:\WINDOWS\System32\user32.dll
#2  0x00007ff6e4d0c398 in w32_msg_pump (msg_buf=0x5e8fe90) at w32fns.c:3336
#3  0x00007ff6e4d0c63f in w32_msg_worker (arg=0x0) at w32fns.c:3574
#4  0x00007fffedaf257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
#5  0x00007fffef78aa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#6  0x0000000000000000 in ?? ()

Thread 5 (Thread 14504.0x2eec):
#0  0x00007fffef7cffd4 in ntdll!ZwDelayExecution () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007fffef7851a3 in ntdll!RtlDelayExecution () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x00007fffed0f4e1d in SleepEx () from C:\WINDOWS\System32\KernelBase.dll
#3  0x00007ff6e4d5ef46 in timer_loop (arg=0x7ff6e533c1e0
<real_itimer>) at w32proc.c:490
#4  0x00007fffedaf257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
#5  0x00007fffef78aa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#6  0x0000000000000000 in ?? ()

Thread 4 (Thread 14504.0x3d34):
#0  0x00007fffef7d35a4 in ntdll!ZwWaitForWorkViaWorkerFactory () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007fffef76537e in ntdll!RtlClearThreadWorkOnBehalfTicket ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x00007fffedaf257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
#3  0x00007fffef78aa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#4  0x0000000000000000 in ?? ()

Thread 3 (Thread 14504.0x4924):
#0  0x00007fffef7d35a4 in ntdll!ZwWaitForWorkViaWorkerFactory () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007fffef76537e in ntdll!RtlClearThreadWorkOnBehalfTicket ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x00007fffedaf257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
#3  0x00007fffef78aa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#4  0x0000000000000000 in ?? ()

Thread 2 (Thread 14504.0x6d74):
#0  0x00007fffef7d35a4 in ntdll!ZwWaitForWorkViaWorkerFactory () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#1  0x00007fffef76537e in ntdll!RtlClearThreadWorkOnBehalfTicket ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
#2  0x00007fffedaf257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
#3  0x00007fffef78aa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
#4  0x0000000000000000 in ?? ()

Thread 1 (Thread 14504.0x4a7c):
#0  0x0000000000000000 in ?? ()
#1  0x0000000000000000 in ?? ()
(gdb)

On Sat, May 18, 2024 at 1:49 PM Eli Zaretskii <[email-masked]> wrote:
>
> > From: Simen Endsjø <[email-masked]>
> > Date: Sat, 18 May 2024 13:18:22 +0200
> > Cc: [email-masked], [email-masked]
> >
> > -O0 gives the same zero stacktrace:
> >
> >     system-configuration-options is a variable defined in emacs.c.
> >
> >     Value
> >     "--prefix=/d/tmp/emacs-bug-70914/emacs-no-native-compilation-o0/simendsjo-build
> > --with-modules --without-dbus --without-native-compilation
> > --without-compress-install --with-sqlite3 --with-tree-sitter
> > 'CFLAGS=-O0 -gdwarf-4 -g3 -Wno-error=implicit-function-declaration'"
>
> Can you show what "thread apply all bt" produces in this case?