[Bug 198014] Signals can lead to an inconsistency in PI mutex ownership

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Feb 25 14:22:41 UTC 2015


--- Comment #10 from eric at vangyzen.net ---
I considered this, but I'm indecisive.  The current "userland messed the mutex"
error path compounds the problem by leaving the umutex owned by the current
thread, while libthr already disowned the pthread_mutex.  I wonder if it should
disown the umutex.  This might allow the mutex owner fields to regain
consistency.  On the other hand, maybe we should let it stay inconsistent to
make the failure more permanent; this might prevent the application from
corrupting its state even further.

Regardless, you're right that the empty case should be consistent with the
non-empty case when another thread owns the umtx_pi, since I believe this is
still an error.  Note that the umtx_pi could legitimately be unowned in the
empty case, such as immediately after umtx_pi_alloc.

I'm testing an updated patch now.

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list