Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[runtime] Fix the --enable-minimal=aot build. #31684

Merged
merged 1 commit into from
Feb 4, 2020

Conversation

vargaz
Copy link
Contributor

@vargaz vargaz commented Feb 3, 2020

@akoeplinger akoeplinger merged commit bc5e7e3 into dotnet:master Feb 4, 2020
@jbatt33
Copy link

jbatt33 commented Feb 4, 2020

Looks like back porting this one fix to the public 6.4 release isn't a good idea, I get all sorts of errors when attempting to compile. Will try just porting just the mono/mini folder and see if I can get a working build.

--I previously commented on the jenkins merge about this, sorry I wasn't sure where the comment

@jbatt33
Copy link

jbatt33 commented Feb 5, 2020

I tried this merge on the latest 6.8 release and I'm getting the same error. I looks like it's having issues with the AOT changes. Any thoughts? I picked up monolite from the jan release.

mkdir -p -- build/deps
Can't find custom attr constructor image: /opt/buildroot/output/build/host-mono-custom/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.dll mtoken: 0x0a00000e due to Could not load file or assembly or one of its dependencies. assembly:netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 type: member:
Can't find custom attr constructor image: /opt/buildroot/output/build/host-mono-custom/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csc.exe mtoken: 0x0a000006 due to Could not load file or assembly or one of its dependencies. assembly:Microsoft.CodeAnalysis, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 type: member:
Can't find custom attr constructor image: /opt/buildroot/output/build/host-mono-custom/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.CSharp.dll mtoken: 0x0a00000f due to Could not load file or assembly or one of its dependencies. assembly:netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 type: member:
Could not load file or assembly or one of its dependencies.
make[8]: *** [build/deps/basic-profile-check.exe] Error 1
*** The runtime 'mono' doesn't appear to be usable.
*** Trying the 'monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051' directory.

  • Assertion: should not be reached at aot-compiler.c:14127

=================================================================
Native Crash Reporting

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.

=================================================================
Native stacktrace:

0x48b550 - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x48b88c - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x4413eb - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x48a951 - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x2acfd13d1cb0 - /lib/x86_64-linux-gnu/libpthread.so.0 : (null)
0x2acfd182b035 - /lib/x86_64-linux-gnu/libc.so.6 : gsignal
0x2acfd182e79b - /lib/x86_64-linux-gnu/libc.so.6 : abort
0x6e07ab - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x6c4a1e - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x6e073d - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x6e0b76 - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : monoeg_assertion_message
0x43bcce - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x4b4eb7 - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x4c34f9 - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x4b4d1c - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x4c34f9 - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x4b4d1c - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x4c34f9 - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x4b4d1c - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x490e16 - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x492b98 - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x42edf9 - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x444d06 - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x4458cf - /opt/buildroot/output/build/host-mono-custom/mono/mini/mono : (null)
0x40f3a387 - Unknown

=================================================================
Telemetry Dumper:

Pkilling 0x2acfd4068700 from 0x2acfd0ad6b40
/opt/buildroot/output/build/host-mono-custom/runtime/etc/../bin/mono-hang-watchdog: 3: exec: /opt/buildroot/output/build/host-mono-custom/tools/mono-hang-watchdog/mono-hang-watchdog: not found
Entering thread summarizer pause from 0x2acfd0ad6b40
Finished thread summarizer pause from 0x2acfd0ad6b40.

Waiting for dumping threads to resume

=================================================================
External Debugger Dump:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x2acfd4068700 (LWP 7208)]
[New Thread 0x2acfd2a00700 (LWP 7207)]
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff92926000
0x00002acfd13d188d in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0
Id Target Id Frame
3 Thread 0x2acfd2a00700 (LWP 7207) "SGen worker" 0x00002acfd13cdd84 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
2 Thread 0x2acfd4068700 (LWP 7208) "Finalizer" 0x00002acfd13cffd0 in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0

  • 1 Thread 0x2acfd0ad6b40 (LWP 7182) "mono" 0x00002acfd13d188d in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0

