Bug 18436 - [iOS] GroupBy tests in System.Core tests fails on enabling llvm
Summary: [iOS] GroupBy tests in System.Core tests fails on enabling llvm
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 7.2.1
Hardware: PC Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Zoltan Varga
Depends on:
Reported: 2014-03-17 17:58 UTC by GouriKumari
Modified: 2014-06-26 12:30 UTC (History)
4 users (show)

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 Developer Community or GitHub 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:

Description GouriKumari 2014-03-17 17:58:09 UTC
Steps to reproduce:
Update System to XI 9a55ab6 and to corresponding mono and maccore
Execute System.Core Tests with llvm enabled

Actual Behaviour:
GroupBy tests in EnumerableAsQueryableTest fails on iOS device (iOS7.1 and iOs 6.0 devices)
Test Failure Log: https://gist.github.com/GouriKumari/87067f0b48e6b0a1fcd8
Build Log: https://gist.github.com/GouriKumari/072a608ecf237f9c7d9d

Test Env:
 XI 9a55ab6
Xcode 5.1
iPad6.0, iphone5S 7.1
Comment 1 Sebastien Pouliot 2014-03-17 20:20:14 UTC
Yes, I confirm - that test case fails only when LLVM is enabled (tested with master).

Tested with an iPad 1st gen (iOS 5.1)
* works without LLVM
* fails with LLVM enabled
Comment 2 GouriKumari 2014-03-18 18:05:53 UTC
Update to Comment #0
Test Env:
XI 7.2.1 9a55ab6f and not 9a55ab6
Comment 3 Zoltan Varga 2014-03-18 20:20:21 UTC
I can repro this, testcase:
		int [] _array;
		IQueryable<int> _src;

		_array = new int [] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
		_src = _array.AsQueryable<int> ();

		IQueryable<IGrouping<bool, int>> grouping = _src.GroupBy<int, bool> ((n) => n > 5);
		Console.WriteLine (grouping.Count ());
Comment 4 GouriKumari 2014-04-02 17:28:29 UTC
An update to comment #0.  This bug is not a regression. I tested System.Core/GroupBy test (llvm enabled ) with Xamarin.iOS 7.2.0 stable version and the same error occurred with stable as well. 

Error Log: https://gist.github.com/GouriKumari/1ed70cb3b1a18a6d85c8

Test Env:
Apple Developer Tools
Xcode 5.1 (5084)
Build 5B130a

Version: (Enterprise Edition)
Hash: 58c3efa
Build date: 2014-10-03 18:02:26-0400

iphone 5S 7.1
Comment 5 GouriKumari 2014-04-02 17:38:58 UTC
Moving the milestone from 7.2.1 to untriaged
Comment 6 GouriKumari 2014-04-30 15:32:30 UTC
This test failure occurs in  mtvs 2.0 series : 91882df9746d118aa7fefff2a1a2baf15cb449ca 

Test Log: https://gist.github.com/GouriKumari/200b55ffe17e369e2a65
Comment 7 GouriKumari 2014-06-06 17:39:42 UTC
This test failure occurs in monotouch-master-disable_64 build as well.


Test Env:

Apple Developer Tools
Xcode 5.1.1 (5085)
Build 5B1008

Version: (Enterprise Edition)
Hash: f293050

iPad 6.0.1, iPod touch 5 gen  7.0.2
Comment 8 PJ 2014-06-06 18:47:10 UTC
As this is not a regression from the current stable, moving it back off the 7.2.4 milestone. We'll add it back onto a milestone once there's a fix.
Comment 9 Zoltan Varga 2014-06-13 11:24:08 UTC
This is a bug in the gsharedvt code, which only surfaces when using llvm.
			int [] _array;
			IQueryable<int> _src;

			_array = new int [] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
			_src = _array.AsQueryable<int> ();

			IQueryable<IGrouping<bool, int>> grouping = _src.GroupBy<int, bool> ((n) => n > 5);
			Console.WriteLine (grouping.Count ());

This should print 2, but it prints 10.
Comment 10 Zoltan Varga 2014-06-14 16:44:09 UTC
Should be fixed by the mono/mono-extensions bump in 605032e3c8debc53e9007cb36ce711850ee9b170.
Comment 11 GouriKumari 2014-06-26 11:11:56 UTC
This issue is fixed in monotouch-master, but not in monotouch 7.2.6. Is it possible to include the fix in monotouch 7.2.6 branch as well?
Comment 12 Zoltan Varga 2014-06-26 12:30:38 UTC
The fix depends on revision 79e70b4692a9ac7bd1ab0e3f0be1d4b5aa9a6152 from mono, which has to be backported to whatever mono branch 7.2.6 uses.