From owner-cvs-src-old@FreeBSD.ORG Wed Sep 23 21:39:09 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F80C106579D for ; Wed, 23 Sep 2009 21:39:09 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3548E8FC17 for ; Wed, 23 Sep 2009 21:39:07 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n8NLd7qS005893 for ; Wed, 23 Sep 2009 21:39:07 GMT (envelope-from attilio@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n8NLd7ss005892 for cvs-src-old@freebsd.org; Wed, 23 Sep 2009 21:39:07 GMT (envelope-from attilio@repoman.freebsd.org) Message-Id: <200909232139.n8NLd7ss005892@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to attilio@repoman.freebsd.org using -f From: Attilio Rao Date: Wed, 23 Sep 2009 21:38:57 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libthr/thread thr_umtx.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2009 21:39:09 -0000 attilio 2009-09-23 21:38:57 UTC FreeBSD src repository Modified files: lib/libthr/thread thr_umtx.h Log: SVN rev 197445 on 2009-09-23 21:38:57Z by attilio 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 Tested by: Nick Esborn Reviewed by: jeff Revision Changes Path 1.15 +5 -2 src/lib/libthr/thread/thr_umtx.h