Thread 3 (Thread 0x2acfd2a00700 (LWP 7207)):
#0 0x00002acfd13cdd84 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00000000006bd003 in mono_os_cond_wait (cond=0xa3da20, mutex=) at ../../mono/utils/mono-os-mutex.h:177
#2 get_work (job=, do_idle=, work_context=, worker_index=0) at sgen-thread-pool.c:165
#3 thread_func (data=) at sgen-thread-pool.c:196
#4 0x00002acfd13c9e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00002acfd18e836d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x2acfd4068700 (LWP 7208)):
#0 0x00002acfd13cffd0 in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000065fe38 in mono_os_sem_wait (flags=MONO_SEM_FLAGS_ALERTABLE, sem=0xa2edc0) at ../../mono/utils/mono-os-semaphore.h:203
#2 mono_coop_sem_wait (flags=MONO_SEM_FLAGS_ALERTABLE, sem=0xa2edc0) at ../../mono/utils/mono-coop-semaphore.h:41
#3 finalizer_thread (unused=) at gc.c:963
#4 0x0000000000616bde in start_wrapper_internal (stack_ptr=, start_info=0x0) at threads.c:1233
#5 start_wrapper (data=0xbb0fe0) at threads.c:1306
#6 0x00002acfd13c9e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7 0x00002acfd18e836d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x2acfd0ad6b40 (LWP 7182)):
#0 0x00002acfd13d188d in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000048b6c4 in dump_native_stacktrace (mctx=0x7fff928753a0, signal=) at mini-posix.c:1084
#2 0x000000000048b88c in mono_dump_native_crash_info (signal=, mctx=0x7fff928753a0, info=) at mini-posix.c:1130
#3 0x00000000004413eb in mono_handle_native_crash (signal=0x6f969d "SIGABRT", mctx=0x7fff928753a0, info=0x7fff92875670) at mini-exceptions.c:3425
#4 0x000000000048a951 in sigabrt_signal_handler (_info=0x7fff92875670, context=, _dummy=) at mini-posix.c:235
#5
#6 0x00002acfd182b035 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#7 0x00002acfd182e79b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x00000000006e07ab in monoeg_assert_abort () at goutput.c:57
#9 0x00000000006c4a1e in mono_log_write_logfile (log_domain=, level=, hdr=, message=0xc64420 "* Assertion: should not be reached at aot-compiler.c:14127\n") at mono-log-common.c:136
#10 0x00000000006e073d in monoeg_g_logstr (msg=, log_level=G_LOG_LEVEL_ERROR, log_domain=0x0) at goutput.c:134
#11 monoeg_g_logv_nofree (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=, args=) at goutput.c:149
#12 0x00000000006e0b76 in monoeg_assertion_message (format=) at goutput.c:184
#13 0x000000000043bcce in mono_aot_direct_icalls_enabled_for_method (cfg=, method=) at aot-compiler.c:14127
#14 0x00000000004b4eb7 in direct_icalls_enabled (method=0xc61748, cfg=0xbe9400) at method-to-ir.c:2177
#15 direct_icalls_enabled (method=0xc61748, cfg=0xbe9400) at method-to-ir.c:12636
#16 mono_method_to_ir (cfg=0xbe9400, method=0xc61510, start_bblock=0xc62c38, end_bblock=0xc62d78, return_var=0xc62790, inline_args=, inline_offset=47, is_virtual_call=0) at method-to-ir.c:7146
#17 0x00000000004c34f9 in inline_method (cfg=0xbe9400, cmethod=0xc61510, fsig=, sp=0xc62748, ip=0x2acfd3a5c5f5 "(\226U", real_offset=47, inline_always=0) at method-to-ir.c:4569
#18 0x00000000004b4d1c in mono_method_to_ir (cfg=0xbe9400, method=0xc614e8, start_bblock=0xc621e8, end_bblock=0xc62328, return_var=0xc62198, inline_args=, inline_offset=47, is_virtual_call=0) at method-to-ir.c:7529
#19 0x00000000004c34f9 in inline_method (cfg=0xbe9400, cmethod=0xc614e8, fsig=, sp=0xc5dc58, ip=0x2acfd3b206ee "(\355\027", real_offset=47, inline_always=0) at method-to-ir.c:4569
#20 0x00000000004b4d1c in mono_method_to_ir (cfg=0xbe9400, method=0xc614c0, start_bblock=0xc5d6f8, end_bblock=0xc5d838, return_var=0xc5d6a8, inline_args=, inline_offset=47, is_virtual_call=0) at method-to-ir.c:7529
#21 0x00000000004c34f9 in inline_method (cfg=0xbe9400, cmethod=0xc614c0, fsig=, sp=0xbe5b80, ip=0x2acfd0ac65eb "(F", real_offset=47, inline_always=0) at method-to-ir.c:4569
#22 0x00000000004b4d1c in mono_method_to_ir (cfg=0xbe9400, method=0xc57fd8, start_bblock=0xbe53d8, end_bblock=0xbe5518, return_var=0x0, inline_args=, inline_offset=0, is_virtual_call=0) at method-to-ir.c:7529
#23 0x0000000000490e16 in mini_method_compile (method=, opts=374434303, domain=0xb7aa30, flags=JIT_FLAG_RUN_CCTORS, parts=0, aot_method_index=-1) at mini.c:3446
#24 0x0000000000492b98 in mono_jit_compile_method_inner (method=0xc57fd8, target_domain=0xb7aa30, opt=374434303, error=0x7fff92877860) at mini.c:4039
#25 0x000000000042edf9 in mono_jit_compile_method_with_opt (method=0xc57fd8, opt=374434303, jit_only=, error=0x7fff92877860) at mini-runtime.c:2444
#26 0x0000000000444d06 in common_call_trampoline (regs=0x7fff92877918, code=0x410904bc "H\203\304\b\303\350:\235\352\377\004\330", <incomplete sequence \305>, m=0xc57fd8, vt=0x0, vtable_slot=, error=0x7fff92877860) at mini-trampolines.c:635
#27 0x00000000004458cf in mono_magic_trampoline (regs=0x7fff92877918, code=0x410904bc "H\203\304\b\303\350:\235\352\377\004\330", <incomplete sequence \305>, arg=0xc57fd8, tramp=) at mini-trampolines.c:773
#28 0x0000000040f3a387 in ?? ()
#29 0x0000000000bbdcb5 in ?? ()
#30 0x0000000040f3a3b1 in ?? ()
#31 0x00007fff92877ae0 in ?? ()
#32 0x00007fff92877918 in ?? ()
#33 0x0000000000bcbf00 in ?? ()
#34 0x0000000000000000 in ?? ()

