Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Sep 2009 21:38:57 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/lib/libthr/thread thr_umtx.h
Message-ID:  <200909232139.n8NLd7ss005892@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <nick at desert dot net>
  Tested by:      Nick Esborn <nick at desert dot net>
  Reviewed by:    jeff
  
  Revision  Changes    Path
  1.15      +5 -2      src/lib/libthr/thread/thr_umtx.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909232139.n8NLd7ss005892>