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/21298] rwlock can deadlock on frequent reader/writer phase switching


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

--- Comment #6 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, release/2.25/master has been updated
       via  bc5ace67fe9823757532e0273f6c1cdfda065433 (commit)
       via  4b3a995ad64bed54baf544281596a785d18789f6 (commit)
       via  92a0e0c6175cdc8d46d2f6efb51c62bd81bf897e (commit)
      from  02aaa3c749bf18a3dbafff4c1f0180f135cad7ed (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=bc5ace67fe9823757532e0273f6c1cdfda065433

commit bc5ace67fe9823757532e0273f6c1cdfda065433
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Sat Jul 29 00:02:03 2017 -0400

    mutex: Fix robust mutex lock acquire (Bug 21778)

    65810f0ef05e8c9e333f17a44e77808b163ca298 fixed a robust mutex bug but
    introduced BZ 21778: if the CAS used to try to acquire a lock fails, the
    expected value is not updated, which breaks other cases in the loce
    acquisition loop.  The fix is to simply update the expected value with
    the value returned by the CAS, which ensures that behavior is as if the
    first case with the CAS never happened (if the CAS fails).

    This is a regression introduced in the last release.

    Tested on x86_64, i686, ppc64, ppc64le, s390x, aarch64, armv7hl.

    (cherry picked from commit 5920a4a624b1f4db310d1c44997b640e2a4653e5)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4b3a995ad64bed54baf544281596a785d18789f6

commit 4b3a995ad64bed54baf544281596a785d18789f6
Author: Carlos O'Donell <carlos@systemhalted.org>
Date:   Mon Aug 28 15:04:39 2017 +0200

    rwlock: Fix explicit hand-over (bug 21298)

    Without this fix, the rwlock can fail to execute the explicit hand-over
    in certain cases (e.g., empty critical sections that switch quickly between
    read and write phases).  This can then lead to errors in how
__wrphase_futex
    is accessed, which in turn can lead to deadlocks.

    (cherry picked from commit faf8c066df0d6bccb54bd74dd696eeb65e1b3bbc)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=92a0e0c6175cdc8d46d2f6efb51c62bd81bf897e

commit 92a0e0c6175cdc8d46d2f6efb51c62bd81bf897e
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Aug 28 14:38:52 2017 +0200

    Synchronize support/ infrastructure with master

    This commit updates the support/ subdirectory to
    commit faf8c066df0d6bccb54bd74dd696eeb65e1b3bbc
    on the master branch.

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

Summary of changes:
 ChangeLog                                  |   23 ++
 NEWS                                       |    2 +
 nptl/Makefile                              |    3 +-
 nptl/pthread_mutex_lock.c                  |   13 +-
 nptl/pthread_mutex_timedlock.c             |   13 +-
 nptl/pthread_rwlock_common.c               |  478 ++++++++++++++--------------
 nptl/tst-mutex7.c                          |   45 ++-
 nptl/tst-mutex7robust.c                    |    7 +
 nptl/tst-rwlock20.c                        |  116 +++++++
 scripts/backport-support.sh                |  110 +++++++
 support/Makefile                           |   27 ++
 support/capture_subprocess.h               |   61 ++++
 support/check.h                            |   10 +-
 support/namespace.h                        |   44 +++
 support/resolv_test.c                      |   61 +++-
 support/resolv_test.h                      |   10 +
 support/support-xstat.c                    |   30 ++
 support/support.h                          |   15 +
 support/support_can_chroot.c               |   65 ++++
 support/support_capture_subprocess.c       |  108 +++++++
 support/support_capture_subprocess_check.c |   67 ++++
 support/support_chroot.c                   |   71 ++++
 support/support_enter_network_namespace.c  |    5 +-
 support/support_format_addrinfo.c          |   69 +++-
 support/support_format_dns_packet.c        |   21 +-
 support/support_isolate_in_subprocess.c    |   38 +++
 support/support_run_diff.c                 |    4 +-
 support/support_shared_allocate.c          |   57 ++++
 support/support_test_main.c                |    3 +-
 support/support_test_verify_impl.c         |   12 +-
 support/support_write_file_string.c        |   39 +++
 support/temp_file.c                        |   31 ++-
 support/test-driver.c                      |    9 +
 support/test-driver.h                      |    1 +
 support/tst-support-namespace.c            |   84 +++++-
 support/tst-support_capture_subprocess.c   |  188 +++++++++++
 support/tst-support_format_dns_packet.c    |  101 ++++++
 support/tst-support_record_failure-2.sh    |   10 +-
 support/tst-support_record_failure.c       |    1 +
 support/xaccept4.c                         |   32 ++
 support/xchroot.c                          |   28 ++
 support/xclose.c                           |   28 ++
 support/xdup2.c                            |   28 ++
 support/xmkdir.c                           |   28 ++
 support/xmprotect.c                        |   28 ++
 support/xopen.c                            |   30 ++
 support/xpipe.c                            |   28 ++
 support/xpthread_attr_setguardsize.c       |   26 ++
 support/xpthread_rwlock_init.c             |   27 ++
 support/xpthread_rwlock_rdlock.c           |   26 ++
 support/xpthread_rwlock_unlock.c           |   26 ++
 support/xpthread_rwlock_wrlock.c           |   26 ++
 support/xpthread_rwlockattr_init.c         |   26 ++
 support/xpthread_rwlockattr_setkind_np.c   |   27 ++
 support/xsocket.h                          |    1 +
 support/xthread.h                          |   10 +
 support/xunistd.h                          |   17 +-
 57 files changed, 2166 insertions(+), 328 deletions(-)
 create mode 100644 nptl/tst-mutex7robust.c
 create mode 100644 nptl/tst-rwlock20.c
 create mode 100644 scripts/backport-support.sh
 create mode 100644 support/capture_subprocess.h
 create mode 100644 support/support-xstat.c
 create mode 100644 support/support_can_chroot.c
 create mode 100644 support/support_capture_subprocess.c
 create mode 100644 support/support_capture_subprocess_check.c
 create mode 100644 support/support_chroot.c
 create mode 100644 support/support_isolate_in_subprocess.c
 create mode 100644 support/support_shared_allocate.c
 create mode 100644 support/support_write_file_string.c
 create mode 100644 support/tst-support_capture_subprocess.c
 create mode 100644 support/tst-support_format_dns_packet.c
 create mode 100644 support/xaccept4.c
 create mode 100644 support/xchroot.c
 create mode 100644 support/xclose.c
 create mode 100644 support/xdup2.c
 create mode 100644 support/xmkdir.c
 create mode 100644 support/xmprotect.c
 create mode 100644 support/xopen.c
 create mode 100644 support/xpipe.c
 create mode 100644 support/xpthread_attr_setguardsize.c
 create mode 100644 support/xpthread_rwlock_init.c
 create mode 100644 support/xpthread_rwlock_rdlock.c
 create mode 100644 support/xpthread_rwlock_unlock.c
 create mode 100644 support/xpthread_rwlock_wrlock.c
 create mode 100644 support/xpthread_rwlockattr_init.c
 create mode 100644 support/xpthread_rwlockattr_setkind_np.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]