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

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

Here's a new crash with full output. Started emacs, ran `(consult-recent-file)`,
opened my 3kloc `system.org` file. There's a lot of `with-eval-after-load` etc.
going on though as I'm using Doom Emacs.

    ? pwd

    Path
    ----
    C:\Users\simend

    ? rlwrap gdb
    GNU gdb (GDB) 14.2
    Copyright (C) 2023 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    Type "show copying" and "show warranty" for details.
    This GDB was configured as "x86_64-w64-mingw32".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <https://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
        <http://www.gnu.org/software/gdb/documentation/>.

    For help, type "help".
    Type "apropos word" to search for commands related to "word".
    (gdb) target exec c:/programs/emacs/latest/bin/emacs.exe
    (gdb) set debugexceptions on
    (gdb) run --init-directory=d:/.emacs.d
    Starting program: c:\programs\emacs\latest\bin\emacs.exe
--init-directory=d:/.emacs.d
    [New Thread 13240.0x2558]
    [New Thread 13240.0x51bc]
    [New Thread 13240.0x5788]
    gdb: Target exception EXCEPTION_BREAKPOINT at 0x7fffdac2bd44
    [New Thread 13240.0x4c2c]
    [New Thread 13240.0x5808]
    [New Thread 13240.0x54e8]
    [Thread 13240.0x54e8 exited with code 1]
    [New Thread 13240.0x2420]
    [New Thread 13240.0x4784]
    [Thread 13240.0x2420 exited with code 1]
    [Thread 13240.0x4784 exited with code 1]
    [New Thread 13240.0x4e14]
    [Thread 13240.0x4e14 exited with code 1]
    [New Thread 13240.0x56fc]
    [New Thread 13240.0x3bfc]
    [Thread 13240.0x56fc exited with code 1]
    [New Thread 13240.0x4334]
    [Thread 13240.0x4334 exited with code 1]
    [New Thread 13240.0x146c]
    [Thread 13240.0x146c exited with code 1]
    [New Thread 13240.0x1c1c]
    [New Thread 13240.0x5870]
    [New Thread 13240.0x5d6c]
    [New Thread 13240.0x58bc]
    [New Thread 13240.0x27ec]
    [New Thread 13240.0x1ce8]

    (process:13240): GLib-GIO-WARNING **: 20:15:06.678: Unexpectedly,
UWP app `Microsoft.OutlookForWindows_1.2023.1101.300_x64__8wekyb3d8bbwe'
(AUMId `Microsoft.OutlookForWindows_8wekyb3d8bbwe!Microsoft.OutlookforWindows')
supports 1 extensions but has no verbs

    (process:13240): GLib-GIO-WARNING **: 20:15:07.009: Unexpectedly,
UWP app `Microsoft.Windows.DevHome_0.1301.477.0_x64__8wekyb3d8bbwe'
(AUMId `Microsoft.Windows.DevHome_8wekyb3d8bbwe!App') supports 1
extensions but has no verbs

    (process:13240): GLib-GIO-WARNING **: 20:15:07.775: Unexpectedly,
UWP app `Microsoft.ScreenSketch_11.2403.8.0_x64__8wekyb3d8bbwe' (AUMId
`Microsoft.ScreenSketch_8wekyb3d8bbwe!App') supports 29 extensions but
has no verbs
    [New Thread 13240.0x21e4]
    [Thread 13240.0x21e4 exited with code 1]
    [New Thread 13240.0x3fac]
    [New Thread 13240.0x51c4]
    [Thread 13240.0x3fac exited with code 1]
    [New Thread 13240.0x3b50]
    [Thread 13240.0x51c4 exited with code 1]
    [Thread 13240.0x3b50 exited with code 1]
    [New Thread 13240.0x5c14]
    [New Thread 13240.0x4a54]
    [New Thread 13240.0x1bd0]
    [Thread 13240.0x5c14 exited with code 1]
    gdb: Target exception EXCEPTION_ACCESS_VIOLATION at 0x0

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

    Thread 27 (Thread 13240.0x1bd0):
    #0  0x00007fffdabef9d4 in ntdll!ZwWaitForSingleObject () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffd850427e in WaitForSingleObjectEx () from
