Bug 41998 - SIGABRTCrash in log_adapter
Summary: SIGABRTCrash in log_adapter
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: iOS
Classification: Xamarin
Component: Mono runtime / AOT compiler ()
Version: XI 9.6 (iOS 9.3)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Zoltan Varga
URL:
: 41997 ()
Depends on:
Blocks:
 
Reported: 2016-06-20 15:07 UTC by Yong
Modified: 2017-02-07 18:55 UTC (History)
8 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 NOT_REPRODUCIBLE

Description Yong 2016-06-20 15:07:35 UTC
0 libsystem_kernel.dylib null
1 libsystem_c.dylib null
2 RunwayHD log_callback() (in 95631202edb633d2879f22d15ce2812b) + 80
3 RunwayHD log_adapter (in 95631202edb633d2879f22d15ce2812b) + 159
4 RunwayHD monoeg_g_log (in 95631202edb633d2879f22d15ce2812b) + 83
5 RunwayHD alloc_obj (in 95631202edb633d2879f22d15ce2812b) + 119
6 RunwayHD copy_object_no_checks (in 95631202edb633d2879f22d15ce2812b) + 79
7 RunwayHD simple_nursery_serial_scan_object (in 95631202edb633d2879f22d15ce2812b) + 1563
8 RunwayHD collect_nursery (in 95631202edb633d2879f22d15ce2812b) + 839
9 RunwayHD sgen_perform_collection (in 95631202edb633d2879f22d15ce2812b) + 847
10 RunwayHD sgen_alloc_obj_nolock (in 95631202edb633d2879f22d15ce2812b) + 623
11 RunwayHD sgen_alloc_obj (in 95631202edb633d2879f22d15ce2812b) + 111
12 RunwayHD mono_gc_alloc_obj (in 95631202edb633d2879f22d15ce2812b) + 9
13 RunwayHD mono_object_new (in 95631202edb633d2879f22d15ce2812b) + 27
14 RunwayHD ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type (in 95631202edb633d2879f22d15ce2812b) + 69
15 RunwayHD wrapper_managed_to_native_System_Runtime_InteropServices_Marshal_PtrToStructure_intptr_System_Type (in 95631202edb633d2879f22d15ce2812b) + 100
16 RunwayHD AirboxiOSDataAccess_Airbox_IO_ValueTypeHelper_BufferToStruct_AAL_Freedom_DataAccess_Airspace_AirspaceDefinition_byte___int (in 95631202edb633d2879f22d15ce2812b) + 60
17 RunwayHD AirboxiOSDataAccess_Airbox_IO_ValueTypeHelper_ReadStructFromStream_AAL_Freedom_DataAccess_Airspace_AirspaceDefinition_System_IO_Stream (in 95631202edb633d2879f22d15ce2812b) + 100
18 RunwayHD AirboxiOSDataAccess_Airbox_Vector_Internal_StructEntityReader_1_AAL_Freedom_DataAccess_Airspace_AirspaceDefinition_ReadEntity_System_IO_Stream (in 95631202edb633d2879f22d15ce2812b) + 64
19 RunwayHD AirboxiOSDataAccess_Airbox_Vector_Domain_VectorEntityReader_1_AAL_Freedom_DataAccess_Airspace_AirspaceDefinition_ReadEntities_System_IO_Stream_int_AAL_Freedom_DataAccess_Airspace_AirspaceDefinition__ (in 95631202edb633d2879f22d15ce2812b) + 80
20 RunwayHD AirboxiOSDataAccess_Airbox_Vector_Internal_VectorArchiveReader_1_AAL_Freedom_DataAccess_Airspace_AirspaceDefinition_GetShapes_Airbox_Vector_Structure_VectorNode_AAL_Freedom_DataAccess_Airspace_AirspaceDefinition__ (in 95631202edb633d2879f22d15ce2812b) + 180
21 RunwayHD Airbox_Vector_Internal_TileLoader_1_AAL_Freedom_DataAccess_Airspace_AirspaceDefinition_LoadDataDontCache_System_Collections_Generic_ICollection_1_Airbox_Vector_Domain_VectorWrapper_1_AAL_Freedom_DataAccess_Airspace_AirspaceDefinition_Airbox_Vector_Structure_VectorNode_AAL_Freedom_Drawing_RectangleF_Airbox_Vector_VectorFilters_1_AAL_Freedom_DataAccess_Airspace_AirspaceDefinition (in 95631202edb633d2879f22d15ce2812b) + 284
22 RunwayHD Airbox_Vector_VectorService_1_AAL_Freedom_DataAccess_Airspace_AirspaceDefinition_GetDataAroundPoint_Airbox_Vector_VectorFilters_1_AAL_Freedom_DataAccess_Airspace_AirspaceDefinition_AAL_Freedom_Domain_Location_AAL_Freedom_Domain_Distance (in 95631202edb633d2879f22d15ce2812b) + 1404
23 RunwayHD AirboxiOSUI_Airbox_iOS_UI_MapManagementViewController_UpdateFromCurrentGpsData (in 95631202edb633d2879f22d15ce2812b) + 4264
24 RunwayHD AirboxiOSUI_Airbox_iOS_UI_MapManagementViewController_LocationChanged_object_Airbox_iOS_MapEngine_LocationChangedEventArgs (in 95631202edb633d2879f22d15ce2812b) + 60
25 RunwayHD AirboxiOSCore_wrapper_delegate_invoke__Module_invoke_void_object_LocationChangedEventArgs_object_Airbox_iOS_MapEngine_LocationChangedEventArgs (in 95631202edb633d2879f22d15ce2812b) + 120
26 RunwayHD AirboxiOSCore_Airbox_iOS_MapEngine_CurrentLocationManager_LocationsUpdated_CoreLocation_CLLocationManager_CoreLocation_CLLocation__ (in 95631202edb633d2879f22d15ce2812b) + 640
27 RunwayHD wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr (in 95631202edb633d2879f22d15ce2812b) + 256
28 RunwayHD mono_jit_runtime_invoke (in 95631202edb633d2879f22d15ce2812b) + 1131
29 RunwayHD mono_runtime_invoke (in 95631202edb633d2879f22d15ce2812b) + 89
30 RunwayHD native_to_managed_trampoline_14() (in 95631202edb633d2879f22d15ce2812b) + 467
31 RunwayHD -[Airbox_iOS_MapEngine_CurrentLocationManager locationManager:didUpdateLocations:] (in 95631202edb633d2879f22d15ce2812b) + 101
32 CoreLocation null
33 CoreLocation null
34 CoreLocation null
35 CoreFoundation null
36 CoreFoundation null
37 CoreFoundation null
38 CoreFoundation null
39 CoreFoundation null
40 GraphicsServices null
41 UIKit null
42 RunwayHD (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (in 95631202edb633d2879f22d15ce2812b) + 272
43 RunwayHD Xamarin_iOS_UIKit_UIApplication_Main_string___string_string (in 95631202edb633d2879f22d15ce2812b) + 160
44 RunwayHD RunwayHD_AirboxiOS_Application_Main_string__ (in 95631202edb633d2879f22d15ce2812b) + 148
45 RunwayHD wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr (in 95631202edb633d2879f22d15ce2812b) + 256
46 RunwayHD mono_jit_runtime_invoke (in 95631202edb633d2879f22d15ce2812b) + 1131
47 RunwayHD mono_runtime_invoke (in 95631202edb633d2879f22d15ce2812b) + 89
48 RunwayHD mono_runtime_exec_main (in 95631202edb633d2879f22d15ce2812b) + 285
49 RunwayHD xamarin_main (in 95631202edb633d2879f22d15ce2812b) + 1672
50 RunwayHD main (in 95631202edb633d2879f22d15ce2812b) + 113
51 libdyld.dylib null
Comment 1 Vincent Dondain [MSFT] 2016-06-21 15:11:13 UTC
Please include your full build logs, test case (to reproduce) and all version informations.

The easiest way to get exact version information is to use the 
"Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" 
button and copy/paste the version informations (you can use the 
"Copy Information" button).
Comment 2 Yong 2016-06-21 16:05:39 UTC
Hi,
This crash is reported in Xamarin insights from live users, it is very difficult to reproduce.
can you give a rough guess where the problem might be?

thanks
Yong
Comment 3 Sebastien Pouliot 2016-06-28 17:58:18 UTC
*** Bug 41997 has been marked as a duplicate of this bug. ***
Comment 4 Sebastien Pouliot 2016-06-28 18:03:03 UTC
> can you give a rough guess where the problem might be?

Without additional details* my best guess it that it's an out-of-memory condition. 

* what is being logged (in the device logs) by `monoeg_g_log` is not available to us.

From your insight data you might be able to see on which type of device this happens and see if they are low-memory devices (e.g. 512MB vs 1+ GB).
Comment 5 Yong 2016-06-29 07:47:21 UTC
it is 
iPad Mini 4 (v5,2)
iOS 9.3.2

it has 2GB of memory, unlikely to be memory issue?

this happens roughly once a day, however I cannot confidently reproduce it on demand for debugging!

thanks very much.

Yong
Comment 6 aed 2016-06-30 23:12:00 UTC
@Yong, @Sebastian,

I have a consistent repro of this but it requires my entire app stack, but I can repro it on my phone. Are there any logs I can share with you to facilitate this?

I also get about 40 crashes from it in Insights every day.

It started happening when I updated to Mono 4.4.1 And Xamarin.iOS
Version: 9.8.1.4 (Xamarin Studio 6). It wasn't happening before. I am unable to roll back because that upgrade fixed a different crash.

To me, the pattern I see is that sgen_perform_collection is crashing. I checked the total memory usage and it is around 10MB - 20MB, and I'm not getting memory warnings. I can even trigger the crash under circumstances by having a button that only calls GC.Collect().

Most of my stack traces look like the above but I have a few variants. Here is a variant from today:

2016-06-30 15:50:49.055 MyApp.iOS[4087:1682431] critical: 	0   MyApp.iOS                          0x000000010015887c mono_handle_native_sigsegv + 260
2016-06-30 15:50:49.055 MyApp.iOS[4087:1682431] critical: 	1   MyApp.iOS                          0x00000001001634b8 mono_sigsegv_signal_handler + 336
2016-06-30 15:50:49.055 MyApp.iOS[4087:1682431] critical: 	2   libsystem_platform.dylib            0x00000001826f994c _sigtramp + 68
2016-06-30 15:50:49.055 MyApp.iOS[4087:1682431] critical: 	3   MyApp.iOS                          0x0000000100218af8 drain_gray_stack + 1692
2016-06-30 15:50:49.056 MyApp.iOS[4087:1682431] critical: 	4   MyApp.iOS                          0x0000000100218af8 drain_gray_stack + 1692
2016-06-30 15:50:49.056 MyApp.iOS[4087:1682431] critical: 	5   MyApp.iOS                          0x00000001002103b4 finish_gray_stack + 100
2016-06-30 15:50:49.056 MyApp.iOS[4087:1682431] critical: 	6   MyApp.iOS                          0x000000010020fa7c major_finish_collection + 136
2016-06-30 15:50:49.056 MyApp.iOS[4087:1682431] critical: 	7   MyApp.iOS                          0x000000010020d330 major_do_collection + 108
2016-06-30 15:50:49.057 MyApp.iOS[4087:1682431] critical: 	8   MyApp.iOS                          0x000000010020c848 sgen_perform_collection + 544
2016-06-30 15:50:49.057 MyApp.iOS[4087:1682431] critical: 	9   MyApp.iOS                          0x0000000100203890 sgen_alloc_obj_nolock + 752
2016-06-30 15:50:49.057 MyApp.iOS[4087:1682431] critical: 	10  MyApp.iOS                          0x0000000100203e04 sgen_alloc_obj + 124
2016-06-30 15:50:49.057 MyApp.iOS[4087:1682431] critical: 	11  MyApp.iOS                          0x00000001001e7574 mono_gc_alloc_obj + 16
2016-06-30 15:50:49.057 MyApp.iOS[4087:1682431] critical: 	12  MyApp.iOS                          0x000000010060a580 wrapper_managed_to_native_object___icall_wrapper_mono_object_new_fast_intptr + 96
2016-06-30 15:50:49.057 MyApp.iOS[4087:1682431] critical: 	13  MyApp.iOS                          0x000000010103db10 Xamarin_Forms_BindableProperty_Create_string_System_Type_System_Type_object_Xamarin_Forms_BindingMode_Xamarin_Forms_BindableProperty_ValidateValueDelegate_Xamarin_Forms_BindableProperty_BindingPropertyChangedDelegate_Xamarin_Forms_BindableProperty_BindingPropertyChangingDelegate_Xamarin_Forms_BindableProperty_CoerceValueDelegate_Xamarin_Forms_BindableProperty_CreateDefaultValueDelegate + 240
2016-06-30 15:50:49.058 MyApp.iOS[4087:1682431] critical: 	14  MyApp.iOS                          0x0000000101172fa4 Xamarin_Forms_VisualElement_MergedStyle_RegisterImplicitStyles + 596
2016-06-30 15:50:49.058 MyApp.iOS[4087:1682431] critical: 	15  MyApp.iOS                          0x0000000101170d0c Xamarin_Forms_VisualElement_MergedStyle__ctor_System_Type_Xamarin_Forms_BindableObject + 316
2016-06-30 15:50:49.058 MyApp.iOS[4087:1682431] critical: 	16  MyApp.iOS                          0x0000000101163cc8 Xamarin_Forms_VisualElement__ctor + 552
2016-06-30 15:50:49.058 MyApp.iOS[4087:1682431] critical: 	17  MyApp.iOS                          0x00000001010882d8 Xamarin_Forms_View__ctor + 184
2016-06-30 15:50:49.058 MyApp.iOS[4087:1682431] critical: 	18  MyApp.iOS                          0x00000001011564e4 Xamarin_Forms_Layout__ctor + 340
2016-06-30 15:50:49.058 MyApp.iOS[4087:1682431] critical: 	19  MyApp.iOS                          0x000000010107f36c Xamarin_Forms_TemplatedView__ctor + 92
2016-06-30 15:50:49.058 MyApp.iOS[4087:1682431] critical: 	20  MyApp.iOS                          0x00000001010e7abc Xamarin_Forms_ContentView__ctor + 92
2016-06-30 15:50:49.058 MyApp.iOS[4087:1682431] critical: 	21  MyApp.iOS                          0x00000001010efd54 Xamarin_Forms_Frame__ctor + 100
Comment 7 Rolf Bjarne Kvinge [MSFT] 2016-07-12 09:58:27 UTC
@Aed, crashes in the garbage collector are notoriously hard to track down, in most cases because the crash occurs long after the state of the process actually broke. This means that we'll need a way to reproduce this ourselves - so would it be possible to get access to your source code somehow?
Comment 8 Vincent Dondain [MSFT] 2016-08-17 16:15:53 UTC
Hi,

@yong, @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. Maybe I suggest that you try more recent versions of the products (alpha) and let us know if the issue still shows up?
Comment 9 Alex Soto [MSFT] 2016-08-22 18:24:49 UTC
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!
Comment 10 Yong 2016-08-23 07:16:33 UTC
sorry, this still happens every day. not easy to reproduce, only happens during real usage of the app.
Comment 11 Rodrigo Kumpera 2017-02-07 18:55:03 UTC
Without repro steps, we can't do much.