Bug 28586 - Docker Hub fails compiling mono with monolite since corlib version 114
Summary: Docker Hub fails compiling mono with monolite since corlib version 114
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-31 08:28 UTC by debuglevel
Modified: 2015-04-29 17:25 UTC (History)
4 users (show)

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


Attachments
Dockerfile used to build mono (1.51 KB, application/octet-stream)
2015-03-31 08:28 UTC, debuglevel
Details


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 debuglevel 2015-03-31 08:28:09 UTC
I recently tried to compile mono with the Docker Hub service (https://hub.docker.com)
Unfortunately, the monolite basic.exe crashes on their system since corlib 114 (commit 519ddb9895af5639de5ba0361af54a8d585c4070). Corlib 113 works fine there (commit dfebf124e54e11ef4de85addffd8d9df102e859b). So something between the 113 and 114 commit broke the monolite binary on their system.

I also tried to compile the same Dockerfile on my local machine (Windows 7, boot2docker 1.5) and everything worked fine. So this bug could be a very tricky one.


Log output of 'make EXTERNAL_MCS="${PWD}/mcs/class/lib/monolite/basic.exe"'


*** Trying the 'monolite' directory.
* Assertion at tramp-amd64.c:1115, condition `code - buf <= tramp_size' not met
Stacktrace:

  at <unknown> <0xffffffff>
  at System.Console..cctor () <0x00127>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at <unknown> <0xffffffff>
  at Mono.CSharp.Driver.Main (string[]) <0x00071>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	/local/mono-compile/mono/mono/mini/mono() [0x4b4fe8]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340) [0x2b256ba9e340]
	/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39) [0x2b256bce2cc9]
	/lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x2b256bce60d8]
	/local/mono-compile/mono/mono/mini/mono() [0x627119]
	/local/mono-compile/mono/mono/mini/mono() [0x62731f]
	/local/mono-compile/mono/mono/mini/mono() [0x627466]
	/local/mono-compile/mono/mono/mini/mono() [0x50e677]
	/local/mono-compile/mono/mono/mini/mono() [0x4b7da9]
	/local/mono-compile/mono/mono/mini/mono() [0x424665]
	/local/mono-compile/mono/mono/mini/mono() [0x500504]
	/local/mono-compile/mono/mono/mini/mono() [0x425246]
	/local/mono-compile/mono/mono/mini/mono() [0x426e67]
	/local/mono-compile/mono/mono/mini/mono() [0x429efd]
	/local/mono-compile/mono/mono/mini/mono() [0x42a8cb]
	/local/mono-compile/mono/mono/mini/mono() [0x4b5fb7]
	[0x419b4166]

Debug info from gdb:


=================================================================
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.
=================================================================

Aborted (core dumped)
Comment 1 debuglevel 2015-03-31 08:28:41 UTC
Created attachment 10576 [details]
Dockerfile used to build mono
Comment 2 Marek Safar 2015-03-31 10:07:40 UTC
Please try to run it without setting EXTERNAL_MCS
Comment 3 debuglevel 2015-03-31 10:46:09 UTC
I just tried compiling without EXTERNAL_MCS set. Therefore, I installed current mono-devel from Xamarin's debian Repository to provide a mono runtime during compiling:


MCS     [build] mscorlib.dll
* Assertion at tramp-amd64.c:1115, condition `code - buf <= tramp_size' not met

Stacktrace:

  at <unknown> <0xffffffff>
  at System.Text.EncodingHelper.GetDefaultEncoding () <0x000df>
  at System.Text.Encoding.CreateDefaultEncoding () <0x00010>
  at System.Text.Encoding.get_Default () <0x0001d>
  at System.Console..cctor () <0x00191>
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
  at <unknown> <0xffffffff>
  at Mono.CSharp.Driver.Main (string[]) <0x00071>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	/local/mono-compile/mono/mono/mini/mono(mono_handle_native_sigsegv+0xcc) [0x4cfcac]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0xf0a0) [0x2ad4ed9e40a0]
	/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x2ad4edc23165]
	/lib/x86_64-linux-gnu/libc.so.6(abort+0x180) [0x2ad4edc263e0]
	/local/mono-compile/mono/mono/mini/mono() [0x65be69]
	/local/mono-compile/mono/mono/mini/mono(monoeg_g_logv+0x47) [0x65c077]
	/local/mono-compile/mono/mono/mini/mono(monoeg_assertion_message+0x96) [0x65c1c6]
	/local/mono-compile/mono/mono/mini/mono() [0x528a0d]
	/local/mono-compile/mono/mono/mini/mono(mono_create_monitor_enter_v4_trampoline+0x79) [0x4d40b9]
	/local/mono-compile/mono/mono/mini/mono(mono_resolve_patch_target+0x609) [0x455d49]
	/local/mono-compile/mono/mono/mini/mono(mono_arch_patch_code+0x94) [0x51df84]
	/local/mono-compile/mono/mono/mini/mono(mono_codegen+0x369) [0x52d849]
	/local/mono-compile/mono/mono/mini/mono(mini_method_compile+0x8bf) [0x52f90f]
	/local/mono-compile/mono/mono/mini/mono(mono_jit_compile_method_inner+0x17d) [0x530c8d]
	/local/mono-compile/mono/mono/mini/mono() [0x4565cc]
	/local/mono-compile/mono/mono/mini/mono(mono_jit_compile_method+0x2b) [0x456beb]
	/local/mono-compile/mono/mono/mini/mono() [0x4d21ce]
	[0x40750166]
