I have install a new ubuntu server 18.04 and I have also run a update and a upgrade. I did follow this guide to install the latest mono https://www.mono-project.com/download/stable/#download-lin and I also did pick mono-complete to make sure I got Everything.

but when I try to compile the basic "Hello World" I get error.


40f6c000-40f7c000 rwxp 00000000 00:00 0
4198b000-419ab000 rwxp 00000000 00:00 0
5599439d0000-559943e19000 r-xp 00000000 fd:00 28394                      /usr/bin/mono-sgen
559944018000-55994401f000 r--p 00448000 fd:00 28394                      /usr/bin/mono-sgen
55994401f000-559944024000 rw-p 0044f000 fd:00 28394                      /usr/bin/mono-sgen
559944024000-5599440b5000 rw-p 00000000 00:00 0
559944da8000-5599450dd000 rw-p 00000000 00:00 0                          [heap]
7f335360c000-7f3353dc2000 r-xp 00000000 fd:00 28889                      /usr/lib/mono/aot-cache/amd64/Microsoft.CodeAnalysis.CSharp.dll.so
7f3353dc2000-7f3353fc2000 ---p 007b6000 fd:00 28889                      /usr/lib/mono/aot-cache/amd64/Microsoft.CodeAnalysis.CSharp.dll.so
7f3353fc2000-7f3353fc3000 r--p 007b6000 fd:00 28889                      /usr/lib/mono/aot-cache/amd64/Microsoft.CodeAnalysis.CSharp.dll.so
7f3353fc3000-7f3353fc4000 rw-p 007b7000 fd:00 28889                      /usr/lib/mono/aot-cache/amd64/Microsoft.CodeAnalysis.CSharp.dll.so
7f3353fc4000-7f3354000000 rw-p 00000000 00:00 0
7f3354000000-7f3354021000 rw-p 00000000 00:00 0
7f3354021000-7f3358000000 ---p 00000000 00:00 0
7f33584f1000-7f33584f3000 r--p 00000000 fd:00 80822                      /usr/lib/mono/4.5/Facades/System.Globalization.dll
7f33584f3000-7f33584f5000 r--p 00000000 fd:00 80907                      /usr/lib/mono/4.5/Facades/System.Text.Encoding.dll
7f33584f5000-7f33584f7000 r--p 00000000 fd:00 80891                      /usr/lib/mono/4.5/Facades/System.Security.Cryptography.Primitives.dll
7f33584f7000-7f33584f9000 r--p 00000000 fd:00 80865                      /usr/lib/mono/4.5/Facades/System.Resources.ResourceManager.dll
7f33584f9000-7f3358571000 rw-p 00000000 00:00 0
7f3358571000-7f33589e8000 r--p 00000000 fd:00 78322                      /usr/lib/mono/4.5/Microsoft.CodeAnalysis.CSharp.dll
7f33589e8000-7f3358a06000 r--p 00000000 fd:00 28769                      /usr/lib/mono/gac/System.Numerics/
7f3358a06000-7f3358d0e000 r--p 00000000 fd:00 28780                      /usr/lib/mono/gac/System.Xml/
7f3358d0e000-7f3358d30000 r--p 00000000 fd:00 77532                      /usr/lib/mono/gac/System.Xml.Linq/
7f3358d30000-7f3358dbc000 r-xp 00000000 fd:00 28892                      /usr/lib/mono/aot-cache/amd64/System.Collections.Immutable.dll.so
7f3358dbc000-7f3358fbb000 ---p 0008c000 fd:00 28892                      /usr/lib/mono/aot-cache/amd64/System.Collections.Immutable.dll.so
Memory around native instruction pointer (0x7f3353b4d00e):
0x7f3353b4cffe  48 85 c9 0f 84 09 04 00 00 0f b6 89 88 00 00 00  H...............
0x7f3353b4d00e  66 0f 38 32 40 06 66 0f 38 00 05 c3 4b 27 00 44  [email protected]'.D
0x7f3353b4d01e  0f b6 40 05 49 c1 e0 28 0f b6 70 04 48 c1 e6 20  [email protected]..(..p.H..
0x7f3353b4d02e  0f b6 78 03 48 c1 e7 18 0f b6 58 02 48 c1 e3 10  ..x.H.....X.H...

Native stacktrace:

        /usr/bin/mono(+0x129f8d) [0x559943af9f8d]
        /usr/bin/mono(+0x12a295) [0x559943afa295]
        /usr/bin/mono(+0xbfd2f) [0x559943a8fd2f]
        /usr/bin/mono(+0x414e8) [0x559943a114e8]
        /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890) [0x7f3360e94890]
        /usr/lib/mono/aot-cache/amd64/Microsoft.CodeAnalysis.CSharp.dll.so(+0x54100e) [0x7f3353b4d00e]