=================================================================
Basic Fault Address Reporting

Memory around native instruction pointer (0x2acfd182b035):0x2acfd182b025 48 63 d7 48 63 f6 48 63 f8 b8 ea 00 00 00 0f 05 Hc.Hc.Hc........
0x2acfd182b035 48 3d 00 f0 ff ff 77 12 f3 c3 90 85 c0 7f e1 a9 H=....w.........
0x2acfd182b045 ff ff ff 7f 74 15 f7 d8 eb d6 48 8b 15 ca 0d 38 ....t.....H....8
0x2acfd182b055 00 f7 d8 64 89 02 48 83 c8 ff c3 89 f0 eb c1 90 ...d..H.........

=================================================================
Managed Stacktrace:

at <unknown> <0xffffffff>
at Microsoft.CodeAnalysis.CSharp.CommandLine.Program:MainCore <0x0006b>
at Microsoft.CodeAnalysis.CSharp.CommandLine.Program:Main <0x0002f>
at <Module>:runtime_invoke_int_object <0x00085>

=================================================================
Aborted (core dumped)
make[10]: *** [build/deps/basic-profile-check.exe] Error 134
*** The contents of your 'monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051' directory may be out-of-date

@jbatt33
Copy link

jbatt33 commented Feb 5, 2020

This is the output of the same part of the build with AOT enabled and it is able to continue building.

mkdir -p -- build/deps
Can't find custom attr constructor image: /opt/buildroot/output/build/host-mono-custom/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.dll mtoken: 0x0a00000e due to Could not load file or assembly or one of its dependencies. assembly:netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 type: member:
Can't find custom attr constructor image: /opt/buildroot/output/build/host-mono-custom/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csc.exe mtoken: 0x0a000006 due to Could not load file or assembly or one of its dependencies. assembly:Microsoft.CodeAnalysis, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 type: member:
Can't find custom attr constructor image: /opt/buildroot/output/build/host-mono-custom/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/Microsoft.CodeAnalysis.CSharp.dll mtoken: 0x0a00000f due to Could not load file or assembly or one of its dependencies. assembly:netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 type: member:
Could not load file or assembly or one of its dependencies.
make[8]: *** [build/deps/basic-profile-check.exe] Error 1
*** The runtime 'mono' doesn't appear to be usable.
*** Trying the 'monolite-linux/ABB721D6-116A-4555-B4FD-9248146D2051' directory.
Microsoft (R) Visual C# Compiler version 3.5.0-beta1-19606-04 (d2bd58c6)
Copyright (C) Microsoft Corporation. All rights reserved.

fatal: Not a git repository (or any parent up to mount parent /opt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount parent /opt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount parent /opt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount parent /opt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
mkdir -p -- ../../class/lib/build-linux/tmp/
CSC [build-linux] gensources.exe

@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failure to build with AOT disabled
4 participants