Bug 36214 - UnixSignal.WaitAny can SIGPIPE under load
Summary: UnixSignal.WaitAny can SIGPIPE under load
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Andi McClure
Depends on:
Reported: 2015-11-24 14:10 UTC by Andi McClure
Modified: 2015-12-03 20:18 UTC (History)
2 users (show)

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

UnixSignal.WaitAny standalone test program (3.45 KB, application/octet-stream)
2015-11-24 14:10 UTC, Andi McClure

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description Andi McClure 2015-11-24 14:10:46 UTC
Created attachment 13975 [details]
UnixSignal.WaitAny standalone test program

The attached test program, when run indefinitely, often crashes with SIGPIPE. This is because of a race condition where the caller of UnixSignal.WaitAny can close the communication pipe while the underlying signal handler is writing to it. Theoretically this could impact MonoTests.Mono.Unix.UnixSignalTest.TestWaitAny but I have not yet seen this happen in testing.

I have a fix which addresses this with a spinlock, it is in review.
Comment 1 Andi McClure 2015-12-03 20:18:19 UTC
Resolved as of bca3964c8 in master