Pkilling 0x7f335a28f700 from 0x7f3361a63780
Entering thread summarizer pause from 0x7f3361a63780
Finished thread summarizer pause from 0x7f3361a63780.

Waiting for dumping threads to resume

Debug info from gdb:

mono_gdb_render_native_backtraces not supported on this platform, unable to find gdb or lldb

Got a SIGILL while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.

I did run same thing yesterday but then I did use Another computer and did use Xubuntu so does it need a graphic interface??

/UPDATE When I did try with the nightly version of Mono I get no error for "Hello World" script.

  • Did you bring any binary from your Xubuntu to the server? The crash happens upon executing a unsupported instruction, as if you tried to run a binary that was initially built on another computer.
    – Hi-Angel
    Jan 2, 2019 at 17:19
  • Thanks for the replay but no. I did not move any files from Xubuntu,
    – Cazz
    Jan 2, 2019 at 19:31
  • Call me naive but it looks like you are using a x86-64-linux-gnu lib, and later on using an amd64 binary. I'm not 100% sure Intel binaries and AMD64 binaries contain the same instructions. Care to share uname -a Jan 2, 2019 at 19:39
  • @ChrisSullivan AMD64 and x86-64 are kind of synonymous. So, though the crash happens on SIGILL, but it's not that.
    – Hi-Angel
    Jan 2, 2019 at 19:53
  • here it is "Linux weathersrv 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux"
    – Cazz
    Jan 2, 2019 at 20:01

1 Answer 1


It looks like your memory was corrupted on this line:

Memory around native instruction pointer (0x7f3353b4d00e):

And the Native Stack Trace shows that referencing the same memory address on this line:

/usr/lib/mono/aot-cache/amd64/Microsoft.CodeAnalysis.CSharp.dll.so(+0x54100e) [0x7f3353b4d00e]

Meaning that it may be an issue with that lib. I looked into the directory and the lib in question is actually named /usr/lib/mono/aot-cache/amd64/mscorlib.dll.so.

Doing objdump -p /usr/lib/mono/aot-cache/amd64/mscorlib.dll.so | grep NEEDED didn't list any dependencies that I could see so I'm doubtful your installation did not fully complete.

So, testing a simple program in terminal can rule out any issues with regards to the mono installation.

Please try the following:

using System;
namespace HelloWorld
    class Hello 
        static void Main() 
            Console.WriteLine("Hello World!");
            Console.WriteLine("Press any key to exit.");

Create the above file and call it hello.cs Then in terminal do this:

mcs -out:hello.exe hello.cs

Then run:

mono hello.exe

If your output is then:

Hello World!
Press any key to exit.

You know that it is not a problem with the mono dependencies or installation but one regarding other binaries on your machine. Probably the libthread.so So to ensure you have those local libraries ...

Since you have mentioned you are using an Ubuntu Server version (a stripped down version) you might need to pull in any gcc/g++ binaries.

sudo apt install build-essential
  • Same error. I try now with install Xubuntu to see if that is somthing with the Ubuntu Server installation.
    – Cazz
    Jan 2, 2019 at 20:36
  • Try the last solution there by installing (build-essentials) packages.ubuntu.com/xenial/build-essential, I think Ubuntu Server is a stripped down version of the every day Ubuntu LTS. Jan 2, 2019 at 20:45
  • It Always have it
    – Cazz
    Jan 2, 2019 at 21:03
  • docker run -it ubuntu:bionic gcc -v gives me the output executable file not found in $PATH" Jan 2, 2019 at 21:16
  • 1
    I Think I got it to work when I use the Nightly version??
    – Cazz
    Jan 2, 2019 at 23:53

Not the answer you're looking for? Browse other questions tagged .