Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 24406 [details]
Output from Mono SIGSEGV
Here's the version info from Mono:
Mono JIT compiler version 22.214.171.124 (2017-06/6425f06 Fri Jul 28 13:28:44 EDT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
GC: sgen (concurrent by default)
1. Download the Microsoft.NET.Compilers package, version 2.3.1 from NuGet. (https://www.nuget.org/packages/Microsoft.Net.Compilers/2.3.1)
2. AOT compile Microsoft.CodeAnalysis.CSharp.dll (mono --aot ~/.nuget/packages/microsoft.net.compilers/2.3.1/tools/Microsoft.CodeAnalysis.CSharp.dll)
3. Attempt to gather a profile of csc compiling any C# file (even HelloWorld).
Mono SIGSEGVs with the output attached.
This is quite odd as we run same setup for Mono itself
I don't think we run the log profiler for any parts of the build.
Which command are you running to gather the profile?
I have tried the following commands without reproducing the crash:
> wget -O microsoft.net.compilers.2.3.1.nupkg https://www.nuget.org/api/v2/package/Microsoft.Net.Compilers/2.3.1
> unzip microsoft.net.compilers.2.3.1.nupkg
> mono --aot tools/Microsoft.CodeAnalysis.CSharp.dll
> mono --profile=log tools/csc.exe helloworld.cs
The mono version is:
> Mono JIT compiler version 126.96.36.199 (2017-06/6425f06 Fri Jul 28 13:28:44 EDT 2017)
> Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-> project.com
> TLS: normal
> SIGSEGV: altstack
> Notification: kqueue
> Architecture: amd64
> Disabled: none
> Misc: softdebug
> LLVM: yes(3.6.0svn-mono-master/8b1520c)
> GC: sgen (concurrent by default)
I don't think it reproduces with 5.4. I was able to reproduce it with master on Linux. Will be taking a look.
The problem is that we end up trying to access fields on the current domain, but since the profiler's writer thread is a tools thread, mono_domain_get () returns NULL.
We could try fixing this by setting a domain for tools threads.
Moving this to GitHub issues: https://github.com/mono/mono/issues/6188