Comment 4 Zoltan Varga 2015-03-31 18:36:24 UTC
Should be fixed in mono master acdcee6a43f762edcd3cd295cd4225d8c2b949d1.
Comment 5 debuglevel 2015-04-01 05:43:02 UTC
Lightning fast fix, thank you!
I just compiled mono on the Docker Hub machine and it works like a charm.
Comment 6 AceBear 2015-04-28 15:30:34 UTC
I got a similar error while start a mvc5 website in the mono 4.0.1(nginx fast-cgi opensuse13)
Hope the commit acdcee6... could be included in next release quickly.

-----
 * Assertion at tramp-amd64.c:1115, condition `code - buf <= tramp_size' not met

Stacktrace:

  at <unknown> <0xffffffff>
  at System.Globalization.CultureInfo.get_NumberFormat () <0x00053>
  at System.Globalization.CultureInfo.GetFormat (System.Type) <0x0003b>
  at System.Globalization.NumberFormatInfo.GetInstance (System.IFormatProvider) <0x0002f>
  at uint.ToString (string,System.IFormatProvider) <0x00025>
  at string.FormatHelper (System.Text.StringBuilder,System.IFormatProvider,string,object[]) <0x00567>
  at string.Format (System.IFormatProvider,string,object[]) <0x00026>
  at Mono.WebServer.Log.Logger.Write (Mono.WebServer.Log.LogLevel,System.IFormatProvider,string,object[]) <0x00030>
  at Mono.WebServer.Log.Logger.Write (Mono.WebServer.Log.LogLevel,string,object[]) <0x0003c>
  at Mono.WebServer.Platform.LogIdentity () <0x00195>
  at Mono.WebServer.Platform.SetIdentity (uint,uint) <0x0004f>
  at Mono.WebServer.FastCgi.Server.Main (string[]) <0x0008b>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        /usr/bin/mono() [0x4b8d92]
        /lib64/libpthread.so.0(+0xf9f0) [0x7ffabd8a19f0]
        /lib64/libc.so.6(gsignal+0x39) [0x7ffabd3024c9]
        /lib64/libc.so.6(abort+0x148) [0x7ffabd303958]
        /usr/bin/mono() [0x634db9]
        /usr/bin/mono() [0x63502c]
        /usr/bin/mono() [0x6351c3]
        /usr/bin/mono() [0x515da2]
        /usr/bin/mono() [0x4bbdd2]
        /usr/bin/mono() [0x424d15]
        /usr/bin/mono() [0x4ad3d9]
        /usr/bin/mono() [0x4b9645]
        [0x4116bfa6]
Comment 7 Zoltan Varga 2015-04-29 17:25:47 UTC
This will be fixed in an upcoming mono 4.0 service release.