Named mutex: Use flock instead of pthread process-shared mutex in some more cases
authorKoundinya Veluri <kouvel@microsoft.com>
Mon, 27 Jun 2016 17:53:28 +0000 (10:53 -0700)
committerKoundinya Veluri <kouvel@microsoft.com>
Tue, 5 Jul 2016 23:10:15 +0000 (16:10 -0700)
commit657e6f7945e11a66839028f2aaad537fd7e2d6a4
tree9e513395a90d13b2643752214fc3502556ef64ee
parent2fed1ff2dfc562cded4905ea69da524867bf2526
Named mutex: Use flock instead of pthread process-shared mutex in some more cases

Workaround for dotnet/coreclr#5456:
- Sometimes, a timed wait operation is not getting released, causing a hang
- Due to the hang, it is not possible to detect this issue with code
- Temporarily disabled the use of pthread process-shared mutexes on ARM/ARM64. File locks will be used instead.

Workaround for dotnet/coreclr#5872:
- On Alpine Linux, a pthread process-shared robust mutex is detecting the case where a process abandons the mutex when it exits while holding the lock, but is putting the mutex into an unrecoverable state (ENOTRECOVERABLE) instead of assigning lock ownership to the next thread that is released from a wait for a lock and notifying of abandonment (EOWNERDEAD).
- Added a test case to detect this issue, to have it use file locks instead

Close dotnet/coreclr#5456

Commit migrated from https://github.com/dotnet/coreclr/commit/f63816767aee67509ac3c61e94ff95d371471493
src/coreclr/src/pal/src/config.h.in
src/coreclr/src/pal/src/configure.cmake
src/coreclr/src/pal/src/include/pal/mutex.hpp
src/coreclr/src/pal/src/synchobj/mutex.cpp