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 13543 [details]
stacktrace during the hang (console application code has already finished executing)
Running mono 4.0.2 on Linux compute node (40 cores and 128GB RAM). Console application calls Parallel.ForEach. Approximately 1 in every 200 runs of the application will hang. All the work and output from the console application is already generated so it appears all the application code has finished executing. The process just does not exit.
I actually don't know for sure that the call to Parallel.ForEach is the reason for the hang, but it seems the most likely possibility since it is the only part of the code that uses multi-threading.
The stacktrace from gdb is attached. 3 threads are running.
Did you have the chance to try with mono 4.2? If yes, did you hit the same bug (or any other one) ?
This seems like a bug with the previous implementation of the threadpool. Mono 4.2 introduce a new implementation based on the Microsoft one, imported from Microsoft Reference Source.
I haven't tried yet, but I was hoping it would be fixed in 4.2. Thanks for the information about the updated threadpool implementation. I will give it a try and close this out if it is fixed.
No problems when testing with mono 184.108.40.206. This issue appears to be resolved. Thanks!