Bug 49514 - monitor-abort.exe test fails on arm64
Summary: monitor-abort.exe test fails on arm64
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Vlad Brezae
URL:
Depends on:
Blocks:
 
Reported: 2016-12-09 19:57 UTC by Zoltan Varga
Modified: 2016-12-21 18:59 UTC (History)
3 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 on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Zoltan Varga 2016-12-09 19:57:28 UTC
To reproduce:
while true; do ./mono monitor-abort.exe || break; done

Failure:

Unhandled Exception:
System.Threading.SynchronizationLockException: Object synchronization method was called from an unsynchronized block of code.
  at System.Threading.ManualResetEventSlim.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x001c1] in <1abd24c7345c4972b1baa38b4323e76f>:0 
  at System.Threading.Barrier.DiscontinuousWait (System.Threading.ManualResetEventSlim currentPhaseEvent, System.Int32 totalTimeout, System.Threading.CancellationToken token, System.Int64 observedPhase) [0x00023] in <78ba5165a2764d1682331343f5ac0d63>:0 
  at System.Threading.Barrier.SignalAndWait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x0012e] in <78ba5165a2764d1682331343f5ac0d63>:0 
  at System.Threading.Barrier.SignalAndWait (System.Threading.CancellationToken cancellationToken) [0x00000] in <78ba5165a2764d1682331343f5ac0d63>:0 
  at System.Threading.Barrier.SignalAndWait () [0x00000] in <78ba5165a2764d1682331343f5ac0d63>:0 
  at Program.ThreadFunc (System.Object lock_obj) [0x00002] in <2ba78a22c3eb4da2903c61abc8157000>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x0002c] in <1abd24c7345c4972b1baa38b4323e76f>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <1abd24c7345c4972b1baa38b4323e76f>:0 
 
The failure seems to be caused by the Monitor.Exit () call generated for a lock ().
Comment 1 Zoltan Varga 2016-12-21 18:59:07 UTC
Fixed by 088ea9db6e032beb96f33584ab24a9f64681d148.