This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/14958] Concurrent reader deadlock in pthread_rwlock_rdlock()


https://sourceware.org/bugzilla/show_bug.cgi?id=14958

--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  b634486d57a14b53f1cfcf739e41ddf826e51977 (commit)
       via  3c9c61febede148b79d8509e16588152d99b3774 (commit)
      from  da7f049cad943629f16cd6e533214955edfd511d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b634486d57a14b53f1cfcf739e41ddf826e51977

commit b634486d57a14b53f1cfcf739e41ddf826e51977
Author: Torvald Riegel <triegel@redhat.com>
Date:   Tue Apr 28 23:24:36 2015 +0200

    Fix missing wake-ups in pthread_rwlock_rdlock.

    This adds wake-ups that would be missing if assuming that for a
    non-writer-preferring rwlock, if one thread has acquired a rdlock and
    does not release it, another thread will eventually acquire a rdlock too
    despite concurrent write lock acquisition attempts.  BZ 14958 is about
    supporting this assumption.  Strictly speaking, this isn't a valid
    test case, but nonetheless worth supporting (see comment 7 of BZ 14958).

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3c9c61febede148b79d8509e16588152d99b3774

commit 3c9c61febede148b79d8509e16588152d99b3774
Author: Torvald Riegel <triegel@redhat.com>
Date:   Tue Apr 21 20:34:21 2015 +0200

    Fix lost wake-up when pthread_rwlock_timedrwlock times out.

    If we set up a rwlock to prefer writers (and disallow recursive rdlock
    acquisitions), then readers will block for writers that are blocked to
    acquire the lock (otherwise, readers could constantly enter and exit,
    and the writer would never get the lock).  However, the existing
    implementation did not wake such readers when the writer timed out.
    This patch adds the missing wake-up.
    There's no similar case for writers being blocked on readers.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                         |   22 +++++
 NEWS                              |   23 +++--
 nptl/Makefile                     |    1 +
 nptl/pthread_rwlock_rdlock.c      |   40 ++++++++-
 nptl/pthread_rwlock_timedrdlock.c |   17 ++++
 nptl/pthread_rwlock_timedwrlock.c |   26 +++++
 nptl/pthread_rwlock_tryrdlock.c   |   18 ++++-
 nptl/pthread_rwlock_unlock.c      |    5 +
 nptl/tst-rwlock15.c               |  116 +++++++++++++++++++++++
 nptl/tst-rwlock16.c               |  183 +++++++++++++++++++++++++++++++++++++
 10 files changed, 437 insertions(+), 14 deletions(-)
 create mode 100644 nptl/tst-rwlock15.c
 create mode 100644 nptl/tst-rwlock16.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]