Bug 52473 - Timer tests failures on iOS
Summary: Timer tests failures on iOS
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: io-layer ()
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Rodrigo Kumpera
URL:
: 47343 ()
Depends on:
Blocks:
 
Reported: 2017-02-13 12:04 UTC by Marek Safar
Modified: 2017-02-22 20:43 UTC (History)
3 users (show)

Tags: 2017-02
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 Marek Safar 2017-02-13 12:04:10 UTC
It looks like some iOS specific issue

https://wrench.internalx.com/Wrench/WebServices/Download.aspx?workfile_id=18125490

	[FAIL] TimerTest.TestChange :   #1 8
  Expected: True
  But was:  False

		  at MonoTests.System.Threading.TimerTest.TestChange () [0x0004c] in /Users/builder/data/lanes/4343/6d32adbe/source/xamarin-macios/external/mono/mcs/class/corlib/Test/System.Threading/TimerTest.cs:65 
		  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
		  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.5.0.468/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305 
	[PASS] TimerTest.TestDelayZeroPeriodZero
	[FAIL] TimerTest.TestDispose :   #1
  Expected: True
  But was:  False

		  at MonoTests.System.Threading.TimerTest.TestDispose () [0x00058] in /Users/builder/data/lanes/4343/6d32adbe/source/xamarin-macios/external/mono/mcs/class/corlib/Test/System.Threading/TimerTest.cs:98 
		  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
		  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.5.0.468/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305 
	[PASS] TimerTest.TestDispose2
	[IGNORED] TimerTest.TestDisposeOnCallback
	[FAIL] TimerTest.TestDueTime :   #4
  Expected: True
  But was:  False

		  at MonoTests.System.Threading.TimerTest.TestDueTime () [0x00093] in /Users/builder/data/lanes/4343/6d32adbe/source/xamarin-macios/external/mono/mcs/class/corlib/Test/System.Threading/TimerTest.cs:53 
		  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
		  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.5.0.468/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
Comment 1 Rodrigo Kumpera 2017-02-13 16:05:10 UTC
Hey Marek,

There are no runtime issue here, the BCL Timer tests are broken as fuck, they expect perfect scheduling and timer.
Comment 2 Rodrigo Kumpera 2017-02-14 06:05:11 UTC
https://github.com/mono/mono/pull/4376
Comment 3 Rolf Bjarne Kvinge [MSFT] 2017-02-14 09:33:33 UTC
This only happens on Sierra.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2017-02-14 09:34:59 UTC
*** Bug 47343 has been marked as a duplicate of this bug. ***
Comment 5 Rodrigo Kumpera 2017-02-14 21:43:05 UTC
It should fail on Mavericks+ which is when timer coalescing was introduced.

Maybe Sierra is even more aggressive.
Comment 6 Rodrigo Kumpera 2017-02-22 17:06:31 UTC
Fixed on 2017-02.
Comment 7 Rodrigo Kumpera 2017-02-22 20:43:47 UTC
Backport to 4.8 so it's on 15.1:

https://github.com/mono/mono/pull/4417