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.
static void Main(string args)
Queue<Thread> threads = new Queue<Thread>();
Random random = new Random();
for (int threadNum = 0; threadNum < 10; ++threadNum)
Thread thread = new Thread(new ParameterizedThreadStart(delegate(object o)
for (int processNum = 0; processNum < 100; ++processNum)
string processName = o + "-" + processNum;
using (Process p = new Process())
p.StartInfo.FileName = "/bin/sleep";
p.StartInfo.Arguments = ((float)(random.NextDouble() * 2)).ToString();
Console.Out.WriteLine("Starting " + processName);
Console.Out.WriteLine("Started " + processName);
List<string> data = new List<string>();
for (int i = 0; i < 100000; ++i)
data.Add("asdfasdfadfasdfasdfasdfasdfasf" + i);
Console.Out.WriteLine("Finished " + processName);
throw new Exception();
Console.Out.WriteLine("Waiting for threads");
while (threads.Count > 0)
Here's what I had to do to produce the deadlock:
1) Compile with "gmcs Program.cs"
2) Run with "mono Program.exe"
3) If the deadlock does not happen in a second or two, hit CTRL+C and restart. It might take a few tries, but I haven't had to try more than 10 times or so.
Here are my specs:
Mono JIT compiler version 3.2.0 (tarball Sat Jul 27 11:48:35 EDT 2013)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
LLVM: supported, not enabled.
OS: Xubuntu 12.04
Hello. I've tried to run your program and can tell that your issue is somehow simular to this one: https://bugzilla.xamarin.com/show_bug.cgi?id=13933
1) I can't reproduce your problem with Mono 2.10.8
2) I can't reproduce your problem if I run your program under debugger (MonoDevelop or a dummy one connected manually via --debugger-agent)
3) I can reproduce your problem with Mono 3.0.6, Mono 3.2 and Mono 3.3
I, too, have been unable to get the program listed above to lock up using 2.10.8 (compiled from source). However, it locks up regularly using 3.2.0 (as I described above).
This appears to have been fixed with the work done to resolve the following bug:
Since that commit I haven't been able to reproduce this particular hang. Feel free to mark as resolved and I'll post back if the hang creeps up again.