Bug 17737 - [[iOS] Linksdk test crash on ios device with master builds
Summary: [[iOS] Linksdk test crash on ios device with master builds
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2014-02-12 19:11 UTC by GouriKumari
Modified: 2014-02-14 13:07 UTC (History)
4 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 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 GouriKumari 2014-02-12 19:11:41 UTC
Steps to reproduce:

Update system to build cd13eac30db73d6577da5781c4b1ef056ba9c558  and to corresponding mono and maccore
Execute linksdk. Tested with Debug mode

Actual Behaviour:
App launch but crashed without executing tests in Debug mode

Test passed in iPhone 5S, 7.0.3 device in Release mode

Build Log: https://gist.github.com/GouriKumari/5648df7d552be4d52a76
Device Crash Log: https://gist.github.com/GouriKumari/45b09e648770c8459d4f

Test Env: 
Xamarin.iOS master build: cd13eac30db73d6577da5781c4b1ef056ba9c558
iPad 6.0.1, iPad 7.0.4, iPhone 5.0.1
Comment 1 Sebastien Pouliot 2014-02-12 20:58:05 UTC
Please provide a symbolicated crash reports.

The device logs can also contains very useful information (e.g. managed stack trace).

Also was the release build done w/LLVM ? or not ?
Comment 2 Sebastien Pouliot 2014-02-13 11:38:02 UTC
Looks like it's sgen related.

@Gouri can you check if you get the same crash (to be sure) and that it works fine when Boehm is used ?

@Mark same as the email thread

Feb 13 11:30:49 Mercure com.apple.debugserver-300.2[5951] <Warning>: Exiting.
Feb 13 11:30:50 Mercure regressions[5953] <Critical>: * Assertion at ../../../../../mono/mono/metadata/sgen-alloc.c:425, condition `*p == NULL' not met
Feb 13 11:30:50 Mercure regressions[5953] <Error>: Stacktrace:
Feb 13 11:30:50 Mercure regressions[5953] <Error>:   at <unknown> <0xffffffff>
Feb 13 11:30:50 Mercure regressions[5953] <Error>:   at (wrapper managed-to-native) string.InternalAllocateStr (int) <0xffffffff>
Feb 13 11:30:50 Mercure regressions[5953] <Error>:   at System.Text.StringBuilder.InternalEnsureCapacity (int) [0x000b1] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Text/StringBuilder.cs:716
Feb 13 11:30:50 Mercure regressions[5953] <Error>:   at System.Text.StringBuilder.Append (string) [0x00082] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Text/StringBuilder.cs:373
Feb 13 11:30:50 Mercure regressions[5953] <Error>:   at System.Exception.ToString () [0x0000c] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System/Exception.cs:320
Feb 13 11:30:50 Mercure regressions[5953] <Error>:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
Feb 13 11:30:50 Mercure regressions[5953] <Error>:   at <unknown> <0xffffffff>
Feb 13 11:30:50 Mercure regressions[5953] <Error>:   at System.Collections.Generic.Dictionary`2<intptr, string>.set_Item (intptr,string) [0x0004e] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:167
Feb 13 11:30:50 Mercure regressions[5953] <Error>:   at MonoTouch.ObjCRuntime.Class.RegisterMap (int,MonoTouch.ObjCRuntime.Runtime/MTClassMap*) [0x0005c] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/.pmcs-compat.Class.cs:46
Feb 13 11:30:50 Mercure regressions[5953] <Error>:   at MonoTouch.ObjCRuntime.Class.Initialize (MonoTouch.ObjCRuntime.Runtime/InitializationOptions&) [0x00012] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/.pmcs-compat.Class.cs:31
Feb 13 11:30:50 Mercure regressions[5953] <Error>:   at MonoTouch.ObjCRuntime.Runtime.Initialize (MonoTouch.ObjCRuntime.Runtime/InitializationOptions&) [0x00092] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/.pmcs-compat.Runtime.cs:113
Feb 13 11:30:50 Mercure regressions[5953] <Error>:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 
	Native stacktrace:
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	0   regressions                         0x010a3db1 mono_handle_native_sigsegv + 260
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	1   regressions                         0x010a8b53 sigabrt_signal_handler + 102
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	2   libsystem_platform.dylib            0x3bdee723 _sigtramp + 42
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	3   libsystem_pthread.dylib             0x3bdf3a53 pthread_kill + 58
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	4   libsystem_c.dylib                   0x3bd3d02d abort + 76
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	5   regressions                         0x0113603b monoeg_assertion_message + 58
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	6   regressions                         0x010f8b87 mono_gc_try_alloc_obj_nolock + 542
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	7   regressions                         0x010f9039 mono_gc_alloc_string + 60
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	8   regressions                         0x010ee281 mono_string_new_size + 76
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	9   regressions                         0x01118341 ves_icall_System_String_InternalAllocateStr + 16
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	10  regressions                         0x002eb658 wrapper_managed_to_native_string_InternalAllocateStr_int + 92
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	11  regressions                         0x0026e300 System_Text_StringBuilder_InternalEnsureCapacity_int + 192
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	12  regressions                         0x0026d94c System_Text_StringBuilder_Append_string + 332
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	13  regressions                         0x002c2c48 System_Exception_ToString + 104
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	14  regressions                         0x00377cac wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	15  regressions                         0x010af0bb mono_jit_runtime_invoke + 1134
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	16  regressions                         0x010ecb65 mono_runtime_invoke + 88
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	17  regressions                         0x01092443 do_invoke_method + 950
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	18  regressions                         0x01091e69 suspend_current + 380
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	19  regressions                         0x010900ad process_event + 4560
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	20  regressions                         0x01090cd5 mono_debugger_agent_handle_exception + 604
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	21  regressions                         0x010a3567 mono_handle_exception_internal + 2034
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	22  regressions                         0x010a2d6f mono_handle_exception + 10
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	23  regressions                         0x0109d78f mono_arm_throw_exception + 102
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	24  regressions                         0x0109d7e1 mono_arm_resume_unwind + 0
Feb 13 11:30:50 Mercure regressions[5953] <Error>: 	25  regressions                         0x003bc8f8 throw_corlib_exception + 64
F
Comment 3 GouriKumari 2014-02-13 12:48:12 UTC
@Gouri can you check if you get the same crash (to be sure) and that it works
fine when Boehm is used ?

I got the same crash when sgen is enabled with monotouch-test and linksdk test.  
Crash Log: https://gist.github.com/GouriKumari/241b32dc5bc925160228 

Since, Linksdk test in Release mode had sgen disabled, test passed without any exception.

Also,  both monotouch-test and linksdk test was throwing a System.IndexoutofRangeException  in Dictionary.cs., when sgen was enabled . 

Screencast: http://screencast.com/t/hz56a6PWr

Test Env:
monotouch-master cd13eac30db73d6577da5781c4b1ef056ba9c558
iPad 7.0.4
Comment 4 Sebastien Pouliot 2014-02-13 13:11:33 UTC
@Gouri, it confirms we're seeing the same issue. thanks!
Comment 5 Sebastien Pouliot 2014-02-14 08:36:19 UTC
[14:03:11]  <vargaz>	 spouliot: try reverting d50c836721f22df74a45185d51d0b9d37c370e33 and b3f36681c72a6900cd5e9df9b593d555b351669f from mono.
[15:13:19]  <spouliot>	 schani: looks like vargaz was right - reverting both revisions makes it work again
[16:11:22]  <vargaz>	 spouliot: will revert it.
Comment 6 Zoltan Varga 2014-02-14 13:07:51 UTC
Reverted in mt cd0323a07ca6846c6ba01f581a9b4763734b4b65.