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 4617 [details]
Output when running "thread apply all bt" in gdb.
I have bisected this issue to being introduced between ef805b5^^..ef805b5.
Steps to reproduce:
1. Use relatively recent mono master (after the switch to sgen as default)
2. Use a relatively recent MonoDevelop master (needs CodeIssue batch runner to reproduce easily. At least 573246a1d3)
3. Open the Code Issue pad (View > Pads > Code Issues)
4. Click Run.
5. MD hangs, usually within a couple of seconds if not sooner.
At this point, kill -quit $MD_PID does not print a stack trace, only a listing of threads (of which most are interrupted). The soft debugger cannot debug this probably because of that.
I'm running this on 64bit Fedora 18.
Current MD master behaves poorly wrt thread usage when batch running CodeIssues. It creates lots and lots of threads. Environment.ProcessorCount ^ 2 threads at a time, with a total of FileCount * Environment.ProcessorCount + Environment.ProcessorCount threads per run. I have a local fix for that which only creates as many threads as there are cpu cores total and at a time and with that the problem is much harder to reproduce. Might be a clue to what is going on, what do I know ;)
Try setting the MONO_ENV_OPTIONS env variable to '-O=-aot' as a workaround.
-O=-aot seems to work as a workaround.
My local fix to create a smaller number of threads does not seem to have a significant effect on these hangs after all. Perhaps because I ran MD in the (soft) debugger. The soft debugger changes the behavior in that mono might crash before it hangs, or it can still hang, but the process usually survives longer before something happens.
Created attachment 4622 [details]
Output when running "thread apply all bt" in gdb. Fewer threads this time.
Added a fix/workaround in a31b580fdcbaa9a8a16d59ffb12d04f5872f54e8. Could you try it out ?
I cannot reproduce the hang with that change. Yay!
*** Bug 13933 has been marked as a duplicate of this bug. ***
Can this be backported to 3-2?
The next Mono 3.2 will come out of master.
We are done with maintaining branches for 3 years :-)
Oh, that's not what someone (I think it was Rodrigo) said in #monodev recently I think. Anyway, Zoltan actually backported it shortly after I asked :) -> https://github.com/mono/mono/commit/fe1fe75fbdd79537a2915b5ebf9262df7a0645f6
*** Bug 17605 has been marked as a duplicate of this bug. ***