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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 15 May 2024 18:25:13 +0300

> 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?