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

From: Simen Endsjø <[email-masked]>
Date: Wed, 15 May 2024 15:00:46 +0200

> Btw, I see that you are attaching to a running Emacs instead of
> starting Emacs from GDB.  Any reason why you do that?

Because running emacs became very slow under gdb. But it seems not every
operation ("just" spawning processes..?), so I'm trying this now.

>  Would you mind running Emacs from GDB after setting this option:
>
>   (gdb) set debugexceptions on

This seems to trigger often, so I'm not able to use emacs while it's on. Here's
a few exceptions I caught before turning it off again.

    [New Thread 21772.0x3cf4]
    gdb: Target exception EXCEPTION_BREAKPOINT at 0x7fffdabf3640

    Thread 21 received signal SIGTRAP, Trace/breakpoint trap.
    [Switching to Thread 21772.0x3cf4]
    0x00007fffdabf3641 in ntdll!DbgBreakPoint () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    (gdb) thread apply all bt

    Thread 21 (Thread 21772.0x3cf4):
    #0  0x00007fffdabf3641 in ntdll!DbgBreakPoint () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdac26f6e in ntdll!DbgUiRemoteBreakin () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 20 (Thread 21772.0x503c):
    #0  0x00007fffd82eacf4 in win32u!NtUserMsgWaitForMultipleObjectsEx
() from C:\WINDOWS\System32\win32u.dll
    #1  0x00007fffd97c9462 in SHTaskPoolQueueTask () from
C:\WINDOWS\System32\SHCore.dll
    #2  0x00007fffd97c7946 in SHCreateThreadRef () from
C:\WINDOWS\System32\SHCore.dll
    #3  0x00007fffd97c7751 in SHCreateThreadRef () from
C:\WINDOWS\System32\SHCore.dll
    #4  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #5  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #6  0x0000000000000000 in ?? ()

    Thread 19 (Thread 21772.0x31ac):
    #0  0x00007fffdabf04a4 in ntdll!ZwWaitForMultipleObjects () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffd852fda9 in WaitForMultipleObjectsEx () from
C:\WINDOWS\System32\KernelBase.dll
    #2  0x00007fffd9488bbd in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
    #3  0x00007fffd9488a2a in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
    #4  0x00007fffd948881f in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
    #5  0x00007fffd9488719 in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
    #6  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #7  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #8  0x0000000000000000 in ?? ()

    Thread 18 (Thread 21772.0x4934):
    #0  0x00007fffdabef9d4 in ntdll!ZwWaitForSingleObject () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffd850427e in WaitForSingleObjectEx () from
C:\WINDOWS\System32\KernelBase.dll
    #2  0x00007ff7185975a1 in ?? ()
    #3  0x0000000000000102 in ?? ()
    #4  0x00007fff00000000 in ?? ()
    #5  0xffffffff00000000 in ?? ()
    #6  0x0000000000000a24 in ?? ()
    #7  0x00007ff718b65c60 in ?? ()
    #8  0x0000000000000000 in ?? ()
    --Type <RET> for more, q to quit, c to continue without paging--c

    Thread 17 (Thread 21772.0x4914 "pool"):
    #0  0x00007fffdabf3544 in ntdll!ZwWaitForAlertByThreadId () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdabb91db in ntdll!RtlSleepConditionVariableSRW ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd8542b79 in SleepConditionVariableSRW () from
C:\WINDOWS\System32\KernelBase.dll
    #3  0x00007fffb7c1637b in ?? () from
C:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #4  0x00007fffb7c79a5b in ?? () from
C:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #5  0x00007fffb7c790a1 in ?? () from
C:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #6  0x00007fffb7ca8897 in ?? () from
C:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #7  0x00007fffd9f3e634 in msvcrt!_beginthreadex () from
C:\WINDOWS\System32\msvcrt.dll
    #8  0x00007fffd9f3e70c in msvcrt!_endthreadex () from
C:\WINDOWS\System32\msvcrt.dll
    #9  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #10 0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #11 0x0000000000000000 in ?? ()

    Thread 14 (Thread 21772.0x32ac):
    #0  0x00007fffdabf35a4 in ntdll!ZwWaitForWorkViaWorkerFactory ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdab8537e in ntdll!RtlClearThreadWorkOnBehalfTicket
() from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 13 (Thread 21772.0x2398):
    #0  0x00007fffdabf35a4 in ntdll!ZwWaitForWorkViaWorkerFactory ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdab8537e in ntdll!RtlClearThreadWorkOnBehalfTicket