C:\WINDOWS\System32\KernelBase.dll
    #2  0x00007ff71859e488 in ?? ()
    #3  0x00007ff718b65d80 in ?? ()
    #4  0x0000000000000000 in ?? ()

    Thread 26 (Thread 13240.0x4a54):
    #0  0x00007fffdabefa14 in ntdll!ZwReadFile () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffd84f68bb in ReadFile () from
C:\WINDOWS\System32\KernelBase.dll
    #2  0x00007fffd9f21755 in msvcrt!_read () from
C:\WINDOWS\System32\msvcrt.dll
    #3  0x00007fffd9f2147a in msvcrt!_read () from
C:\WINDOWS\System32\msvcrt.dll
    #4  0x00007ff718597488 in ?? ()
    #5  0x0000000000000006 in ?? ()
    #6  0x00007ff718b65cf0 in ?? ()
    #7  0x0000000000000006 in ?? ()
    #8  0x0000000000000000 in ?? ()

    Thread 20 (Thread 13240.0x1ce8):
    #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 13240.0x27ec):
    #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
    --Type <RET> for more, q to quit, c to continue without paging--c
    #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 13240.0x58bc):
    #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  0x00000000000008c0 in ?? ()
    #7  0x00007ff718b65c60 in ?? ()
    #8  0x0000000000000000 in ?? ()

    Thread 17 (Thread 13240.0x5d6c):
    #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 16 (Thread 13240.0x5870):
    #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 15 (Thread 13240.0x1c1c "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  0x00007fffad14637b in ?? () from
c:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #4  0x00007fffad1a9a5b in ?? () from
c:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #5  0x00007fffad1a90a1 in ?? () from
c:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #6  0x00007fffad1d8897 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 12 (Thread 13240.0x3bfc):
    #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 13240.0x5808):
    #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  0x0000000006eefd90 in ?? ()
    #7  0x0000000080000000 in ?? ()
    #8  0x0000000080000000 in ?? ()
    #9  0x0000000000000342 in ?? ()
    #10 0x00000054000002ff in ?? ()
    #11 0x0000000000000000 in ?? ()

    Thread 5 (Thread 13240.0x4c2c):
    #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 13240.0x5788):
    #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 13240.0x51bc):
    #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 13240.0x2558):
    #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 13240.0x1ee0):
    #0  0x0000000000000000 in ?? ()
    #1  0x0000000000000000 in ?? ()
    (gdb) c
    Continuing.
    gdb: Target exception EXCEPTION_ACCESS_VIOLATION at 0x0

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

    Thread 27 (Thread 13240.0x1bd0):
    #0  0x00007fffdabef9d4 in ntdll!ZwWaitForSingleObject () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffd850427e in WaitForSingleObjectEx () from
C:\WINDOWS\System32\KernelBase.dll
    #2  0x00007ff71859e488 in ?? ()
    #3  0x00007ff718b65d80 in ?? ()
    #4  0x0000000000000000 in ?? ()

    Thread 26 (Thread 13240.0x4a54):
    #0  0x00007fffdabefa14 in ntdll!ZwReadFile () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffd84f68bb in ReadFile () from
C:\WINDOWS\System32\KernelBase.dll
    #2  0x00007fffd9f21755 in msvcrt!_read () from
C:\WINDOWS\System32\msvcrt.dll
    #3  0x00007fffd9f2147a in msvcrt!_read () from
C:\WINDOWS\System32\msvcrt.dll
    #4  0x00007ff718597488 in ?? ()
    #5  0x0000000000000006 in ?? ()
    #6  0x00007ff718b65cf0 in ?? ()
    #7  0x0000000000000006 in ?? ()
    #8  0x0000000000000000 in ?? ()

    Thread 20 (Thread 13240.0x1ce8):
    #0  0x00007fffdabb97e3 in ntdll!RtlWakeConditionVariable () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffdabe18b1 in ntdll!bsearch () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #2  0x00007fffdab6d89f in
