一千萬個為什麽

搜索

為什麽Mono的xbuild和mcs有時會在調用時凍結?

我在Windows 7 x64上使用Mono 2.10.2和2.10.5都體驗過這一點。

有時,當使用任何參數(或無參數)調用 mcsxbuild 時,它們只會凍結幾分鐘。這是在stdout上發生第一次輸出之前。在Process Explorer中,我看到 mono.exe 在基本沒有活動的情況下運行:常量內存使用,大多數時間沒有CPU周期。我看到兩個主題:

第一個起始地址 mono-2.0.dll!GC_push_all_stack + 0x6650 掛起狀態 Wait:UserRequest ,其中包含以下堆棧跟蹤:

ntoskrnl.exe!memset+0x64a
ntoskrnl.exe!KeWaitForMultipleObjects+0xd52
ntoskrnl.exe!KeWaitForMutexObject+0x19f
ntoskrnl.exe!__misaligned_access+0xba4
ntoskrnl.exe!__misaligned_access+0x1821
ntoskrnl.exe!KeWaitForMultipleObjects+0xf5d
ntoskrnl.exe!KeWaitForMutexObject+0x19f
ntoskrnl.exe!NtWaitForSingleObject+0xde
ntoskrnl.exe!KeSynchronizeExecution+0x3a43
wow64cpu.dll!TurboDispatchJumpAddressEnd+0x6c0
wow64cpu.dll!TurboDispatchJumpAddressEnd+0x4a8
wow64.dll!Wow64SystemServiceEx+0x1ce
wow64.dll!Wow64LdrpInitialize+0x429
ntdll.dll!RtlIsDosDeviceName_U+0x24c87
ntdll.dll!LdrInitializeThunk+0xe
ntdll.dll!ZwWaitForSingleObject+0x15
kernel32.dll!WaitForSingleObjectEx+0x43
mono-2.0.dll!mono_sem_timedwait+0x32
mono-2.0.dll!mono_sem_wait+0x21
mono-2.0.dll!mono_gc_cleanup+0x1b0
mono-2.0.dll!mono_thread_set_execution_context+0x14a
mono-2.0.dll!GC_push_all_stack+0x6678
kernel32.dll!BaseThreadInitThunk+0x12
ntdll.dll!RtlInitializeExceptionChain+0x63
ntdll.dll!RtlInitializeExceptionChain+0x36

另一個具有起始地址 mono.exe + 0x1290 的狀態掛起狀態 Wait:WrLpcReply

ntoskrnl.exe!memset+0x64a
ntoskrnl.exe!KeWaitForMultipleObjects+0xd52
ntoskrnl.exe!KeWaitForMutexObject+0x19f
ntoskrnl.exe!ExAcquireSharedStarveExclusive+0x30f
ntoskrnl.exe!NtQuerySystemInformation+0x5a7a
ntoskrnl.exe!NtQuerySystemInformation+0x5174
ntoskrnl.exe!NtQuerySystemInformation+0x2f6f
ntoskrnl.exe!KeSynchronizeExecution+0x3a43
ntoskrnl.exe!ZwUnlockFile+0x130
msrpc.sys!Ndr64AsyncClientCall+0x166fb
msrpc.sys!Ndr64AsyncClientCall+0x18638
ntdll.dll!ZwCreateFile+0xa
wow64.dll!Wow64EmulateAtlThunk+0xe697
wow64.dll!Wow64SystemServiceEx+0xd7
wow64cpu.dll!TurboDispatchJumpAddressEnd+0x2d
wow64.dll!Wow64SystemServiceEx+0x1ce
wow64.dll!Wow64LdrpInitialize+0x429
ntdll.dll!RtlUniform+0x6e6
ntdll.dll!RtlCreateTagHeap+0xa7
ntdll.dll!LdrInitializeThunk+0xe
ntdll.dll!NtCreateFile+0x12
kernel32.dll!CreateFileW+0x4a
kernel32.dll!CreateFileA+0x36
mono-2.0.dll!mono_error_raise_exception+0x6f5b
mono-2.0.dll!mono_error_raise_exception+0x472b
mono-2.0.dll!mono_error_raise_exception+0x45fc
mono-2.0.dll!mono_error_raise_exception+0x5fb4
mono-2.0.dll!mono_config_for_assembly+0x16b
mono-2.0.dll!mono_assembly_open_full+0x3d6
mono-2.0.dll!mono_make_shadow_copy+0x7d5
mono-2.0.dll!mono_make_shadow_copy+0x8b9
mono-2.0.dll!mono_make_shadow_copy+0xa29
mono-2.0.dll!mono_install_assembly_postload_refonly_search_hook+0x46
mono-2.0.dll!mono_assembly_load_full_nosearch+0x11b
mono-2.0.dll!mono_make_shadow_copy+0xd5a
mono-2.0.dll!mono_thread_internal_current+0x13
mono-2.0.dll!mono_thread_interruption_requested+0x4e
mono-2.0.dll!mono_runtime_class_init_full+0x14b
mono-2.0.dll!mono_error_raise_exception+0x1bc3
mono-2.0.dll!mono_error_raise_exception+0xe5c
mono-2.0.dll!mono_jit_compile_method+0x10c
mono-2.0.dll!mono_runtime_invoke+0x42
mono-2.0.dll!mono_runtime_class_init_full+0x1df
mono-2.0.dll!mono_codegen+0x303f
mono-2.0.dll!mono_jit_compile_method+0x22
mono-2.0.dll!mono_create_static_rgctx_trampoline+0x637
mono-2.0.dll!mono_magic_trampoline+0x36
mono-2.0.dll!mono_error_raise_exception+0xf28
mono-2.0.dll!mono_runtime_class_init+0x1a
mono-2.0.dll!mono_jit_compile_method+0x10c
mono-2.0.dll!mono_runtime_invoke+0x42
mono-2.0.dll!mono_runtime_exec_main+0x1dc
mono-2.0.dll!mono_main+0x1662
mono.exe+0x1474
mono.exe+0x10bb
mono.exe+0x12a8
kernel32.dll!BaseThreadInitThunk+0x12
ntdll.dll!RtlInitializeExceptionChain+0x63
ntdll.dll!RtlInitializeExceptionChain+0x36

每隔一段時間他們就會進行一些活動,幾分鐘後,他們將繼續完成任務,好像什麽也沒發生過一樣。但是,重復相同的命令將導致相同的凍結量。

一旦我重新啟動機器,他們會立即再次做出反應。

最佳答案

暫時沒有最佳答案

轉載註明原文: 為什麽Mono的xbuild和mcs有時會在調用時凍結?