() from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 12 (Thread 21772.0x52f8):
    #0  0x00007fffd82eacf4 in win32u!NtUserMsgWaitForMultipleObjectsEx
() from C:\WINDOWS\System32\win32u.dll
    #1  0x00007fffd9a75e67 in USER32!MsgWaitForMultipleObjects () from
C:\WINDOWS\System32\user32.dll
    #2  0x00007fffc4043c90 in gdiplus!GdiplusStartup () from
C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.22621.3527_none_57f93980ce19a444\GdiPlus.dll
    #3  0x00007fffc4043be9 in gdiplus!GdiplusStartup () from
C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.22621.3527_none_57f93980ce19a444\GdiPlus.dll
    #4  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #5  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #6  0x0000000000000000 in ?? ()

    Thread 6 (Thread 21772.0x15a8):
    #0  0x00007fffd82e14f4 in win32u!NtUserGetKeyState () from
C:\WINDOWS\System32\win32u.dll
    #1  0x00007fffd9a75a51 in USER32!GetKeyState () from
C:\WINDOWS\System32\user32.dll
    #2  0x00007fffd9dc306f in TF_GetInitSystemFlags () from
C:\WINDOWS\System32\msctf.dll
    #3  0x00007fffd9ddd0c7 in MSCTF!CtfImeSelectEx () from
C:\WINDOWS\System32\msctf.dll
    #4  0x00007fffd9dbb3db in MSCTF!CtfImeCreateThreadMgr () from
C:\WINDOWS\System32\msctf.dll
    #5  0x00007fffd9db389a in MSCTF!CtfImeProcessKey () from
C:\WINDOWS\System32\msctf.dll
    #6  0x00007fffd99f4c13 in ImmProcessKey () from
C:\WINDOWS\System32\imm32.dll
    #7  0x00007fffd9a79b1c in USER32!GetSysColorBrush () from
C:\WINDOWS\System32\user32.dll
    #8  0x00007fffdabf3994 in ntdll!KiUserCallbackDispatcher () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #9  0x00007fffd82e1534 in win32u!NtUserGetMessage () from
C:\WINDOWS\System32\win32u.dll
    #10 0x00007fffd9a75eca in USER32!GetMessageW () from
C:\WINDOWS\System32\user32.dll
    #11 0x00007ff718565e79 in ?? ()
    #12 0x00007fffd9a75ea0 in USER32!MsgWaitForMultipleObjects () from
C:\WINDOWS\System32\user32.dll
    #13 0x00007fff00000000 in ?? ()
    #14 0x00007fffd9a75ea0 in USER32!MsgWaitForMultipleObjects () from
C:\WINDOWS\System32\user32.dll
    #15 0x0000000006edfd90 in ?? ()
    #16 0x0000000080000000 in ?? ()
    #17 0x0000000080000000 in ?? ()
    #18 0x0000000000000342 in ?? ()
    #19 0x00000054000002ff in ?? ()
    #20 0x0000000000000000 in ?? ()

    Thread 5 (Thread 21772.0x5754):
    #0  0x00007fffdabeffd4 in ntdll!ZwDelayExecution () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdaba51a3 in ntdll!RtlDelayExecution () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd8514e1d in SleepEx () from C:\WINDOWS\System32\KernelBase.dll
    #3  0x00007ff71859e8cd in ?? ()
    #4  0x00007ff718b67480 in ?? ()
    #5  0x0000000000000000 in ?? ()

    Thread 4 (Thread 21772.0x30e8):
    #0  0x00007fffdabf35a4 in ntdll!ZwWaitForWorkViaWorkerFactory ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdab8537e in ntdll!RtlClearThreadWorkOnBehalfTicket
() from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 3 (Thread 21772.0x4090):
    #0  0x00007fffdabf35a4 in ntdll!ZwWaitForWorkViaWorkerFactory ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdab8537e in ntdll!RtlClearThreadWorkOnBehalfTicket
() from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 2 (Thread 21772.0x55b0):
    #0  0x00007fffdabf35a4 in ntdll!ZwWaitForWorkViaWorkerFactory ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdab8537e in ntdll!RtlClearThreadWorkOnBehalfTicket
() from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 1 (Thread 21772.0x4058):
    #0  0x00007fffd82eacf4 in win32u!NtUserMsgWaitForMultipleObjectsEx
