Bug 32955 - Random crash at aot-runtime.c:3144
Summary: Random crash at aot-runtime.c:3144
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Mono runtime / AOT compiler (show other bugs)
Version: XI 8.10
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2015-08-11 07:42 UTC by Fabien Molinet
Modified: 2015-09-04 19:24 UTC (History)
6 users (show)

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


Attachments

Description Fabien Molinet 2015-08-11 07:42:19 UTC
Randomly our iOS app crashes. There is absolutely no reason: even a simple Console.WriteLine can crash.

Please note that this issue is really hard to reproduce and very random so I cannot provide a sample.
This is what happens:
Assertion at ../../../../../mono/mono/mini/aot-runtime.c:3144, condition `(guint8*)addr < (guint8*)jinfo->code_start + jinfo->code_size' not met

Another person as the same issue: https://forums.xamarin.com/discussion/44359/error-assertion-at-mono-mono-mini-aot-runtime-c-condition-not-met
Comment 1 Al Clark [MSFT] 2015-08-12 07:57:16 UTC
Customer's version information:

=== Xamarin Studio ===

Version 5.9.5 (build 9)
Installation UUID: 97ff8928-320a-43b7-9447-02c16d203e8b
Runtime:
	Mono 4.0.3 ((detached/d6946b4)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400030020

=== Apple Developer Tools ===

Xcode 6.3.2 (7718)
Build 6D2105

=== Xamarin.Mac ===

Not Installed

=== Xamarin.iOS ===

Version: 8.10.4.46 (Business Edition)
Hash: 2c66d2f
Branch: master
Build date: 2015-08-04 13:52:25-0400

=== Xamarin.Android ===

Version: 5.1.5.3 (Business Edition)
Android SDK: /Users/molinef/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

=== Xamarin Android Player ===

Not Installed

=== Build Information ===

Release ID: 509050009
Git revision: b99cb19a1d3b15d8980c4616f13f837457e5b292
Build date: 2015-07-28 02:01:44-04
Xamarin addins: d53d6eceb828422f3d4aff8547f2f6bab6c9ea58

=== Operating System ===

Mac OS X 10.10.3
Darwin Fabiens-MBP.home 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
Comment 2 Sebastien Pouliot 2015-08-13 15:28:59 UTC
@Zoltan,  any clue on what condition could trigger this assert ?
Comment 3 Rodrigo Kumpera 2015-08-13 16:36:08 UTC
This looks like a miscompiled AOT image or a runtime bug in the method lookup code.
Comment 4 Boris Spinner 2015-08-14 04:04:30 UTC
One of our app crashes at the same line.

=== Xamarin Studio ===

Version 5.9.5 (build 6)
Installation UUID: b3891de2-50d8-4b3d-bb64-d339ff765c4b
Runtime:
	Mono 4.0.3 ((detached/e4f44c1)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400030019

=== Apple Developer Tools ===

Xcode 6.4 (7720)
Build 6E35b

=== Xamarin.iOS ===

Version: 8.10.4.27 (Business Edition)
Hash: 7cf6633
Branch: master
Build date: 2015-07-21 16:27:35-0400

=== Xamarin.Mac ===

Not Installed

=== Xamarin.Android ===

Version: 5.1.5.3 (Business Edition)
Android SDK: /usr/share/android
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.1    (API level 22)
Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Build Information ===

Release ID: 509050006
Git revision: c50b1022a6b36f9b2a55beb7814b87811d1dba52
Build date: 2015-07-16 18:13:13-04
Xamarin addins: 6571e3228ff9e432a98b468630ec5ffd35f2f6b3

=== Operating System ===

Mac OS X 10.10.4
Darwin carter 14.4.0 Darwin Kernel Version 14.4.0
    Thu May 28 11:35:04 PDT 2015
    root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64
Comment 5 Nick Tindall 2015-09-02 20:58:16 UTC
This is happening for us as well 

Xamarin Studio
Version 5.9.5 (build 10)
Installation UUID: 6d01ad3c-19d4-4dd1-853a-908ce5c5e583
Runtime:
	Mono 4.0.3 ((detached/d6946b4)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400030020

Xamarin.Android
Version: 5.1.5.3 (Enterprise Edition)
Android SDK: /Users/ntindall/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

Xamarin Android Player
Not Installed

Apple Developer Tools
Xcode 6.4 (7720)
Build 6E35b

Xamarin.iOS
Version: 8.10.4.46 (Enterprise Edition)
Hash: 2c66d2f
Branch: master
Build date: 2015-08-04 13:52:25-0400

Xamarin.Mac
Version: 2.0.2.111 (Starter Edition)

Build Information
Release ID: 509050010
Git revision: 48d16bc4f12ce3938964fc7c3d72fdc6887ad4ad
Build date: 2015-08-18 16:55:24-04
Xamarin addins: c2d51b360ad9f59e689046d47030df27de28f94a

Operating System
Mac OS X 10.10.5
Darwin Nicks-Mac-mini.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
Comment 6 Nick Tindall 2015-09-02 21:13:39 UTC
One thing I notice is that it seems to happen more readily in our Debug build than our Release build. In fact I don't think I've witnessed it in a Release build.
Comment 7 Zoltan Varga 2015-09-03 00:03:53 UTC
Does this happen consistently on each startup, or its random ?
Comment 8 Nick Tindall 2015-09-03 00:08:52 UTC
Not consistently on each startup, but I don't think it's random. I'll try and post some stack traces that might help, or try and reproduce it reliably.
Comment 9 Nick Tindall 2015-09-03 02:33:47 UTC
Not sure if it helps, but below is an example:

2015-09-03 16:31:39.652 BimMobileAppiOS[1276:408479] error: * Assertion at ../../../../../mono/mono/mini/aot-runtime.c:3144, condition `(guint8*)addr < (guint8*)jinfo->code_start + jinfo->code_size' not met
2015-09-03 16:31:39.669 BimMobileAppiOS[1276:408479] critical: Stacktrace:

