Bug 37634 - [llvm]* Assertion at mini-runtime.c:1435, condition `mono_threads_is_coop_enabled ()' not met
Summary: [llvm]* Assertion at mini-runtime.c:1435, condition `mono_threads_is_coop_ena...
Status: RESOLVED INVALID
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-01-12 22:41 UTC by pr0vieh
Modified: 2017-08-28 15:04 UTC (History)
3 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 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 INVALID

Description pr0vieh 2016-01-12 22:41:23 UTC
@Master
@Linux 64bit

configure --with-llvm=/llvm --enable-llvm=yes

then use --aot -O=all --llvm

at startup cause * Assertion at mini-runtime.c:1435, condition `mono_threads_is_coop_enabled ()' not met
Comment 1 pr0vieh 2016-01-12 23:10:16 UTC
With --with-cooperative-gc=yes it works

it coop now needed for llvm ?
I just thought for llvmonly
Comment 2 Alex Rønne Petersen 2016-01-13 07:22:28 UTC
I can't reproduce this on current master. What I did:

> $ cat > llvm-aot-test.cs << EOF
> >class Program {
> >        static void Main () {
> >                try {
> >                        for (var i = 0; i < 5; i++)
> >                                System.Console.WriteLine (i);
> >                } catch (System.Exception) {
> >                }
> >        }
> >}
> >EOF
> $ mcs llvm-aot-test.cs
> $ mono --aot --llvm -O=all llvm-aot-test.exe
> Mono Ahead of Time compiler - compiling assembly /home/alexrp/Projects/tests/llvm-aot-test.exe
> Executing opt: "opt" -f  -o "temp.opt.bc" "temp.bc"
> Executing llc: "llc"  -march=x86-64 -mattr=sse4.1 -asm-verbose=false -disable-gnu-eh-frame -enable-mono-eh-frame -mono-eh-frame-symbol=mono_aot_llvm_aot_test_eh_frame -relocation-model=pic -filetype=obj -o "temp-llvm.o" "temp.opt.bc"
> Code: 0(0%) Info: 8(1%) Ex Info: 27(3%) Unwind Info: 0(0%) Class Info: 22(3%) PLT: 30(4%) GOT Info: 464(66%) Offsets: 146(20%) GOT: 136
> Compiled: 4/4 (100%), LLVM: 4 (100%), No GOT slots: 4 (100%), Direct calls: 0 (100%)
> Executing the native assembler: "as" --64  -o /tmp/alexrp/mono_aot_Le8sV9.o /tmp/alexrp/mono_aot_Le8sV9
> Executing the native linker: "ld"  -shared -o /home/alexrp/Projects/tests/llvm-aot-test.exe.so.tmp "temp-llvm.o" /tmp/alexrp/mono_aot_Le8sV9.o
> JIT time: 0 ms, Generation time: 18 ms, Assembly+Link time: 7 ms.
> $ mono --llvm llvm-aot-test.exe
> 0
> 1
> 2
> 3
> 4

Executing the AOT'd program without `--llvm` works fine too.

Mono version:

> $ mono --version
> Mono JIT compiler version 4.3.3 (master/1f91441 ons jan 13 08:05:26 CET 2016)
> Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
>         TLS:           __thread
>         SIGSEGV:       altstack
>         Notifications: epoll
>         Architecture:  amd64
>         Disabled:      none
>         Misc:          softdebug
>         LLVM:          yes(3.6.0svn-mono-master/9f79399)
>         GC:            sgen

Perhaps you can give a test case that reproduces the problem?
Comment 3 pr0vieh 2016-01-13 16:07:56 UTC
i use this
for i in $monoprefix/lib/mono/gac/*/*/*.dll; do mono --aot -O=all --llvm $i; done

and set this env options
export MONO_ENV_OPTIONS="--llvm --optimize=all"
Comment 4 pr0vieh 2016-01-13 19:38:22 UTC
oh damn my fault

export MONO_ENABLE_COOP="yes"
was set at aot-compiler run in my build script

aot files setup != runtime setup

this can closed sry