ntdll!RtlFindActivationContextSectionString () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #3  0x00007fffdab6d6e9 in
ntdll!RtlFindActivationContextSectionString () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #4  0x00007fffdab6d027 in
ntdll!RtlFindActivationContextSectionString () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #5  0x00007fffdab6cc15 in
ntdll!RtlDosPathNameToRelativeNtPathName_U_WithStatus () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #6  0x00007fffdab6b3cb in
ntdll!RtlDosApplyFileIsolationRedirection_Ustr () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #7  0x00007fffdab69556 in ntdll!RtlGetFullPathName_UstrEx () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #8  0x00007fffdab69291 in ntdll!RtlGetFullPathName_UstrEx () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #9  0x00007fffdab65d50 in ntdll!RtlInitUTF8String () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #10 0x00007fffdab79d5e in ntdll!LdrGetDllHandleEx () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #11 0x00007fffdab7ab6c in ntdll!LdrGetDllHandle () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #12 0x00007fffd8521aa6 in KERNELBASE!GetModuleHandleW () from
C:\WINDOWS\System32\KernelBase.dll
    #13 0x00007fffd9431965 in combase!CoGetStandardMarshal () from
C:\WINDOWS\System32\combase.dll
    #14 0x00007fffd9433c5b in combase!CoUninitialize () from
C:\WINDOWS\System32\combase.dll
    --Type <RET> for more, q to quit, c to continue without paging--c
    #15 0x00007fffd97c7946 in SHCreateThreadRef () from
C:\WINDOWS\System32\SHCore.dll
    #16 0x00007fffd97c7751 in SHCreateThreadRef () from
C:\WINDOWS\System32\SHCore.dll
    #17 0x00007fffd993257d in KERNEL32!BaseThreadInitThunk () from
C:\WINDOWS\System32\kernel32.dll
    #18 0x00007fffdabaaa48 in ntdll!RtlUserThreadStart () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #19 0x0000000000000000 in ?? ()

    Thread 19 (Thread 13240.0x27ec):
    #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 13240.0x58bc):
    #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  0x00007ff7185975aa in ?? ()
    #4  0x0000000000000102 in ?? ()
    #5  0x00007fff00000000 in ?? ()
    #6  0xffffffffffff3cb0 in ?? ()
    #7  0x00007ff718b65c60 in ?? ()
    #8  0x00007ff718b65c60 in ?? ()
    #9  0x0000000000000000 in ?? ()

    Thread 17 (Thread 13240.0x5d6c):
    #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 16 (Thread 13240.0x5870):
    #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 15 (Thread 13240.0x1c1c "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  0x00007fffad14637b in ?? () from
c:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #4  0x00007fffad1a9a5b in ?? () from
c:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #5  0x00007fffad1a90a1 in ?? () from
c:\programs\emacs\latest\bin\libglib-2.0-0.dll
    #6  0x00007fffad1d8897 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 12 (Thread 13240.0x3bfc):
    #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 13240.0x5808):
    #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  0x0000000006eefd90 in ?? ()
    #7  0x0000000080000000 in ?? ()
    #8  0x0000000080000000 in ?? ()
    #9  0x0000000000000342 in ?? ()
    #10 0x00000054000002ff in ?? ()
    #11 0x0000000000000000 in ?? ()

    Thread 5 (Thread 13240.0x4c2c):
    #0  0x00007fffdabf32b0 in ntdll!ZwSuspendThread () from
C:\WINDOWS\SYSTEM32\ntdll.dll
    #1  0x00007fffd855aa10 in SuspendThread () from
C:\WINDOWS\System32\KernelBase.dll
    #2  0x00007ff71859e973 in ?? ()
    #3  0x00007ff718b67480 in ?? ()
    #4  0x0000000000000000 in ?? ()

    Thread 4 (Thread 13240.0x5788):
    #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 13240.0x51bc):
    #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 13240.0x2558):
    #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 13240.0x1ee0):
    #0  0x0000000000000000 in ?? ()
    #1  0x0000000000000000 in ?? ()
    (gdb) c
    Continuing.
    [Thread 13240.0x4c2c exited with code 3221225477]
    [Thread 13240.0x5788 exited with code 3221225477]
    [Thread 13240.0x1ee0 exited with code 3221225477]
    [Thread 13240.0x51bc exited with code 3221225477]
    [Thread 13240.0x1c1c exited with code 3221225477]
    [Thread 13240.0x5d6c exited with code 3221225477]
    [Thread 13240.0x2558 exited with code 3221225477]
    [Thread 13240.0x3bfc exited with code 3221225477]
    [Thread 13240.0x58bc exited with code 3221225477]
    [Thread 13240.0x5808 exited with code 3221225477]
    [Thread 13240.0x1ce8 exited with code 3221225477]
    [Thread 13240.0x1bd0 exited with code 3221225477]
    [Thread 13240.0x27ec exited with code 3221225477]
    [Thread 13240.0x4a54 exited with code 3221225477]

    Program terminated with signal SIGSEGV, Segmentation fault.
    The program no longer exists.
    (gdb)

