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

From: Dani Moncayo <[email-masked]>
Date: Mon, 14 Jul 2014 12:15:11 +0200

>> > If you comment out the call to term_winsock in term_ntproc, does the
>> > problem go away?

I've just got a hung session with a binary built with the above change
(on top of the last pre-release 24.3.92.1).

The backtrace looks similar to the ones already reported:

(gdb) thread apply all bt full

Thread 5 (Thread 6336.0xf00):
#0  0x7725000d in ntdll!DbgBreakPoint () from C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#1  0x772df8ee in ntdll!DbgUiRemoteBreakin () from C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#2  0x186efa2c in ?? ()
No symbol table info available.
#3  0x00000000 in ?? ()
No symbol table info available.

Thread 4 (Thread 6336.0x17c0):
#0  0x7725f8d1 in ntdll!ZwWaitForSingleObject () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#1  0x7725f8d1 in ntdll!ZwWaitForSingleObject () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#2  0x7727b4b4 in ntdll!RtlIntegerToUnicodeString () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#3  0x7727b398 in ntdll!RtlIntegerToUnicodeString () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#4  0x7729650d in ntdll!LdrShutdownThread () from C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#5  0x773420c0 in ntdll!NlsAnsiCodePage () from C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#6  0x77ccfadc in ?? ()
No symbol table info available.
#7  0x00000000 in ?? ()
No symbol table info available.

Thread 3 (Thread 6336.0x8d4):
#0  0x75b078d7 in USER32!DispatchMessageW () from C:\Windows\syswow64\user32.dll
No symbol table info available.
#1  0x011f5a6c in w32_msg_pump (msg_buf=0x6edcff28) at w32fns.c:2450
        msg = {hwnd = 0x10376, message = 275, wParam = 1, lParam = 0,
time = 13634003, pt = {x = 373,
            y = 537}}
        result = 0
        focus_window = 0x403
#2  0x011f5caa in w32_msg_worker@4 (arg=0x0) at w32fns.c:2676
        msg = {hwnd = 0x0, message = 0, wParam = 0, lParam = 0, time =
0, pt = {x = 0, y = 0}}
        dummy_buf = {next = 0x0, w32msg = {msg = {hwnd = 0x0, message
= 0, wParam = 0, lParam = 0,
              time = 0, pt = {x = 0, y = 0}}, dwModifiers = 0, rect =
{left = 0, top = 0, right = 0,
              bottom = 0}}, result = 0, completed = 0}
#3  0x74a9338a in KERNEL32!BaseThreadInitThunk () from
C:\Windows\syswow64\kernel32.dll
No symbol table info available.
#4  0x7727bf32 in ntdll!RtlInitializeExceptionChain () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#5  0x7727bf05 in ntdll!RtlInitializeExceptionChain () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#6  0x00000000 in ?? ()
No symbol table info available.

Thread 2 (Thread 6336.0xad4):
#0  0x7726015d in ntdll!ZwWaitForMultipleObjects () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#1  0x7726015d in ntdll!ZwWaitForMultipleObjects () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#2  0x7727c6c5 in ntdll!RtlRegisterThreadWithCsrss () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#3  0x74a9338a in KERNEL32!BaseThreadInitThunk () from
C:\Windows\syswow64\kernel32.dll
No symbol table info available.
#4  0x7727bf32 in ntdll!RtlInitializeExceptionChain () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#5  0x7727bf05 in ntdll!RtlInitializeExceptionChain () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#6  0x00000000 in ?? ()
No symbol table info available.

Thread 1 (Thread 6336.0x18c4):
#0  0x7725f8d1 in ntdll!ZwWaitForSingleObject () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#1  0x7725f8d1 in ntdll!ZwWaitForSingleObject () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#2  0x7727b4b4 in ntdll!RtlIntegerToUnicodeString () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#3  0x7727b398 in ntdll!RtlIntegerToUnicodeString () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#4  0x7726ffd3 in ntdll!LdrGetDllHandleEx () from C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#5  0x773420c0 in ntdll!NlsAnsiCodePage () from C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#6  0x77bae01c in ?? ()
No symbol table info available.
#7  0x00000001 in ?? ()
No symbol table info available.
#8  0x7726fd17 in ntdll!RtlValidateUnicodeString () from
C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#9  0x7726fd2f in ntdll!LdrGetDllHandle () from C:\Windows\SysWOW64\ntdll.dll
No symbol table info available.
#10 0x761e1a43 in KERNELBASE!GetModuleFileNameW () from
C:\Windows\syswow64\KernelBase.dll
No symbol table info available.
#11 0x00000001 in ?? ()
No symbol table info available.
#12 0x00000000 in ?? ()
No symbol table info available.

-- 
Dani Moncayo