() from C:\WINDOWS\System32\win32u.dll
    #1  0x00007fffd9a75e67 in USER32!MsgWaitForMultipleObjects () from
C:\WINDOWS\System32\user32.dll
    #2  0x00007ff7185a1542 in ?? ()
    #3  0x0000000000000003 in ?? ()
    #4  0x0000000000000018 in ?? ()
    #5  0x0000000003f30000 in ?? ()
    #6  0x0000000000000000 in ?? ()

-------------------------------------------------------------------------------

    gdb: Target exception EXCEPTION_BREAKPOINT at 0x7fffdabf3640

    Thread 27 received signal SIGTRAP, Trace/breakpoint trap.
    [Switching to Thread 21772.0x3588]
    0x00007fffdabf3641 in ntdll!DbgBreakPoint () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    (gdb) thread apply all bt

    Thread 27 (Thread 21772.0x3588):
    #0  0x00007fffdabf3641 in ntdll!DbgBreakPoint () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdac26f6e in ntdll!DbgUiRemoteBreakin () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 19 (Thread 21772.0x31ac):
    #0  0x00007fffdabf04a4 in ntdll!ZwWaitForMultipleObjects () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffd852fda9 in WaitForMultipleObjectsEx () from
C:\WINDOWS\System32\KernelBase.dll
    #2  0x00007fffd9488bbd in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
    #3  0x00007fffd9488a2a in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
    #4  0x00007fffd948881f in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
    #5  0x00007fffd9488719 in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
    #6  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #7  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #8  0x0000000000000000 in ?? ()

    Thread 18 (Thread 21772.0x4934):
    #0  0x00007fffdabef9d4 in ntdll!ZwWaitForSingleObject () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffd850427e in WaitForSingleObjectEx () from
C:\WINDOWS\System32\KernelBase.dll
    #2  0x00007ff7185975a1 in ?? ()
    #3  0x0000000000000102 in ?? ()
    #4  0x00007fff00000000 in ?? ()
    #5  0xffffffff00000000 in ?? ()
    #6  0x0000000000000a24 in ?? ()
    #7  0x00007ff718b65c60 in ?? ()
    #8  0x0000000000000000 in ?? ()

    Thread 17 (Thread 21772.0x4914 "pool"):
    #0  0x00007fffdabf3544 in ntdll!ZwWaitForAlertByThreadId () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdabb91db in ntdll!RtlSleepConditionVariableSRW ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd8542b79 in SleepConditionVariableSRW () from
C:\WINDOWS\System32\KernelBase.dll
    #3  0x00007fffb7c1637b in ?? () from
C:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #4  0x00007fffb7c79a5b in ?? () from
C:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #5  0x00007fffb7c790a1 in ?? () from
C:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #6  0x00007fffb7ca8897 in ?? () from
C:\programs\emacs\latest\bin\libglib-2.0-0.dll
    --Type <RET> for more, q to quit, c to continue without paging--c
    #7  0x00007fffd9f3e634 in msvcrt!_beginthreadex () from
C:\WINDOWS\System32\msvcrt.dll
    #8  0x00007fffd9f3e70c in msvcrt!_endthreadex () from
C:\WINDOWS\System32\msvcrt.dll
    #9  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #10 0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #11 0x0000000000000000 in ?? ()

    Thread 14 (Thread 21772.0x32ac):
    #0  0x00007fffdabf35a4 in ntdll!ZwWaitForWorkViaWorkerFactory ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdab8537e in ntdll!RtlClearThreadWorkOnBehalfTicket
() from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 13 (Thread 21772.0x2398):
    #0  0x00007fffdabf35a4 in ntdll!ZwWaitForWorkViaWorkerFactory ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdab8537e in ntdll!RtlClearThreadWorkOnBehalfTicket
() from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 12 (Thread 21772.0x52f8):
    #0  0x00007fffd82eacf4 in win32u!NtUserMsgWaitForMultipleObjectsEx
() from C:\WINDOWS\System32\win32u.dll
    #1  0x00007fffd9a75e67 in USER32!MsgWaitForMultipleObjects () from
C:\WINDOWS\System32\user32.dll
    #2  0x00007fffc4043c90 in gdiplus!GdiplusStartup () from
C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.22621.3527_none_57f93980ce19a444\GdiPlus.dll
    #3  0x00007fffc4043be9 in gdiplus!GdiplusStartup () from
