Bug 1922 - [AOT] PLinq .ForAll() throws ExecutionEngineException
Summary: [AOT] PLinq .ForAll() throws ExecutionEngineException
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 5.0
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-11-07 18:27 UTC by James Clancey
Modified: 2012-09-13 11:34 UTC (History)
6 users (show)

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


Attachments
TestCase (6.06 KB, application/zip)
2011-11-07 18:27 UTC, James Clancey
Details


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:
Status:
RESOLVED FIXED

Description James Clancey 2011-11-07 18:27:08 UTC
Created attachment 837 [details]
TestCase

Running AsParallel().ForAll() causes a JIT error. See attached test case.
Comment 1 Sebastien Pouliot 2011-11-07 23:12:12 UTC
device log...

Nov  7 23:14:14 Neptune kernel[0] <Debug>: launchd[30614] Builtin profile: container (sandbox)

Nov  7 23:14:14 Neptune kernel[0] <Debug>: launchd[30614] Container: /private/var/mobile/Applications/14A3BE19-1482-4305-A00E-7D3EE96935BB [69] (sandbox)


Nov  7 23:14:16 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: Listened for connections from MonoDevelop for 2 seconds, nobody connected.


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: Unhandled Exception: System.ExecutionEngineException: Attempting to JIT compile method 'System.Linq.Parallel.QueryCheckerVisitor:Visit<int> (System.Linq.Parallel.QueryNodes.QueryStartNode`1<int>)' while running with --aot-only.

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at System.Linq.Parallel.QueryNodes.QueryStartNode`1[System.Int32].Visit (INodeVisitor visitor) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStartNode.cs:73

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at System.Linq.Parallel.ParallelExecuter.CheckQuery[Int32] (System.Linq.Parallel.QueryNodes.QueryBaseNode`1 startingNode, Int32 partitionCount) [0x00007] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs:53

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at System.Linq.Parallel.ParallelExecuter.CheckQuery[Int32] (System.Linq.Parallel.QueryNodes.QueryBaseNode`1 startingNode, Boolean blocking) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs:47

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at System.Linq.Parallel.ParallelExecuter.ProcessAndBlock[Int32] (System.Linq.Parallel.QueryNodes.QueryBaseNode`1 node, System.Action`2 call) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs:128

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at System.Linq.ParallelEnumerable.ForAll[Int32] (System.Linq.ParallelQuery`1 source, System.Action`1 action) [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/ParallelEnumerable.cs:373

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at LinqCrash.AppDelegate.HandleBtnTouchDown (System.Object sender, System.EventArgs e) [0x00023] in /Users/poupou/Downloads/LinqCrash/LinqCrash/AppDelegate.cs:53

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at MonoTouch.UIKit.UIControlEventProxy.Activated () [0x00000] in <filename unknown>:0

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in <filename unknown>:0

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at LinqCrash.Application.Main (System.String[] args) [0x00000] in /Users/poupou/Downloads/LinqCrash/LinqCrash/Main.cs:16

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: [ERROR] FATAL UNHANDLED EXCEPTION: System.ExecutionEngineException: Attempting to JIT compile method 'System.Linq.Parallel.QueryCheckerVisitor:Visit<int> (System.Linq.Parallel.QueryNodes.QueryStartNode`1<int>)' while running with --aot-only.

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at System.Linq.Parallel.QueryNodes.QueryStartNode`1[System.Int32].Visit (INodeVisitor visitor) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStartNode.cs:73

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at System.Linq.Parallel.ParallelExecuter.CheckQuery[Int32] (System.Linq.Parallel.QueryNodes.QueryBaseNode`1 startingNode, Int32 partitionCount) [0x00007] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs:53

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at System.Linq.Parallel.ParallelExecuter.CheckQuery[Int32] (System.Linq.Parallel.QueryNodes.QueryBaseNode`1 startingNode, Boolean blocking) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs:47

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at System.Linq.Parallel.ParallelExecuter.ProcessAndBlock[Int32] (System.Linq.Parallel.QueryNodes.QueryBaseNode`1 node, System.Action`2 call) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs:128

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at System.Linq.ParallelEnumerable.ForAll[Int32] (System.Linq.ParallelQuery`1 source, System.Action`1 action) [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq/ParallelEnumerable.cs:373

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at LinqCrash.AppDelegate.HandleBtnTouchDown (System.Object sender, System.EventArgs e) [0x00023] in /Users/poupou/Downloads/LinqCrash/LinqCrash/AppDelegate.cs:53

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at MonoTouch.UIKit.UIControlEventProxy.Activated () [0x00000] in <filename unknown>:0

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in <filename unknown>:0

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>:   at LinqCrash.Application.Main (System.String[] args) [0x00000] in /Users/poupou/Downloads/LinqCrash/LinqCrash/Main.cs:16

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: Terminating runtime due to unhandled exception

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: Stacktrace:

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: Native stacktrace:


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	0   LinqCrash                           0x001f6450 mono_handle_native_sigsegv + 456


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	1   LinqCrash                           0x002212e0 sigabrt_signal_handler + 168


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	2   libsystem_c.dylib                   0x35966539 _sigtramp + 48


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	3   libsystem_c.dylib                   0x3595bf5b pthread_kill + 54


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	4   libsystem_c.dylib                   0x35954feb abort + 94


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	5   LinqCrash                           0x00348340 monoeg_g_logv + 268


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	6   LinqCrash                           0x0034843c monoeg_assertion_message + 80


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	7   LinqCrash                           0x001d7874 mono_thread_abort + 220


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	8   LinqCrash                           0x001f56c0 mono_handle_exception_internal + 2572


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	9   LinqCrash                           0x001f6064 mono_handle_exception + 120


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	10  LinqCrash                           0x0021f0a4 mono_arm_throw_exception + 364


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	11  LinqCrash                           0x001829cc throw_exception + 48


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	12  LinqCrash                           0x001da984 mono_jit_compile_method + 140


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	13  LinqCrash                           0x002ce74c mono_compile_method + 88


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	14  LinqCrash                           0x001f8088 common_call_trampoline + 2400


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	15  LinqCrash                           0x001f8944 mono_vcall_trampoline + 444


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	16  LinqCrash                           0x001828d8 generic_trampoline_vcall + 136


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	17  LinqCrash                           0x000568f0 System_Linq_Parallel_ParallelExecuter_CheckQuery_int_System_Linq_Parallel_QueryNodes_QueryBaseNode_1_int_int + 240


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	18  LinqCrash                           0x00053a4c System_Linq_Parallel_ParallelExecuter_CheckQuery_int_System_Linq_Parallel_QueryNodes_QueryBaseNode_1_int_bool + 152


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	19  LinqCrash                           0x00050ed4 System_Linq_Parallel_ParallelExecuter_ProcessAndBlock_int_System_Linq_Parallel_QueryNodes_QueryBaseNode_1_int_System_Action_2_int_System_Threading_CancellationToken + 148


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	20  LinqCrash                           0x0004f780 System_Linq_ParallelEnumerable_ForAll_int_System_Linq_ParallelQuery_1_int_System_Action_1_int + 648


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	21  LinqCrash                           0x00049f4c methods + 2460


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	22  LinqCrash                           0x0001d4e4 MonoTouch_UIKit_UIControlEventProxy_Activated + 68


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	23  LinqCrash                           0x00153050 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	24  LinqCrash                           0x001dbaf8 mono_jit_runtime_invoke + 2892


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	25  LinqCrash                           0x002d4fbc mono_runtime_invoke + 200


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	26  LinqCrash                           0x003685d8 monotouch_trampoline + 3140


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	27  CoreFoundation                      0x350f1435 -[NSObject performSelector:withObject:withObject:] + 52


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	28  UIKit                               0x312779eb -[UIApplication sendAction:to:from:forEvent:] + 62


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	29  UIKit                               0x312779a7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	30  UIKit                               0x31277985 -[UIControl sendAction:to:forEvent:] + 44


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	31  UIKit                               0x312776f5 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 492


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	32  UIKit                               0x31277321 -[UIControl touchesBegan:withEvent:] + 244


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	33  UIKit                               0x31276485 -[UIWindow _sendTouchesForEvent:] + 180


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	34  UIKit                               0x31275f01 -[UIWindow sendEvent:] + 380


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	35  UIKit                               0x3125c4ed -[UIApplication sendEvent:] + 356


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	36  UIKit                               0x3125bd2d _UIApplicationHandleEvent + 5808


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	37  GraphicsServices                    0x37081e13 PurpleEventCallback + 882


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	38  CoreFoundation                      0x3516b553 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	39  CoreFoundation                      0x3516b4f5 __CFRunLoopDoSource1 + 140


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	40  CoreFoundation                      0x3516a343 __CFRunLoopRun + 1370

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	41  CoreFoundation                      0x350ed4dd CFRunLoopRunSpecific + 300

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	42  CoreFoundation                      0x350ed3a5 CFRunLoopRunInMode + 104

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	43  GraphicsServices                    0x37080fed GSEventRunModal + 156

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	44  UIKit                               0x3128a743 UIApplicationMain + 1090

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	45  LinqCrash                           0x000320f4 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 240

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	46  LinqCrash                           0x00049720 methods + 368

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	47  LinqCrash                           0x00153050 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	48  LinqCrash                           0x001dbaf8 mono_jit_runtime_invoke + 2892

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	49  LinqCrash                           0x002d4fbc mono_runtime_invoke + 200

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	50  LinqCrash                           0x002d80e4 mono_runtime_exec_main + 836

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	51  LinqCrash                           0x002d70e4 mono_runtime_run_main + 968

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	52  LinqCrash                           0x001e2ba8 mono_jit_exec + 244

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	53  LinqCrash                           0x001d5e24 main + 3880

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: 	54  LinqCrash                           0x00002534 start + 52

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: =================================================================


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: Got a SIGABRT while executing native code. This usually indicates


Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: a fatal error in the mono runtime or one of the native libraries

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: used by your application.

Nov  7 23:14:18 Neptune UIKitApplication:linqcrash[0x950f][30614] <Notice>: =================================================================


Nov  7 23:14:19 Neptune ReportCrash[30615] <Notice>: Formulating crash report for process LinqCrash[30614]


Nov  7 23:14:19 Neptune com.apple.launchd[1] (UIKitApplication:linqcrash[0x950f][30614]) <Warning>: (UIKitApplication:linqcrash[0x950f]) Job appears to have crashed: Abort trap: 6


Nov  7 23:14:19 Neptune SpringBoard[65] <Warning>: Application 'LinqCrash' exited abnormally with signal 6: Abort trap: 6
Comment 2 Sebastien Pouliot 2011-11-24 09:34:16 UTC
This occurs at line 73 of /Developer/MonoTouch/Source/mono/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStartNode.cs


		public override void Visit (INodeVisitor visitor)
		{
			visitor.Visit<T> (this);
		}

Interface/generic call. The method is public but the type is internal.

Added as regression test in MonoTouch (currently [Ignored]).
Comment 3 Rodrigo Kumpera 2011-11-24 15:17:33 UTC
Working on it.
Comment 4 Rodrigo Kumpera 2011-11-24 18:07:41 UTC
Pushed 9bf28d24472ee4c31a22741ce74f274c60dbd927 to trunk. I'll do a device test tomorrow.
Comment 5 Sebastien Pouliot 2012-03-11 12:01:13 UTC
Still not working (it's part of the test suite).
Comment 6 Sebastien Pouliot 2012-09-13 11:34:52 UTC
Jeremie works on master fixed this.