Bug 42302 - Intermittent sgen crashes for Xamarin iOS 9.8.0.323 and above
Summary: Intermittent sgen crashes for Xamarin iOS 9.8.0.323 and above
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: Mono runtime / AOT compiler ()
Version: XI 9.8 (tvOS / C7)
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Future Cycle (TBD)
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2016-07-01 07:36 UTC by aed
Modified: 2016-10-23 22:38 UTC (History)
5 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 NORESPONSE

Description aed 2016-07-01 07:36:12 UTC
Hi - we are getting occasional sgen crashes starting in Xamarin iOS 9.8/Mono 4.4.1.

I have verified that reverting to 9.6 doesn't result in crashes.

The crashes are all of a format like the following, but _they are not identical_. All of them crash at various points but the common line in the crash reports is that they invoke sgen_perform_collection. Also, calling GC.Collect() explicitly tends to increase the crash frequency.

Our project only uses the standard SDKs and Xamarin Forms. Are these a known issue?


2016-06-26 12:05:13.662 MyApp.iOS[2664:1092590] critical: 	0   MyApp.iOS                          0x00000001001d487c mono_handle_native_sigsegv + 260
2016-06-26 12:05:13.662 MyApp.iOS[2664:1092590] critical: 	1   MyApp.iOS                          0x00000001001df4b8 mono_sigsegv_signal_handler + 336
2016-06-26 12:05:13.662 MyApp.iOS[2664:1092590] critical: 	2   libsystem_platform.dylib            0x00000001826f994c _sigtramp + 68
2016-06-26 12:05:13.663 MyApp.iOS[2664:1092590] critical: 	3   MyApp.iOS                          0x0000000100294af8 drain_gray_stack + 1692
2016-06-26 12:05:13.663 MyApp.iOS[2664:1092590] critical: 	4   MyApp.iOS                          0x0000000100294af8 drain_gray_stack + 1692
2016-06-26 12:05:13.663 MyApp.iOS[2664:1092590] critical: 	5   MyApp.iOS                          0x000000010028c3b4 finish_gray_stack + 100
2016-06-26 12:05:13.663 MyApp.iOS[2664:1092590] critical: 	6   MyApp.iOS                          0x000000010028ba7c major_finish_collection + 136
2016-06-26 12:05:13.663 MyApp.iOS[2664:1092590] critical: 	7   MyApp.iOS                          0x0000000100289330 major_do_collection + 108
2016-06-26 12:05:13.663 MyApp.iOS[2664:1092590] critical: 	8   MyApp.iOS                          0x0000000100288848 sgen_perform_collection + 544
2016-06-26 12:05:13.664 MyApp.iOS[2664:1092590] critical: 	9   MyApp.iOS                          0x000000010027f890 sgen_alloc_obj_nolock + 752
2016-06-26 12:05:13.664 MyApp.iOS[2664:1092590] critical: 	10  MyApp.iOS                          0x0000000100263ff0 mono_gc_alloc_vector + 140
2016-06-26 12:05:13.664 MyApp.iOS[2664:1092590] critical: 	11  MyApp.iOS                          0x0000000100251818 mono_array_new_specific + 96
2016-06-26 12:05:13.664 MyApp.iOS[2664:1092590] critical: 	12  MyApp.iOS                          0x0000000100216334 ves_icall_System_ValueType_Equals + 648
2016-06-26 12:05:13.664 MyApp.iOS[2664:1092590] critical: 	13  MyApp.iOS                          0x00000001005e9c70 wrapper_managed_to_native_System_ValueType_InternalEquals_object_object_object___ + 112
2016-06-26 12:05:13.665 MyApp.iOS[2664:1092590] critical: 	14  MyApp.iOS                          0x00000001005e9dac System_ValueType_DefaultEquals_object_object + 220
2016-06-26 12:05:13.665 MyApp.iOS[2664:1092590] critical: 	15  MyApp.iOS                          0x00000001005e9ebc System_ValueType_Equals_object + 28
2016-06-26 12:05:13.665 MyApp.iOS[2664:1092590] critical: 	16  MyApp.iOS                          0x000000010148ce58 System_Collections_Generic_ObjectEqualityComparer_1_Xamarin_Forms_Platform_iOS_FontExtensions_ToUIFontKey_Equals_Xamarin_Forms_Platform_iOS_FontExtensions_ToUIFontKey_Xamarin_Forms_Platform_iOS_FontExtensions_ToUIFontKey + 408
2016-06-26 12:05:13.665 MyApp.iOS[2664:1092590] critical: 	17  MyApp.iOS                          0x0000000101478690 System_Collections_Generic_Dictionary_2_Xamarin_Forms_Platform_iOS_FontExtensions_ToUIFontKey_UIKit_UIFont_FindEntry_Xamarin_Forms_Platform_iOS_FontExtensions_ToUIFontKey + 800
2016-06-26 12:05:13.665 MyApp.iOS[2664:1092590] critical: 	18  MyApp.iOS                          0x000000010146c6c0 System_Collections_Generic_Dictionary_2_Xamarin_Forms_Platform_iOS_FontExtensions_ToUIFontKey_UIKit_UIFont_TryGetValue_Xamarin_Forms_Platform_iOS_FontExtensions_ToUIFontKey_UIKit_UIFont_ + 160
2016-06-26 12:05:13.666 MyApp.iOS[2664:1092590] critical: 	19  MyApp.iOS                          0x000000010138f2ec Xamarin_Forms_Platform_iOS_FontExtensions_ToUIFont_string_single_Xamarin_Forms_FontAttributes + 396
2016-06-26 12:05:13.666 MyApp.iOS[2664:1092590] critical: 	20  MyApp.iOS                          0x000000010138e4f8 Xamarin_Forms_Platform_iOS_FontExtensions_ToUIFont_Xamarin_Forms_Label + 488
2016-06-26 12:05:13.666 MyApp.iOS[2664:1092590] critical: 	21  MyApp.iOS                          0x000000010139863c Xamarin_Forms_Platform_iOS_LabelRenderer_UpdateText + 972
Comment 1 Rodrigo Kumpera 2016-07-01 15:52:35 UTC
Hi,

