Bug 36214 - UnixSignal.WaitAny can SIGPIPE under load
Summary: UnixSignal.WaitAny can SIGPIPE under load
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
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)

See Also:
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

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

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