C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.22621.3527_none_57f93980ce19a444\GdiPlus.dll
    #4  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #5  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #6  0x0000000000000000 in ?? ()

    Thread 6 (Thread 21772.0x15a8):
    #0  0x00007fffd82e14f4 in win32u!NtUserGetKeyState () from
C:\WINDOWS\System32\win32u.dll
    #1  0x00007fffd9a75a51 in USER32!GetKeyState () from
C:\WINDOWS\System32\user32.dll
    #2  0x00007fffd9dc306f in TF_GetInitSystemFlags () from
C:\WINDOWS\System32\msctf.dll
    #3  0x00007fffd9ddd0c7 in MSCTF!CtfImeSelectEx () from
C:\WINDOWS\System32\msctf.dll
    #4  0x00007fffd9dbb3db in MSCTF!CtfImeCreateThreadMgr () from
C:\WINDOWS\System32\msctf.dll
    #5  0x00007fffd9db389a in MSCTF!CtfImeProcessKey () from
C:\WINDOWS\System32\msctf.dll
    #6  0x00007fffd99f4c13 in ImmProcessKey () from
C:\WINDOWS\System32\imm32.dll
    #7  0x00007fffd9a79b1c in USER32!GetSysColorBrush () from
C:\WINDOWS\System32\user32.dll
    #8  0x00007fffdabf3994 in ntdll!KiUserCallbackDispatcher () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #9  0x00007fffd82e1534 in win32u!NtUserGetMessage () from
C:\WINDOWS\System32\win32u.dll
    #10 0x00007fffd9a75eca in USER32!GetMessageW () from
C:\WINDOWS\System32\user32.dll
    #11 0x00007ff718565e79 in ?? ()
    #12 0x00007fffd9a75ea0 in USER32!MsgWaitForMultipleObjects () from
C:\WINDOWS\System32\user32.dll
    #13 0x00007fff00000000 in ?? ()
    #14 0x00007fffd9a75ea0 in USER32!MsgWaitForMultipleObjects () from
C:\WINDOWS\System32\user32.dll
    #15 0x0000000006edfd90 in ?? ()
    #16 0x0000000080000000 in ?? ()
    #17 0x0000000080000000 in ?? ()
    #18 0x0000000000000342 in ?? ()
    #19 0x00000054000002ff in ?? ()
    #20 0x0000000000000000 in ?? ()

    Thread 5 (Thread 21772.0x5754):
    #0  0x00007fffdabeffd4 in ntdll!ZwDelayExecution () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdaba51a3 in ntdll!RtlDelayExecution () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd8514e1d in SleepEx () from C:\WINDOWS\System32\KernelBase.dll
    #3  0x00007ff71859e8f0 in ?? ()
    #4  0x00007ff718b67480 in ?? ()
    #5  0x0000000000000000 in ?? ()

    Thread 4 (Thread 21772.0x30e8):
    #0  0x00007fffdabf35a4 in ntdll!ZwWaitForWorkViaWorkerFactory ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdab8537e in ntdll!RtlClearThreadWorkOnBehalfTicket
() from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 3 (Thread 21772.0x4090):
    #0  0x00007fffdabf35a4 in ntdll!ZwWaitForWorkViaWorkerFactory ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdab8537e in ntdll!RtlClearThreadWorkOnBehalfTicket
() from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 2 (Thread 21772.0x55b0):
    #0  0x00007fffdabf35a4 in ntdll!ZwWaitForWorkViaWorkerFactory ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdab8537e in ntdll!RtlClearThreadWorkOnBehalfTicket
() from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 1 (Thread 21772.0x4058):
    #0  0x00007fffd82eacf4 in win32u!NtUserMsgWaitForMultipleObjectsEx
() from C:\WINDOWS\System32\win32u.dll
    #1  0x00007fffd9a75e67 in USER32!MsgWaitForMultipleObjects () from
C:\WINDOWS\System32\user32.dll
    #2  0x00007ff7185a1542 in ?? ()
    #3  0x0000000000000003 in ?? ()
    #4  0x0000000000000018 in ?? ()
    #5  0x0000000003f30000 in ?? ()
    #6  0x0000000000000000 in ?? ()

