Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Aug 2016 16:36:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-threads@FreeBSD.org
Subject:   [Bug 211947] bconsole won't die sitting on do_rw_wrlock
Message-ID:  <bug-211947-16-vK3Is20tCK@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-211947-16@https.bugs.freebsd.org/bugzilla/>
References:  <bug-211947-16@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211947

--- Comment #7 from commit-hook@freebsd.org ---
A commit references this bug:

Author: kib
Date: Thu Aug 25 16:35:42 UTC 2016
New revision: 304808
URL: https://svnweb.freebsd.org/changeset/base/304808

Log:
  Prevent leak of URWLOCK_READ_WAITERS flag for urwlocks.

  If there was some error, e.g. the sleep was interrupted, as in the
  referenced PR, do_rw_rdlock() did not cleared URWLOCK_READ_WAITERS.
  Since unlock only wakes up write waiters when there is no read
  waiters, for URWLOCK_PREFER_READER kind of locks, the result was
  missed wakeups for writers.

  In particular, the most visible victims are ld-elf.so locks in
  processes which loaded libthr, because rtld locks are urwlocks in
  prefer-reader mode.  Normal rwlocks fall into prefer-reader mode only
  if thread already owns rw lock in read mode, which is not typical and
  correspondingly less visible.  In the PR, unowned rtld bind lock was
  waited for in the process where only one thread was left alive.

  Note that do_rw_wrlock() correctly clears URWLOCK_WRITE_WAITERS in
  case of errors.

  Reported and tested by:       longwitz@incore.de
  PR:   211947
  Sponsored by: The FreeBSD Foundation
  MFC after:    1 week

Changes:
  head/sys/kern/kern_umtx.c

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-211947-16-vK3Is20tCK>