Bug 36214

Summary: UnixSignal.WaitAny can SIGPIPE under load
Product: [Mono] Runtime Reporter: Andi McClure <andi.mcclure>
Component: GeneralAssignee: Andi McClure <andi.mcclure>
Severity: normal CC: mono-bugs+mono, mono-bugs+runtime
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: UnixSignal.WaitAny standalone test program

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