-------------------------------------------------------------------------------

    gdb: Target exception EXCEPTION_BREAKPOINT at 0x7fffdabf3640

    Thread 29 received signal SIGTRAP, Trace/breakpoint trap.
    [Switching to Thread 21772.0x2964]
    0x00007fffdabf3641 in ntdll!DbgBreakPoint () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    (gdb) thread apply all bt

    Thread 29 (Thread 21772.0x2964):
    #0  0x00007fffdabf3641 in ntdll!DbgBreakPoint () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdac26f6e in ntdll!DbgUiRemoteBreakin () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 19 (Thread 21772.0x31ac):
    #0  0x00007fffdabf04a4 in ntdll!ZwWaitForMultipleObjects () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffd852fda9 in WaitForMultipleObjectsEx () from
C:\WINDOWS\System32\KernelBase.dll
    #2  0x00007fffd9488bbd in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
    #3  0x00007fffd9488a2a in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
    #4  0x00007fffd948881f in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
    #5  0x00007fffd9488719 in combase!RoGetApartmentIdentifier () from
C:\WINDOWS\System32\combase.dll
    #6  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #7  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #8  0x0000000000000000 in ?? ()

    Thread 18 (Thread 21772.0x4934):
    #0  0x00007fffdabef9d4 in ntdll!ZwWaitForSingleObject () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffd850427e in WaitForSingleObjectEx () from
C:\WINDOWS\System32\KernelBase.dll
    #2  0x00007ff7185975a1 in ?? ()
    #3  0x0000000000000102 in ?? ()
    #4  0x00007fff00000000 in ?? ()
    #5  0xffffffff00000000 in ?? ()
    #6  0x0000000000000a24 in ?? ()
    #7  0x00007ff718b65c60 in ?? ()
    #8  0x0000000000000000 in ?? ()

    Thread 17 (Thread 21772.0x4914 "pool"):
    #0  0x00007fffdabf3544 in ntdll!ZwWaitForAlertByThreadId () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdabb91db in ntdll!RtlSleepConditionVariableSRW ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd8542b79 in SleepConditionVariableSRW () from
C:\WINDOWS\System32\KernelBase.dll
    #3  0x00007fffb7c1637b in ?? () from
C:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #4  0x00007fffb7c79a5b in ?? () from
C:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #5  0x00007fffb7c790a1 in ?? () from
C:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #6  0x00007fffb7ca8897 in ?? () from
C:\programs\emacs\latest\bin\libglib-2.0-0.dll
    --Type <RET> for more, q to quit, c to continue without paging--c
    #7  0x00007fffd9f3e634 in msvcrt!_beginthreadex () from
C:\WINDOWS\System32\msvcrt.dll
    #8  0x00007fffd9f3e70c in msvcrt!_endthreadex () from
C:\WINDOWS\System32\msvcrt.dll
    #9  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #10 0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #11 0x0000000000000000 in ?? ()

    Thread 14 (Thread 21772.0x32ac):
    #0  0x00007fffdabf35a4 in ntdll!ZwWaitForWorkViaWorkerFactory ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdab8537e in ntdll!RtlClearThreadWorkOnBehalfTicket
() from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 13 (Thread 21772.0x2398):
    #0  0x00007fffdabf35a4 in ntdll!ZwWaitForWorkViaWorkerFactory ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdab8537e in ntdll!RtlClearThreadWorkOnBehalfTicket
() from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 12 (Thread 21772.0x52f8):
    #0  0x00007fffd82eacf4 in win32u!NtUserMsgWaitForMultipleObjectsEx
() from C:\WINDOWS\System32\win32u.dll
    #1  0x00007fffd9a75e67 in USER32!MsgWaitForMultipleObjects () from
C:\WINDOWS\System32\user32.dll
    #2  0x00007fffc4043c90 in gdiplus!GdiplusStartup () from
C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.22621.3527_none_57f93980ce19a444\GdiPlus.dll
    #3  0x00007fffc4043be9 in gdiplus!GdiplusStartup () from
C:\WINDOWS\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.22621.3527_none_57f93980ce19a444\GdiPlus.dll
    #4  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #5  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #6  0x0000000000000000 in ?? ()

    Thread 6 (Thread 21772.0x15a8):
    #0  0x00007fffd82e1534 in win32u!NtUserGetMessage () from
C:\WINDOWS\System32\win32u.dll
    #1  0x00007fffd9a75eca in USER32!GetMessageW () from
C:\WINDOWS\System32\user32.dll
    #2  0x00007ff718565e79 in ?? ()
    #3  0x00007fffd9a75ea0 in USER32!MsgWaitForMultipleObjects () from