Could you provide a test application that demonstrate the crash?
Comment 2 aed 2016-07-02 01:05:35 UTC
Currently it reproes with my full app stack but I cannot share the code. I can maybe get an intermittent repro on a smaller version but it will take a long time. Have you had any other reports of this?
Comment 3 Rodrigo Kumpera 2016-07-11 15:02:35 UTC
We have other reports, but none with a test case, our hands are tied here.
Comment 4 Vincent Dondain [MSFT] 2016-08-17 16:16:32 UTC
Hi,

@aed did you find any way to give us a repro case?

Without one we're pretty much stuck and won't be really helpful.

May I suggest that you try more recent versions of the products (alpha) and let us know if the issue still shows up?
Comment 5 aed 2016-08-19 18:14:57 UTC
Crashes still repro up to 9.8.2. I will try 9.99 today.
Comment 6 aed 2016-08-19 18:40:19 UTC
It still reproes on 9.99.

I am willing to get a repro case but since it will take at least a day of work, I need a strong commitment from the Xamarin team that you will actually do something with it immediately, and not let it sit for weeks.

Here is the stack on 9.99:


2016-08-19 11:27:44.772 MyApp.iOS[1019:445307] critical: 	0   MyApp.iOS                          0x0000000100174890 mono_handle_native_sigsegv + 260
2016-08-19 11:27:44.772 MyApp.iOS[1019:445307] critical: 	1   MyApp.iOS                          0x000000010017f4cc mono_sigsegv_signal_handler + 336
2016-08-19 11:27:44.772 MyApp.iOS[1019:445307] critical: 	2   libsystem_platform.dylib            0x000000018325994c _sigtramp + 68
2016-08-19 11:27:44.773 MyApp.iOS[1019:445307] critical: 	3   MyApp.iOS                          0x0000000100234b0c drain_gray_stack + 1692
2016-08-19 11:27:44.773 MyApp.iOS[1019:445307] critical: 	4   MyApp.iOS                          0x0000000100234b0c drain_gray_stack + 1692
2016-08-19 11:27:44.773 MyApp.iOS[1019:445307] critical: 	5   MyApp.iOS                          0x000000010022c3c8 finish_gray_stack + 100
2016-08-19 11:27:44.773 MyApp.iOS[1019:445307] critical: 	6   MyApp.iOS                          0x000000010022ba90 major_finish_collection + 136
2016-08-19 11:27:44.773 MyApp.iOS[1019:445307] critical: 	7   MyApp.iOS                          0x0000000100229344 major_do_collection + 108
2016-08-19 11:27:44.773 MyApp.iOS[1019:445307] critical: 	8   MyApp.iOS                          0x000000010022885c sgen_perform_collection + 544
2016-08-19 11:27:44.773 MyApp.iOS[1019:445307] critical: 	9   MyApp.iOS                          0x000000010022f618 sgen_los_alloc_large_inner + 108
Comment 7 Rodrigo Kumpera 2016-08-19 21:11:59 UTC
Hi,

We're highly motivated to work on GC crashes if they have a repro. It would be awesome if you could help us with this one. :)

What we're looking in such a repro is how reliable and simple is to crash the runtime. The size or complexity of the application doesn't matter much.
Comment 8 Manuel de la Peña [MSFT] 2016-09-15 10:08:38 UTC
Hello Aed,

Will you be able to provide the repro case?
Comment 9 aed 2016-09-16 05:57:27 UTC
Yes. I tried last week but it was too complicated to get a minimum repro. However I will try again next week since I am stuck on 9.6 otherwise.
Comment 10 Alex Soto [MSFT] 2016-10-23 22:38:21 UTC
Hello Aed,

We have not received the requested information. If you are still 
experiencing this issue please provide all the requested information 
and re-open the bug report. Thanks!