Bug 52186 - * Assertion at ../../../../external/mono/mono/metadata/class.c:4477, condition `cur_slot <= max_vtsize' not met
Summary: * Assertion at ../../../../external/mono/mono/metadata/class.c:4477, conditio...
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: master
Hardware: PC Mac OS
: --- major
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-02-01 14:52 UTC by Marek Safar
Modified: 2017-02-13 13:50 UTC (History)
3 users (show)

Tags: 2017-02
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 GitHub or Developer Community 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 Marek Safar 2017-02-01 14:52:56 UTC
This happens with master XI and master mono

Tool /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch execution started with arguments: --cache /Users/marek/git/temp/my-xam/msbuild/tests/MyActionExtension/obj/iPhone/Debug/mtouch-cache --dev /Users/marek/git/temp/my-xam/msbuild/tests/MyActionExtension/bin/iPhone/Debug/MyActionExtension.appex --executable MyActionExtension --extension --debug --profiling --linksdkonly --sdkroot /Applications/Xcode.app/Contents/Developer --sdk 10.2 --targetver 9.3 --http-message-handler=HttpClientHandler --abi=armv7,arm64 --symbollist /Users/marek/git/temp/my-xam/msbuild/tests/MyActionExtension/obj/iPhone/Debug/mtouch-symbols.list --dsym=no -r /Users/marek/git/temp/my-xam/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll -r /Users/marek/git/temp/my-xam/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Xml.dll -r /Users/marek/git/temp/my-xam/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Core.dll -r /Users/marek/git/temp/my-xam/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll -r /Users/marek/git/temp/my-xam/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll --target-framework Xamarin.iOS,v1.0 /Users/marek/git/temp/my-xam/msbuild/tests/MyActionExtension/bin/iPhone/Debug//MyActionExtension.dll -q 
				Environment variables being passed to the tool:
				AOT Compilation exited with code 134, command:
				MONO_PATH=/Users/marek/git/temp/my-xam/msbuild/tests/MyActionExtension/obj/iPhone/Debug/mtouch-cache/64/Build /Users/marek/git/temp/my-xam/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/bin/arm64-darwin-mono-sgen --debug -O=gsharedvt  --aot=mtriple=arm64-ios,data-outfile=/Users/marek/git/temp/my-xam/msbuild/tests/MyActionExtension/obj/iPhone/Debug/mtouch-cache/Xamarin.iOS.arm64.aotdata,static,asmonly,direct-icalls,full,dwarfdebug,no-direct-calls,outfile=/Users/marek/git/temp/my-xam/msbuild/tests/MyActionExtension/obj/iPhone/Debug/mtouch-cache/Xamarin.iOS.dll.arm64.s "/Users/marek/git/temp/my-xam/msbuild/tests/MyActionExtension/obj/iPhone/Debug/mtouch-cache/64/Build/Xamarin.iOS.dll"
				Mono Ahead of Time compiler - compiling assembly /Users/marek/git/temp/my-xam/msbuild/tests/MyActionExtension/obj/iPhone/Debug/mtouch-cache/64/Build/Xamarin.iOS.dll
				AOTID D1B6C0BC-A7F2-893D-75DF-007019994744
				* Assertion at ../../../../external/mono/mono/metadata/class.c:4477, condition `cur_slot <= max_vtsize' not met
Comment 1 Zoltan Varga 2017-02-02 19:20:05 UTC
This is probably because the mono-master branch is missing dea2dde2595e8d64292c6ab46c61d8be56522994.
Comment 2 Marek Safar 2017-02-10 16:34:47 UTC
It still happens with mono-2017-02 and on wrench builds as well

On my machine I can reproduce as well

* Assertion at ../../../../external/mono/mono/metadata/class.c:4477, condition `cur_slot <= max_vtsize' not met

Stacktrace:


Native stacktrace:

	0   mlaunch                             0x000000010756eff5 mono_handle_native_crash + 277
	1   libsystem_platform.dylib            0x00007fff9a1a152a _sigtramp + 26
	2   ???                                 0x00007fff587978a0 0x0 + 140734677743776
	3   libsystem_c.dylib                   0x00007fff8d1436df abort + 129
	4   mlaunch                             0x0000000107713888 mono_log_write_logfile + 360
	5   mlaunch                             0x0000000107727cf3 monoeg_g_logv + 83
	6   mlaunch                             0x0000000107727f0f monoeg_assertion_message + 143
	7   mlaunch                             0x00000001075c064f mono_class_setup_vtable_general + 7615
	8   mlaunch                             0x00000001075be86b mono_class_setup_vtable_full + 411
	9   mlaunch                             0x00000001075ba3c3 mono_class_init + 1955
	10  mlaunch                             0x00000001075a99d5 create_domain_objects + 485
	11  mlaunch                             0x00000001075a92bd mono_runtime_init_checked + 317
	12  mlaunch                             0x000000010757f1d8 mini_init + 7320
	13  mlaunch                             0x00000001074e3352 mono_main + 5106
	14  mlaunch                             0x0000000107487976 xamarin_main + 1046
	15  mlaunch                             0x0000000107488684 main + 36
	16  libdyld.dylib                       0x00007fff991145ad start + 1
	17  ???                                 0x0000000000000010 0x0 + 16

Debug info from gdb:
Comment 3 Marek Safar 2017-02-10 16:59:52 UTC
Simple mlaunch launch fails with that too

xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/bin/mlaunch
* Assertion at ../../../../external/mono/mono/metadata/class.c:4477, condition `cur_slot <= max_vtsize' not met
Comment 4 Zoltan Varga 2017-02-10 23:25:06 UTC
I can't repro this with mono-master branch of x.io (fd9c428d8f0ca98695741310ea2a2617392789dd), and 2017-02.
Comment 5 Marek Safar 2017-02-11 14:31:12 UTC
Don't use mono-master use mono-2017-02 it has all set up including wrench lane.

e.g. https://wrench.internalx.com/Wrench/ViewLane.aspx?lane_id=4343&host_id=379&revision_id=855762
Comment 6 Zoltan Varga 2017-02-11 18:23:23 UTC
https://github.com/xamarin/xamarin-macios/pull/1685
Comment 7 Zoltan Varga 2017-02-13 13:50:39 UTC
Fixed by xamarin-macios 884c86befd29f9c4029ceadf5e9d524599a444df.