Bug 23146 - AbandonedMutexException is not thrown - so the WaitHandle.Wait* methods is broken
Summary: AbandonedMutexException is not thrown - so the WaitHandle.Wait* methods is br...
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: io-layer (show other bugs)
Version: 3.8.0
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-09-18 08:43 UTC by Mike
Modified: 2015-11-17 16:18 UTC (History)
4 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
unit test patch (1.15 KB, patch)
2015-11-17 16:18 UTC, Vincent Povirk
Details | Diff

Description Mike 2014-09-18 08:43:43 UTC
MSDN sample that executes a thread that abandons five mutexes is not working on mono - it simply hangs in infinite wait.
The reproduction is an example from
http://msdn.microsoft.com/en-us/library/system.threading.abandonedmutexexception(v=vs.110).aspx

The issue is 100% reproducible on latest mono master (3.10.x) running
on ubuntu server 14.04 and also on
=== Xamarin Studio ===
Version 5.4 (build 239)
Installation UUID: 4693647f-46e0-4046-b430-f4f086d7fd6f
Runtime:
    Mono 3.8.0 ((no/45d0ba1)
    GTK+ 2.24.23 (Raleigh theme)
    Package version: 308000009
=== Build Information ===
Release ID: 504000239
Git revision: 338110385bb89c5774e89ffcb15d8f2039e7fbcd
Build date: 2014-09-16 12:25:53-04
Xamarin addins: 05241f5ab70cf79388a0f113bc6877780ed1024a
=== Operating System ===
Mac OS X 10.10.0
Darwin 14.0.0 Darwin Kernel Version 14.0.0
Comment 1 Vincent Povirk 2015-11-17 16:18:52 UTC
Created attachment 13846 [details]
unit test patch

Mono has a test for this situation which fails on Windows, in MonoTests.System.Threading.MutexTest. Here's a diff that changes it to expect the Windows behavior (and thus passes on Windows and fails in Mono).

Note You need to log in before you can comment on or make changes to this bug.