Bug 33078 - MSBiology benchmark hangs in Monitor.Wait
Summary: MSBiology benchmark hangs in Monitor.Wait
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-08-13 17:13 UTC by Jon Purdy
Modified: 2015-08-13 17:13 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 33078 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Jon Purdy 2015-08-13 17:13:58 UTC
Running a recent master[1] on OS X, the MSBiology benchmark[2] periodically hangs. Normally the test takes 2 minutes to run, but 10–20% of the time it hangs, seemingly in a busy loop, for about 10 minutes before resuming. Interrupting it in a debugger, it looks like the process is spending a lot of time in Monitor.Wait[3].

[1]: a8cb543870c1177185e212e27e50ccdee5f4d60b

[2]: https://github.com/xamarin/benchmarker/blob/master/tests/MSBiology/TestRunner.exe

[3]: Backtrace:

* thread #1: tid = 0x6c513c, 0x00007fff8f6ee716 libsystem_kernel.dylib`__psynch_cvwait + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x00007fff8f6ee716 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fff91e0cc3b libsystem_pthread.dylib`_pthread_cond_wait + 727
    frame #2: 0x000000010021a5c1 mono-sgen`_wapi_handle_timedwait_signal_handle(handle=<unavailable>, timeout=<unavailable>, alertable=<unavailable>, poll=<unavailable>, alerted=<unavailable>) + 577 at handles.c:1635
    frame #3: 0x0000000100228c9b mono-sgen`wapi_WaitForSingleObjectEx(handle=<unavailable>, timeout=<unavailable>, alertable=1) + 459 at wait.c:185
    frame #4: 0x00000001001b8574 mono-sgen`ves_icall_System_Threading_Monitor_Monitor_wait(obj=0x00000001010017d8, ms=4294967295) + 404 at monitor.c:1272
    frame #5: 0x0000000102acfbce mscorlib.dll.dylib`System_Threading_Monitor_Wait_object_int(obj=0x00000001010017d8, millisecondsTimeout=-1) + 110 at Monitor.cs:148
    frame #6: 0x0000000102900e2a mscorlib.dll.dylib`System_Threading_ManualResetEventSlim_Wait_int_System_Threading_CancellationToken(this=0x00000001010017b0, millisecondsTimeout=-1, cancellationToken=0) + 826 at ManualResetEventSlim.cs:669
    frame #7: 0x0000000102918fce mscorlib.dll.dylib`System_Threading_Tasks_Task_SpinThenBlockingWait_int_System_Threading_CancellationToken(this=0x00000001010012a8, millisecondsTimeout=-1, cancellationToken=0) + 190 at Task.cs:3361
    frame #8: 0x0000000102918ef0 mscorlib.dll.dylib`System_Threading_Tasks_Task_InternalWait_int_System_Threading_CancellationToken(this=0x00000001010012a8, millisecondsTimeout=-1, cancellationToken=0) + 176 at Task.cs:3300
    frame #9: 0x0000000102906673 mscorlib.dll.dylib`System_Threading_Tasks_Task_1_T_REF_GetResultCore_bool(this=0x00000001010012a8, waitCompletionNotification=true) + 83 at Future.cs:562
    frame #10: 0x00000001029065e5 mscorlib.dll.dylib`System_Threading_Tasks_Task_1_T_REF_get_Result(this=0x00000001010012a8) + 37 at Future.cs:535
    frame #11: 0x0000000106db7aac
    frame #12: 0x0000000106db188f
    frame #13: 0x0000000102b1fcdb mscorlib.dll.dylib`System_Threading_Tasks_Parallel__ForEachWorkerc__AnonStorey6_2_T1_REF_T2_REF__m__0_int(this=0x00000001010617b0, i=0) + 91 at Parallel.cs:2374
    frame #14: 0x0000000102b1ef0b mscorlib.dll.dylib`System_Threading_Tasks_Parallel__ForWorkerc__AnonStorey3_1_T_REF__m__1(this=0x0000000101061850) + 779 at Parallel.cs:1200
    frame #15: 0x000000010291869d mscorlib.dll.dylib`System_Threading_Tasks_Task_InnerInvoke(this=0x0000000101061990) + 77 at Task.cs:2906
    frame #16: 0x0000000102918704 mscorlib.dll.dylib`System_Threading_Tasks_Task_InnerInvokeWithArg_System_Threading_Tasks_Task(this=0x0000000101061990, childTask=<unavailable>) + 20 at Task.cs:2930
    frame #17: 0x0000000102b20b17 mscorlib.dll.dylib`System_Threading_Tasks_Task__ExecuteSelfReplicatingc__AnonStorey0__m__0_object(this=0x00000001010619f8, param0=<unavailable>) + 439 at Task.cs:2654
    frame #18: 0x000000010291828c mscorlib.dll.dylib`System_Threading_Tasks_Task_ExecuteSelfReplicating_System_Threading_Tasks_Task(root=0x0000000101061990) + 300 at Task.cs:2723
    frame #19: 0x0000000102917f6e mscorlib.dll.dylib`System_Threading_Tasks_Task_Execute(this=0x0000000101061990) + 62 at Task.cs:2522
    frame #20: 0x000000010291863f mscorlib.dll.dylib`System_Threading_Tasks_Task_ExecutionContextCallback_object(obj=0x0000000101061990) + 79 at Task.cs:2892
    frame #21: 0x0000000102929ec7 mscorlib.dll.dylib`System_Threading_ExecutionContext_RunInternal_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool(executionContext=0x0000000101000ac0, callback=0x0000000101006590, state=0x0000000101061990, preserveSyncCtx=true) + 455 at executioncontext.cs:581
    frame #22: 0x0000000102929cf1 mscorlib.dll.dylib`System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool(executionContext=0x0000000101000ac0, callback=0x0000000101006590, state=0x0000000101061990, preserveSyncCtx=true) + 33 at executioncontext.cs:530
    frame #23: 0x0000000102918593 mscorlib.dll.dylib`System_Threading_Tasks_Task_ExecuteWithThreadLocal_System_Threading_Tasks_Task_(this=0x0000000101061990, currentTaskSlot=4353753216) + 275 at Task.cs:2853
    frame #24: 0x000000010291840e mscorlib.dll.dylib`System_Threading_Tasks_Task_ExecuteEntry_bool(this=0x0000000101061990, bPreventDoubleExecution=false) + 222 at Task.cs:2786
    frame #25: 0x0000000102927530 mscorlib.dll.dylib`System_Threading_Tasks_ThreadPoolTaskScheduler_TryExecuteTaskInline_System_Threading_Tasks_Task_bool(this=0x00000001036cc748, task=0x0000000101061990, taskWasPreviouslyQueued=false) + 64 at ThreadPoolTaskScheduler.cs:91
    frame #26: 0x000000010292605b mscorlib.dll.dylib`System_Threading_Tasks_TaskScheduler_TryRunInline_System_Threading_Tasks_Task_bool(this=0x00000001036cc748, task=0x0000000101061990, taskWasPreviouslyQueued=false) + 203 at TaskScheduler.cs:221
    frame #27: 0x0000000102916159 mscorlib.dll.dylib`System_Threading_Tasks_Task_InternalRunSynchronously_System_Threading_Tasks_TaskScheduler_bool(this=0x0000000101061990, scheduler=0x00000001036cc748, waitForCompletion=true) + 249 at Task.cs:1227
    frame #28: 0x0000000102916038 mscorlib.dll.dylib`System_Threading_Tasks_Task_RunSynchronously_System_Threading_Tasks_TaskScheduler(this=0x0000000101061990, scheduler=0x00000001036cc748) + 40 at Task.cs:1175
    frame #29: 0x000000010290e01b mscorlib.dll.dylib`System_Threading_Tasks_Parallel_ForWorker_T_REF_int_int_System_Threading_Tasks_ParallelOptions_System_Action_1_int_System_Action_2_int_System_Threading_Tasks_ParallelLoopState_System_Func_4_int_System_Threading_Tasks_ParallelLoopState_T_REF_T_REF_System_Func_1_T_REF_System_Action_1_T_REF(fromInclusive=0, toExclusive=1, parallelOptions=0x0000000101061788, body=0x00000001010617f0, bodyWithState=0x0000000000000000, bodyWithLocal=0x0000000000000008, localInit=0x0000000000000800, localFinally=0x0000000000000000) + 1563 at Parallel.cs:1269
    frame #30: 0x00000001029103d3 mscorlib.dll.dylib`System_Threading_Tasks_Parallel_ForEachWorker_TAwaiter_REF_TStateMachine_REF_System_Collections_Generic_IList_1_T_REF_System_Threading_Tasks_ParallelOptions_System_Action_1_T_REF_System_Action_2_T_REF_System_Threading_Tasks_ParallelLoopState_System_Action_3_T_REF_System_Threading_Tasks_ParallelLoopState_long_System_Func_4_TAwaiter_REF_System_Threading_Tasks_ParallelLoopState_TStateMachine_REF_TStateMachine_REF_System_Func_5_TAwaiter_REF_System_Threading_Tasks_ParallelLoopState_long_TStateMachine_REF_TStateMachine_REF_System_Func_1_TStateMachine_REF_System_Action_1_TStateMachine_REF(list=0x00000001010bbf38, parallelOptions=0x0000000101061788, body=0x0000000101061728, bodyWithState=0x0000000000000000, bodyWithStateAndIndex=0x0000000000000000, bodyWithStateAndLocal=0x0000000000000000, bodyWithEverything=0x0000000000000000, localInit=0x0000000000000000, localFinally=0x0000000000000000) + 595 at Parallel.cs:2373
    frame #31: 0x000000010290f9e7 mscorlib.dll.dylib`System_Threading_Tasks_Parallel_ForEachWorker_TAwaiter_REF_TStateMachine_REF_System_Collections_Generic_IEnumerable_1_T_REF_System_Threading_Tasks_ParallelOptions_System_Action_1_T_REF_System_Action_2_T_REF_System_Threading_Tasks_ParallelLoopState_System_Action_3_T_REF_System_Threading_Tasks_ParallelLoopState_long_System_Func_4_TAwaiter_REF_System_Threading_Tasks_ParallelLoopState_TStateMachine_REF_TStateMachine_REF_System_Func_5_TAwaiter_REF_System_Threading_Tasks_ParallelLoopState_long_TStateMachine_REF_TStateMachine_REF_System_Func_1_TStateMachine_REF_System_Action_1_TStateMachine_REF(source=0x00000001010bbf38, parallelOptions=0x0000000101061788, body=0x0000000101061728, bodyWithState=0x0000000000000000, bodyWithStateAndIndex=0x0000000000000000, bodyWithStateAndLocal=0x0000000000000000, bodyWithEverything=0x0000000000000000, localInit=0x0000000000000000, localFinally=0x0000000000000000) + 391 at Parallel.cs:2271
    frame #32: 0x000000010290ed6c mscorlib.dll.dylib`System_Threading_Tasks_Parallel_ForEach_T_REF_System_Collections_Generic_IEnumerable_1_T_REF_System_Action_1_T_REF(source=0x00000001010bbf38, body=0x0000000101061728) + 140 at Parallel.cs:1694
    frame #33: 0x0000000106d260d1
    frame #34: 0x000000010000d059 mono-sgen`mono_jit_runtime_invoke(method=<unavailable>, obj=0x0000000000000000, params=0x00007fff5fbff998, exc=0x000000000000000a) + 1641 at mini-runtime.c:2327
    frame #35: 0x00000001001b9a5e mono-sgen`mono_runtime_invoke(method=0x000000010050eeb0, obj=0x0000000000000000, params=0x00007fff5fbff998, exc=0x0000000000000000) + 110 at object.c:2783
    frame #36: 0x00000001001bf0db mono-sgen`mono_runtime_exec_main(method=0x000000010050eeb0, args=<unavailable>, exc=0x0000000000000000) + 379 at object.c:4040
    frame #37: 0x000000010007a8c0 mono-sgen`mono_main [inlined] main_thread_handler + 7776 at driver.c:1062
    frame #38: 0x000000010007a88a mono-sgen`mono_main(argc=<unavailable>, argv=<unavailable>) + 7722 at driver.c:2014
    frame #39: 0x00007fff908c05fd libdyld.dylib`start + 1