2015-09-03 16:31:39.670 BimMobileAppiOS[1276:408479] critical: 
Native stacktrace:

2015-09-03 16:31:43.403 BimMobileAppiOS[1276:408479] critical: 	0   BimMobileAppiOS                     0x017ca1ff mono_handle_native_sigsegv + 238
2015-09-03 16:31:43.404 BimMobileAppiOS[1276:408479] critical: 	1   BimMobileAppiOS                     0x017ce7b9 sigabrt_signal_handler + 104
2015-09-03 16:31:43.405 BimMobileAppiOS[1276:408479] critical: 	2   libsystem_platform.dylib            0x364a50a3 _sigtramp + 42
2015-09-03 16:31:43.405 BimMobileAppiOS[1276:408479] critical: 	3   libsystem_pthread.dylib             0x364aac8b pthread_kill + 62
2015-09-03 16:31:43.406 BimMobileAppiOS[1276:408479] critical: 	4   libsystem_c.dylib                   0x363c88c1 abort + 76
2015-09-03 16:31:43.407 BimMobileAppiOS[1276:408479] critical: 	5   BimMobileAppiOS                     0x0188d9e4 log_callback + 80
2015-09-03 16:31:43.408 BimMobileAppiOS[1276:408479] critical: 	6   BimMobileAppiOS                     0x01874e73 log_adapter + 170
2015-09-03 16:31:43.408 BimMobileAppiOS[1276:408479] critical: 	7   BimMobileAppiOS                     0x0187f7d1 monoeg_assertion_message + 76
2015-09-03 16:31:43.409 BimMobileAppiOS[1276:408479] critical: 	8   BimMobileAppiOS                     0x017a5dcb mono_aot_find_jit_info + 6734
2015-09-03 16:31:43.410 BimMobileAppiOS[1276:408479] critical: 	9   BimMobileAppiOS                     0x01806dd7 mono_jit_info_table_find_internal + 142
2015-09-03 16:31:43.411 BimMobileAppiOS[1276:408479] critical: 	10  BimMobileAppiOS                     0x01806fa3 mono_jit_info_table_find + 10
2015-09-03 16:31:43.411 BimMobileAppiOS[1276:408479] critical: 	11  BimMobileAppiOS                     0x01877d8d mono_thread_info_safe_suspend_sync + 208
2015-09-03 16:31:43.412 BimMobileAppiOS[1276:408479] critical: 	12  BimMobileAppiOS                     0x017b2c6d notify_thread + 100
2015-09-03 16:31:43.413 BimMobileAppiOS[1276:408479] critical: 	13  BimMobileAppiOS                     0x0181f777 mono_g_hash_table_foreach + 54
2015-09-03 16:31:43.414 BimMobileAppiOS[1276:408479] critical: 	14  BimMobileAppiOS                     0x017b29d5 suspend_vm + 128
2015-09-03 16:31:43.414 BimMobileAppiOS[1276:408479] critical: 	15  BimMobileAppiOS                     0x017afbfd process_event + 2440
2015-09-03 16:31:43.415 BimMobileAppiOS[1276:408479] critical: 	16  BimMobileAppiOS                     0x017adfb3 thread_end + 162
2015-09-03 16:31:43.416 BimMobileAppiOS[1276:408479] critical: 	17  BimMobileAppiOS                     0x0182954f mono_profiler_thread_end + 50
2015-09-03 16:31:43.416 BimMobileAppiOS[1276:408479] critical: 	18  BimMobileAppiOS                     0x01858237 async_invoke_thread + 2114
2015-09-03 16:31:43.417 BimMobileAppiOS[1276:408479] critical: 	19  BimMobileAppiOS                     0x0185ecf1 start_wrapper + 308
2015-09-03 16:31:43.434 BimMobileAppiOS[1276:408479] critical: 	20  BimMobileAppiOS                     0x0187731f inner_start_thread + 158
2015-09-03 16:31:43.435 BimMobileAppiOS[1276:408479] critical: 	21  libsystem_pthread.dylib             0x364a9ddf <redacted> + 138
2015-09-03 16:31:43.436 BimMobileAppiOS[1276:408479] critical: 	22  libsystem_pthread.dylib             0x364a9d53 _pthread_start + 118
2015-09-03 16:31:43.437 BimMobileAppiOS[1276:408479] critical: 	23  libsystem_pthread.dylib             0x364a7afc thread_start + 8
2015-09-03 16:31:43.437 BimMobileAppiOS[1276:408479] critical: 
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
Comment 10 Nick Tindall 2015-09-03 03:28:55 UTC
It seem to happen when the debugger is connected, but not when the debug build is running with no debugger connected.
Comment 11 Zoltan Varga 2015-09-04 18:42:10 UTC
This happens with llvm disabled right ?
Comment 12 Zoltan Varga 2015-09-04 19:24:22 UTC
Fixed by the mono bump in maccore master baaf5c7918f375f509bbf97fef9eaa50f1b5719f/maccore cycle6 276779b57273ff8f2d7f2e9e862be5a5ba4ea28a.
Comment 13 Zoltan Varga 2015-09-04 19:24:38 UTC
-> FIXED.

Note You need to log in before you can comment on or make changes to this bug.