On Wed, May 15, 2024 at 8:13 PM Simen Endsjø <[email-masked]> wrote:
>
> > >  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.
>
> That's strange.  Did you start GDB from the src directory of the Emacs
> source tree, perhaps?  If so, try starting GDB from another directory.
>
> No, started from my home folder; c:/Users/simend. Started it from a PowerShell 7
> (pwsh) shell in a Windows Terminal.
>
> Ran gdb with
>     $ rlwrap gdb
>     (gdb) target exec c:/programs/emacs/latest/bin/emacs.exe
>     (gdb) run --init-directory=d:/.emacs.d
>
> > If debugexceptions doesn't help even when you start GDB from a
> > different directory, I need to think about something else.  What
> > happens on your system is very strange.  These are not "normal"
> > crashes, AFAICT.  Something else is at work on your system.  Do you
> > have some unusual software running there, perhaps, or some Windows
> > feature(s) enabled that is/are usually disabled?
>
> For the gdb debugging here, I've only been running async compilation and copilot
> (node.exe) according to `list-processes`. Normally I'm running emacs as a
> background daemon.
>
> gcc comes from msys2.
>
> I'm running emacs on a VHD ReFs Dev Drive, but I experienced the same crashes
> when running just on NTFS too. My emacs is a stock build downloaded from the
> main gnu ftp.
>
> This is a corporate computer though, so there might be various policies I'm not
> aware of, although I cannot think of anything strange running other than Windows
> Defender which I'm doing my best at disabling as much as possible.
>
> > Why are the callstacks smashed (those zero addresses)?  The callstack
> > of thread 1 (the main thread, a.k.a. "Lisp thread") is completely
> > ruined -- how did that happen?  And why do you have so many threads in
> > Emacs?  Are you starting subprocesses a lot or something?  I see 2
> > reader threads waiting for subprocesses in this backtrace.  What kind
> > of programs or network connections do you routinely run from Emacs?
>
> For the last crash I didn't do much before it crashed. Ran an org-roam db sync,
> then opened a large org-mode file, and it crashed while opening the
> org-mode file.
> I usually run ripgrep, fd, node (copilot), sbcl (sly) from this emacs machine,
> but it I cannot seem to correlate the crashes with any of that work. It often
> crashes while writing in org-mode buffers, which points towards copilot/node.
>
> On Wed, May 15, 2024 at 5:25 PM Eli Zaretskii <[email-masked]> wrote:
> >
> > > From: Simen Endsjø <[email-masked]>
> > > Date: Wed, 15 May 2024 15:36:15 +0200
> > > Cc: [email-masked]
> > >
> > > Got a segfault when opening an org file when running under gdb. But doesn't seem
> > > like there is any useful information there.
> > >
> > >     Thread 1 received signal SIGSEGV, Segmentation fault.
> > >     [Switching to Thread 21772.0x4058]
> > >     0x0000000000000000 in ?? ()
> > >     (gdb) thread apply all bt
> > >
> > >     Thread 148 (Thread 21772.0x4f4c):
> > >     #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 ?? ()
> >
> > Curiouser and curiouser.
> >
> > Why are the callstacks smashed (those zero addresses)?  The callstack
> > of thread 1 (the main thread, a.k.a. "Lisp thread") is completely
> > ruined -- how did that happen?  And why do you have so many threads in
> > Emacs?  Are you starting subprocesses a lot or something?  I see 2
> > reader threads waiting for subprocesses in this backtrace.  What kind
> > of programs or network connections do you routinely run from Emacs?