1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-30 16:51:41 +00:00
freebsd/lib/libthr
Attilio Rao b13c5f2883 rwlock implemented from libthr need to fall through the 'hard path' and
query umtx also if the shared waiters bit is set on a shared lock.
The writer starvation avoidance technique, infact, can lead to shared
waiters on a shared lock which can bring to a missed wakeup and thus
to a deadlock if the right bit is not checked (a notable case is the
writers counterpart to be handled through expired timeouts).

Fix that by checking for the shared waiters bit also when unlocking the
shared locks.

That bug was causing a reported MySQL deadlock.
Many thanks go to Nick Esborn and his employer DesertNet which provided
time and machines to identify and fix this issue.

PR:		thread/135673
Reported by:	Nick Esborn <nick at desert dot net>
Tested by:	Nick Esborn <nick at desert dot net>
Reviewed by:	jeff
2009-09-23 21:38:57 +00:00
..
arch Commit missing mips libthr support that I thought I'd committed earlier 2008-05-11 05:54:52 +00:00
support Use thr_new syscall to create a new thread, obscure context operations 2005-04-23 02:48:59 +00:00
sys __error could be called too early before libthr is initialized, test 2006-07-12 03:44:05 +00:00
thread rwlock implemented from libthr need to fall through the 'hard path' and 2009-09-23 21:38:57 +00:00
libthr.3 - Stop calling libthr alternative as it's now the default 2007-10-22 10:13:38 +00:00
Makefile Turn on nodelete linker flag because libthr can not be unloaded safely, 2009-03-31 02:50:18 +00:00
pthread.map Make pthread_cleanup_push() and pthread_cleanup_pop() as a pair of macros, 2008-06-09 01:14:10 +00:00