Subject: bug#14333: 24.3.50; Emacs hangs when trying to exit

From: Dani Moncayo <[email-masked]>
Date: Tue, 19 Nov 2013 18:13:20 +0100

Hi Eli,

Today I've got another hung session, and I've succeeded to attach gdb
to such session.

Below is the output of "thread apply all bt".

I'll keep the session open, in case you need me to print some value.

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

(gdb) thread apply all bt

Thread 5 (Thread 8680.0x1394):
#0  0x778a000d in ntdll!DbgBreakPoint () from C:\Windows\SysWOW64\ntdll.dll
#1  0x7792f8ee in ntdll!DbgUiRemoteBreakin ()
   from C:\Windows\SysWOW64\ntdll.dll
#2  0x0222a623 in ?? ()
#3  0x76da336a in KERNEL32!BaseThreadInitThunk ()
   from C:\Windows\syswow64\kernel32.dll
#4  0x778cbf32 in ntdll!RtlInitializeExceptionChain ()
   from C:\Windows\SysWOW64\ntdll.dll
#5  0x778cbf05 in ntdll!RtlInitializeExceptionChain ()
   from C:\Windows\SysWOW64\ntdll.dll
#6  0x00000000 in ?? ()

Thread 4 (Thread 8680.0x2080):
#0  0x778af8d1 in ntdll!ZwWaitForSingleObject ()
   from C:\Windows\SysWOW64\ntdll.dll
#1  0x778af8d1 in ntdll!ZwWaitForSingleObject ()
   from C:\Windows\SysWOW64\ntdll.dll
#2  0x778cb4b4 in ntdll!RtlIntegerToUnicodeString ()
   from C:\Windows\SysWOW64\ntdll.dll
#3  0x778cb398 in ntdll!RtlIntegerToUnicodeString ()
   from C:\Windows\SysWOW64\ntdll.dll
#4  0x778e650d in ntdll!LdrShutdownThread ()
   from C:\Windows\SysWOW64\ntdll.dll
#5  0x779920c0 in ntdll!NlsAnsiCodePage () from C:\Windows\SysWOW64\ntdll.dll
#6  0x1de5a6d3 in ?? ()
#7  0x00000000 in ?? ()

Thread 3 (Thread 8680.0x193c):
#0  0x76fd78d7 in USER32!DispatchMessageW ()
   from C:\Windows\syswow64\user32.dll
#1  0x011e1de5 in w32_msg_pump (msg_buf=0x6eabff28)
    at ../../repo/src/w32fns.c:2436
#2  0x011e2023 in w32_msg_worker@4 (arg=0x0) at ../../repo/src/w32fns.c:2662
#3  0x76da336a in KERNEL32!BaseThreadInitThunk ()
   from C:\Windows\syswow64\kernel32.dll
#4  0x778cbf32 in ntdll!RtlInitializeExceptionChain ()
   from C:\Windows\SysWOW64\ntdll.dll
#5  0x778cbf05 in ntdll!RtlInitializeExceptionChain ()
   from C:\Windows\SysWOW64\ntdll.dll
#6  0x00000000 in ?? ()

Thread 2 (Thread 8680.0x1120):
#0  0x778b015d in ntdll!ZwWaitForMultipleObjects ()
   from C:\Windows\SysWOW64\ntdll.dll
#1  0x778b015d in ntdll!ZwWaitForMultipleObjects ()
   from C:\Windows\SysWOW64\ntdll.dll
#2  0x778cc6c5 in ntdll!RtlRegisterThreadWithCsrss ()
   from C:\Windows\SysWOW64\ntdll.dll
#3  0x76da336a in KERNEL32!BaseThreadInitThunk ()
   from C:\Windows\syswow64\kernel32.dll
#4  0x778cbf32 in ntdll!RtlInitializeExceptionChain ()
   from C:\Windows\SysWOW64\ntdll.dll
#5  0x778cbf05 in ntdll!RtlInitializeExceptionChain ()
   from C:\Windows\SysWOW64\ntdll.dll
#6  0x00000000 in ?? ()

Thread 1 (Thread 8680.0x146c):
#0  0x778af8d1 in ntdll!ZwWaitForSingleObject ()
   from C:\Windows\SysWOW64\ntdll.dll
#1  0x778af8d1 in ntdll!ZwWaitForSingleObject ()
   from C:\Windows\SysWOW64\ntdll.dll
#2  0x778cb4b4 in ntdll!RtlIntegerToUnicodeString ()
   from C:\Windows\SysWOW64\ntdll.dll
#3  0x778cb398 in ntdll!RtlIntegerToUnicodeString ()
   from C:\Windows\SysWOW64\ntdll.dll
#4  0x778d3ab8 in ntdll!LdrUnloadDll () from C:\Windows\SysWOW64\ntdll.dll
#5  0x779920c0 in ntdll!NlsAnsiCodePage () from C:\Windows\SysWOW64\ntdll.dll
#6  0x72f5b477 in DSA_GetSize ()
   from C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df
_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll
#7  0x771f2d1f in KERNELBASE!FreeLibrary ()
   from C:\Windows\syswow64\KernelBase.dll
#8  0x0532c1ad in NSPStartup () from C:\Windows\System32\mswsock.dll
#9  0x0532c207 in NSPStartup () from C:\Windows\System32\mswsock.dll
#10 0x7554af4c in WahEnumerateHandleContexts ()
   from C:\Windows\syswow64\ws2_32.dll
#11 0x7554ae54 in WahEnumerateHandleContexts ()
   from C:\Windows\syswow64\ws2_32.dll
#12 0x7554659e in WSACloseEvent () from C:\Windows\syswow64\ws2_32.dll
#13 0x00000000 in ?? ()

-- 
Dani Moncayo