Subject: Re: bug#60556: 29.0.60; Fatal error accurred when editing init.el with flymake enabled on Windows 10

From: Eason Huang <[email-masked]>
Date: Sun, 22 Jan 2023 20:11:23 +0800

Eli Zaretskii <[email-masked]> writes:

>> From: Eason Huang <[email-masked]>
>> Cc: [email-masked]
>> Date: Sun, 22 Jan 2023 19:22:23 +0800
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> > At this point, instead of "q", please type:
>> >
>> >   (gdb) thread 1
>> >   (gdb) bt
>> >
>> > and post the results here.
>> >
>> >
>> >
>> >
>> 
>> Hi Eli,
>> 
>> I tried to debug with GDB again and reproduce the issue and the result
>> is as bellow:
>
> Thanks.  I guess I shouldn't make any assumptions.  So, one last time:
> please reproduce the issue, and type:
>
>   (gdb) thread apply all bt
>
> This should produce a backtrace from all the threads in the Emacs
> process.  I'd like to see where did we call the abort function, the
> one which pops up the Abort dialog.
>
>
>
>

I tried restart Emacs with `emacs -Q` again, turn on GDB and tried to reproduce
issue, When the Abort dialog pops up, then type:
(gdb) thread apply all bt

The result is as bellow:

➜ ~  ps -name emacs

 NPM(K)    PM(M)      WS(M)     CPU(s)      Id  SI ProcessName
 ------    -----      -----     ------      --  -- -----------
     20    31.18      35.30       0.55   14608   1 emacs

➜ ~  mingw

Aqua@DESKTOP-VIHxxxx MINGW64 ~
$ gdb -p 14608
GNU gdb (GDB) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.

Attaching to process 14608
[New Thread 14608.0x50ec]
[New Thread 14608.0x4338]
[New Thread 14608.0x4e10]
[New Thread 14608.0x4bf8]
[New Thread 14608.0x94c]
Reading symbols from C:\opt\emacs\bin\emacs.exe...
(gdb) c
Continuing.
[Thread 14608.0x94c exited with code 0]
[New Thread 14608.0x1c58]
[New Thread 14608.0x1b48]
[Thread 14608.0x1b48 exited with code 0]
[Thread 14608.0x1c58 exited with code 0]
[New Thread 14608.0x5398]
[New Thread 14608.0x23d4]
[Thread 14608.0x23d4 exited with code 0]
[Thread 14608.0x5398 exited with code 0]
[New Thread 14608.0x4b5c]
[New Thread 14608.0x38c0]
[Thread 14608.0x38c0 exited with code 0]
[Thread 14608.0x4b5c exited with code 0]
[New Thread 14608.0x522c]
[New Thread 14608.0x4208]
[Thread 14608.0x4208 exited with code 0]
[Thread 14608.0x522c exited with code 0]
[New Thread 14608.0x22bc]
[New Thread 14608.0x1838]
[New Thread 14608.0x4908]
[New Thread 14608.0x18a8]
[Thread 14608.0x22bc exited with code 0]
[Thread 14608.0x1838 exited with code 0]
[Thread 14608.0x18a8 exited with code 0]
[Thread 14608.0x4908 exited with code 0]
[New Thread 14608.0x1ac4]
[New Thread 14608.0xdb4]
[Thread 14608.0xdb4 exited with code 0]
[Thread 14608.0x1ac4 exited with code 0]
[New Thread 14608.0x38a8]
[New Thread 14608.0x5d8]
[Thread 14608.0x5d8 exited with code 0]
[Thread 14608.0x38a8 exited with code 0]
[New Thread 14608.0x43c0]
[New Thread 14608.0x6e8]
[New Thread 14608.0x4cec]
[New Thread 14608.0x2dec]
[Thread 14608.0x6e8 exited with code 0]
[Thread 14608.0x43c0 exited with code 0]
[Thread 14608.0x2dec exited with code 0]
[Thread 14608.0x4cec exited with code 0]
[New Thread 14608.0x5054]
[New Thread 14608.0x2470]
[Thread 14608.0x2470 exited with code 0]
[Thread 14608.0x5054 exited with code 0]
[New Thread 14608.0x5360]
[New Thread 14608.0x1348]
[Thread 14608.0x1348 exited with code 0]
[Thread 14608.0x5360 exited with code 0]
[New Thread 14608.0x1dec]
[New Thread 14608.0x73c]
[Thread 14608.0x73c exited with code 0]
[Thread 14608.0x1dec exited with code 0]
[New Thread 14608.0x310c]
[New Thread 14608.0x5180]
[Thread 14608.0x5180 exited with code 0]
[Thread 14608.0x310c exited with code 0]
[New Thread 14608.0x1760]
[New Thread 14608.0x4f44]
[Thread 14608.0x4f44 exited with code 0]
[Thread 14608.0x1760 exited with code 0]
[New Thread 14608.0x15f8]
[New Thread 14608.0x4628]
[Thread 14608.0x4628 exited with code 0]
[Thread 14608.0x15f8 exited with code 0]
[New Thread 14608.0x53a4]
[New Thread 14608.0x10c8]
[New Thread 14608.0x4de4]
[New Thread 14608.0x400c]
[Thread 14608.0x400c exited with code 0]
[Thread 14608.0x4de4 exited with code 0]
[Thread 14608.0x10c8 exited with code 0]
[Thread 14608.0x53a4 exited with code 0]
[New Thread 14608.0x3f20]

Thread 43 received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 14608.0x3f20]
0x00007ffda9a90bb1 in ntdll!DbgBreakPoint () from C:\Windows\SYSTEM32\ntdll.dll
(gdb) thread apply all bt

Thread 43 (Thread 14608.0x3f20):
#0  0x00007ffda9a90bb1 in ntdll!DbgBreakPoint () from C:\Windows\SYSTEM32\ntdll.dll
#1  0x00007ffda9abcc2e in ntdll!DbgUiRemoteBreakin () from C:\Windows\SYSTEM32\ntdll.dll
#2  0x00007ffda8fa7614 in KERNEL32!BaseThreadInitThunk () from C:\Windows\System32\kernel32.dll
#3  0x00007ffda9a426a1 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
#4  0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 5 (Thread 14608.0x4bf8):
#0  0x00007ffda9a90b14 in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\Windows\SYSTEM32\ntdll.dll
#1  0x00007ffda9a42e17 in ntdll!TpReleaseCleanupGroupMembers () from C:\Windows\SYSTEM32\ntdll.dll
#2  0x00007ffda8fa7614 in KERNEL32!BaseThreadInitThunk () from C:\Windows\System32\kernel32.dll
#3  0x00007ffda9a426a1 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
#4  0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 4 (Thread 14608.0x4e10):
#0  0x00007ffda9a90b14 in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\Windows\SYSTEM32\ntdll.dll
#1  0x00007ffda9a42e17 in ntdll!TpReleaseCleanupGroupMembers () from C:\Windows\SYSTEM32\ntdll.dll
#2  0x00007ffda8fa7614 in KERNEL32!BaseThreadInitThunk () from C:\Windows\System32\kernel32.dll
#3  0x00007ffda9a426a1 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
#4  0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 3 (Thread 14608.0x4338):
#0  0x00007ffda7901104 in win32u!NtUserGetMessage () from C:\Windows\System32\win32u.dll
--Type <RET> for more, q to quit, c to continue without paging--

-- 
Eason Huang