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.
In recent mono releases, running mono with MONO_ENABLE_SHM=1 environment variable does not seems to enable shared memory anymore.
Issue noticed in mono 4.2.2 and 4.2.3.
The following program runs fine on Microsoft .NET in Windows (first process waits on semaphore and prints "Signaled!" when waits again, the second just signals semaphore and exit), but on Mono in Linux even with MONO_ENABLE_SHM both processes wait indefinitely.
Program code to test issue:
const string name = "MySystemSemaphoreObject_123hx5bwX7";
public static void Main (string  args)
if (!Semaphore.TryOpenExisting (name, out semaphore))
semaphore = new Semaphore (0, 1, name);
while (semaphore.WaitOne ())
Console.WriteLine ("Semaphore exists, signal it.");
$ MONO_ENABLE_SHM=1 mono ShmBug.exe
Linux mylaptop 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) x86_64 GNU/Linux
Mono version (installed from Xamarin Debian repository):
Mono JIT compiler version 4.2.3 (Stable 22.214.171.124/832de4b Wed Mar 16 13:19:08 UTC 2016)
This functionality was removed as the implementation was very complicated and error prone on unix.
Sad news. I think this should be announced in mono release notes (couldn't find anything about that).
It is now documented in the 4.4 release notes: