New submission from Cao Hongfu <cloudn...@gmail.com>:
Recently, python frequently(but randomly) hung or stuck at initialization(when I click the python.exe or use python cmd prompt) on my server(running windows server 2008R2), But everything is fine on my windows 7 PC). I tried reinstall python, but not working(also tried 3.6). I tried process-explorer and found that the normal python process allocated about 12MB memory but the stuck one only allocated 8MB memory. here is the stack information for stuck python process(having 3 threads): ------------------thread1------------------ ntdll.dll!ZwWaitForSingleObject+0xa ntdll.dll!RtlImageDirectoryEntryToData+0x118 ntdll.dll!RtlEnterCriticalSection+0xd1 ntdll.dll!EtwDeliverDataBlock+0x777 ntdll.dll!LdrLoadDll+0xed !TlsGetValue+0x4756 !UuidCreate+0x1b00 !I_RpcBindingIsServerLocal+0x12899 !RegEnumKeyExW+0x13a !RegEnumKeyExW+0xbe !RpcBindingFree+0x320 !RpcAsyncRegisterInfo+0x10ff !Ndr64AsyncClientCall+0x9da !Ndr64AsyncClientCall+0xc9b !NdrClientCall3+0xf5 !LsaOpenPolicy+0xb9 !LsaOpenPolicy+0x56 !LookupPrivilegeValueW+0x6f !LookupPrivilegeValueA+0x84 !PyNamespace_New+0xd4 !PyCodec_LookupTextEncoding+0xb5 !PyObject_SetAttrId+0x21e !PyMethodDef_RawFastCallDict+0x115 !PyObject_SetAttr+0x352 !PyEval_EvalFrameDefault+0x1182 !PyEval_EvalCodeWithName+0x1a0 !PyMethodDef_RawFastCallKeywords+0xc32 !PyEval_EvalFrameDefault+0x4b1 !PyMethodDef_RawFastCallKeywords+0xa77 !PyEval_EvalFrameDefault+0x913 !PyMethodDef_RawFastCallKeywords+0xa77 !PyEval_EvalFrameDefault+0x4b1 !PyMethodDef_RawFastCallKeywords+0xa77 !PyEval_EvalFrameDefault+0x4b1 !PyMethodDef_RawFastCallKeywords+0xa77 !PyEval_EvalFrameDefault+0x913 !PyMethodDef_RawFastCallKeywords+0xa77 !PyEval_EvalFrameDefault+0x4b1 !PyMethodDef_RawFastCallKeywords+0xa77 !PyEval_EvalFrameDefault+0x913 !PyFunction_FastCallDict+0xdd !PyObject_CallMethod+0xef !PyObject_CallMethod+0xa2 !PyObject_CallMethod+0x3c !PyTime_MulDiv+0x47 !Py_InitializeMainInterpreter+0x95 !PyMainInterpreterConfig_Read+0x309 !PyMapping_SetItemString+0x306 !PyBytes_AsString+0x142 !Py_Main+0x52 !BaseThreadInitThunk+0xd ntdll.dll!RtlUserThreadStart+0x1d ------------------thread2------------------ ntdll.dll!ZwWaitForSingleObject+0xa ntdll.dll!RtlImageDirectoryEntryToData+0x118 ntdll.dll!RtlEnterCriticalSection+0xd1 !UuidCreate+0x1ae2 !NdrFullPointerQueryPointer+0x35d !LsaLookupGetDomainInfo+0xb8 !RpcBindingFree+0x320 !RpcAsyncRegisterInfo+0x10ff !Ndr64AsyncClientCall+0x9da !Ndr64AsyncClientCall+0xc9b !NdrClientCall3+0xf5 !LsaLookupOpenLocalPolicy+0x41 !LookupAccountNameLocalW+0xaf !LookupAccountSidLocalW+0x25 !LookupAccountSidW+0x57 !MBCGlobal::get_proc_user_name+0x1f7 !MBCGlobal::init+0x240a !HDirSnap::operator=+0xda !LVPVTBase::to_file+0x46ef ntdll.dll!RtlDeactivateActivationContextUnsafeFast+0x34e ntdll.dll!EtwDeliverDataBlock+0xa44 ntdll.dll!LdrLoadDll+0xed !TlsGetValue+0x4756 !PublicService+0x13ec !BaseThreadInitThunk+0xd ntdll.dll!RtlUserThreadStart+0x1d ------------------thread3------------------ ntdll.dll!ZwWaitForSingleObject+0xa ntdll.dll!RtlImageDirectoryEntryToData+0x118 ntdll.dll!RtlEnterCriticalSection+0xd1 ntdll.dll!LdrQueryModuleServiceTags+0x13f ntdll.dll!CsrIdentifyAlertableThread+0x9d ntdll.dll!EtwSendNotification+0x16d ntdll.dll!RtlQueryProcessDebugInformation+0x371 ntdll.dll!EtwDeliverDataBlock+0xf00 !BaseThreadInitThunk+0xd ntdll.dll!RtlUserThreadStart+0x1d here is the stack info for normal python process(have 2 threads) ------------------thread1------------------ ntdll.dll!ZwRequestWaitReplyPort+0xa kernel32.dll!GetConsoleMode+0xf8 kernel32.dll!VerifyConsoleIoHandle+0x281 kernel32.dll!ReadConsoleW+0xbc python37.dll!PyOS_Readline+0x4f4 python37.dll!PyOS_Readline+0x333 python37.dll!PyOS_Readline+0xfa python37.dll!PyErr_NoMemory+0xc228 python37.dll!PyUnicode_AsUnicode+0x553 python37.dll!PyUnicode_AsUnicode+0x9c python37.dll!PyParser_ParseFileObject+0x86 python37.dll!PyParser_ASTFromFileObject+0x82 python37.dll!PyRun_InteractiveOneObject+0x24a python37.dll!PyRun_InteractiveLoopFlags+0xf6 python37.dll!PyRun_AnyFileExFlags+0x45 python37.dll!Py_UnixMain+0x50b python37.dll!Py_UnixMain+0x5b3 python37.dll!PyErr_NoMemory+0x195a4 python37.dll!PyBytes_AsString+0x14f python37.dll!Py_Main+0x52 python.exe+0x1258 kernel32.dll!BaseThreadInitThunk+0xd ntdll.dll!RtlUserThreadStart+0x1d ------------------thread2------------------ ntdll.dll!NtWaitForMultipleObjects+0xa ntdll.dll!RtlIsCriticalSectionLockedByThread+0xd4d kernel32.dll!BaseThreadInitThunk+0xd ntdll.dll!RtlUserThreadStart+0x1d One of my friend say that this may be issues with https://support.microsoft.com/en-us/help/2545627/a-multithreaded-application-might-crash-in-windows-7-or-in-windows-ser Thx. ---------- components: Windows messages: 331105 nosy: Cao Hongfu, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: python hung or stuck somtimes randomly on windows server 2008R2 type: crash versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35418> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com