C:\WINDOWS\System32\user32.dll
    #4  0x00007fff00000000 in ?? ()
    #5  0x00007fffd9a75ea0 in USER32!MsgWaitForMultipleObjects () from
C:\WINDOWS\System32\user32.dll
    #6  0x0000000006edfd90 in ?? ()
    #7  0x0000000080000000 in ?? ()
    #8  0x0000000080000000 in ?? ()
    #9  0x0000000000000342 in ?? ()
    #10 0x00000054000002ff in ?? ()
    #11 0x0000000000000000 in ?? ()

    Thread 5 (Thread 21772.0x5754):
    #0  0x00007fffdabeffd4 in ntdll!ZwDelayExecution () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdaba51a3 in ntdll!RtlDelayExecution () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd8514e1d in SleepEx () from C:\WINDOWS\System32\KernelBase.dll
    #3  0x00007ff71859e8f0 in ?? ()
    #4  0x00007ff718b67480 in ?? ()
    #5  0x0000000000000000 in ?? ()

    Thread 4 (Thread 21772.0x30e8):
    #0  0x00007fffdabf35a4 in ntdll!ZwWaitForWorkViaWorkerFactory ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdab8537e in ntdll!RtlClearThreadWorkOnBehalfTicket
() from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 3 (Thread 21772.0x4090):
    #0  0x00007fffdabf35a4 in ntdll!ZwWaitForWorkViaWorkerFactory ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdab8537e in ntdll!RtlClearThreadWorkOnBehalfTicket
() from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 2 (Thread 21772.0x55b0):
    #0  0x00007fffdabf35a4 in ntdll!ZwWaitForWorkViaWorkerFactory ()
from C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdab8537e in ntdll!RtlClearThreadWorkOnBehalfTicket
() from C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #3  0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x0000000000000000 in ?? ()

    Thread 1 (Thread 21772.0x4058):
    #0  0x00007fffd82eacf4 in win32u!NtUserMsgWaitForMultipleObjectsEx
() from C:\WINDOWS\System32\win32u.dll
    #1  0x00007fffd9a75e67 in USER32!MsgWaitForMultipleObjects () from
C:\WINDOWS\System32\user32.dll
    #2  0x00007ff7185a1542 in ?? ()
    #3  0x0000000000000003 in ?? ()
    #4  0x0000000000000018 in ?? ()
    #5  0x0000000003f30000 in ?? ()

On Wed, May 15, 2024 at 2:11 PM Eli Zaretskii <[email-masked]> wrote:
>
> > From: Simen Endsjø <[email-masked]>
> > Date: Wed, 15 May 2024 12:53:23 +0200
> > Cc: [email-masked]
> >
> >     Thread 1 (Thread 9804.0x2ab4):
> >     #0  0x00007fffd85dd313 in KERNELBASE!DebugBreak () from
> > C:\WINDOWS\System32\KernelBase.dll
> >     #1  0x00007ff718565ba8 in emacs_abort ()
> >     #2  0x00007ff718436aae in terminate_due_to_signal ()
> >     #3  0x00007ff718457a9c in deliver_fatal_thread_signal ()
> >     #4  0x00007ff7185cb122 in _gnu_exception_handler
> > (exception_data=0xabbdffb9c0) at
> > C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crt_handler.c:223
> >     #5  0x00007fffd9f2b248 in msvcrt!__C_specific_handler () from
> > C:\WINDOWS\System32\msvcrt.dll
> >     #6  0x00007fffdabf49ff in ntdll!.chkstk () from
> > C:\WINDOWS\SYSTEM32\ntdll.dll
> >     #7  0x00007fffdab6e466 in ntdll!RtlFindCharInUnicodeString () from
> > C:\WINDOWS\SYSTEM32\ntdll.dll
> >     #8  0x00007fffdabf39ee in ntdll!KiUserExceptionDispatcher () from
> > C:\WINDOWS\SYSTEM32\ntdll.dll
> >     #9  0x00007ff718494bb3 in rpl_re_compile_pattern ()
>
> These are very strange exceptions: they are not caught by GDB, but by
> the top-level handler for unhandled exceptions.
>
> Would you mind running Emacs from GDB after setting this option:
>
>   (gdb) set debugexceptions on
>
> Do this before you type "run" to run Emacs.  Then, when it crashes,
> look at the terminal where you started GDB for the last exceptions
> printed by GDB, and post that here.
>
> Btw, I see that you are attaching to a running Emacs instead of
> starting Emacs from GDB.  Any reason why you do that?