Bug 29008 - mono randomly crashes since linux 3.16.0-31-generic
Summary: mono randomly crashes since linux 3.16.0-31-generic
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: GC ()
Version: 3.12.0
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-04-11 17:39 UTC by computerzerstoerer
Modified: 2015-04-28 15:09 UTC (History)
4 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 FIXED

Description computerzerstoerer 2015-04-11 17:39:59 UTC
Backstory:

Several weeks ago, I wanted to try ASP.NET vNext on Linux. I tested on VirtualBox and bhyve (on two entirely different host machines), with Ubuntu 12.04, 14.04 and 14.10, both inside and outside of docker. The "dnu/kpm restore" would always crash with really weird errors: Inexplicable exceptions everywhere around the TLS stack (featuring null reference exceptions in Monitor.TryEnter), again and again, up to the big crescendo in which the entire mono runtime blows up in a segfault.

Today, I ran another attempt but to no avail. Once again, "dnu restore" failed in this strange way. A friend however succeeded without problems, so I started investigating and the culprit seems to be mono's sgen GC. While everything works flawlessly on kernel version 3.16.0-30-generic, dnu crashes on 3.16.0-31-generic (the same installation, everything unchanged, just booting a different kernel). However, it can be fixed by compiling mono with the boehm GC instead of sgen.

kernel \ mono gc	sgen	boehm
3.16.0-30-generic	☑	☐ (not tested)
3.16.0-31-generic	☒	☑

A collection of my finest dnu crashes: https://gist.github.com/main--/dd7d8f81654789a977d9
Today's testing was run on a fully updated Ubuntu trusty. Mono 3.12.1, the sgen one from the APT repo and the boehm one self-compiled.
Comment 1 Zoltan Varga 2015-04-11 17:43:46 UTC
Using the upcoming mono 4.0 release might fix some of these problems.
Comment 2 Alexander Kyte 2015-04-20 17:00:13 UTC
If you could provide your dnu version and the config you're trying to restore, I can look whether your problem persists on the newest mono release.
Comment 3 computerzerstoerer 2015-04-21 13:23:56 UTC
I was unable to reproduce the issue with the mono 4 alpha 1 tarball.
Comment 4 computerzerstoerer 2015-04-28 15:09:42 UTC
Fixed in mono 4.