From 0012625a879fef7beb56e43a791778b32cb75874 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 10 Feb 2012 13:45:44 -0700 Subject: [PATCH] - Fix lost wakeups in pthread_cond_*. (#552960, #769421) - Define x86_64 feraiseexcept inline only under __USE_EXTERN_INLINES (#769993). --- glibc-rh552960-2.patch | 27 +++++++++++++++++++++++++++ glibc.spec | 15 +++++++++++---- 2 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 glibc-rh552960-2.patch diff --git a/glibc-rh552960-2.patch b/glibc-rh552960-2.patch new file mode 100644 index 0000000..3859a32 --- /dev/null +++ b/glibc-rh552960-2.patch @@ -0,0 +1,27 @@ +diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S +--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-02-10 12:49:42.609737373 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-02-10 12:52:00.962150379 -0700 +@@ -438,6 +438,10 @@ __pthread_cond_wait: + addl $1, cond_futex(%ebx) + movl cond_futex(%ebx), %ebp + ++ /* Increment total_seq to ensure we do not lose wakeups. */ ++ addl $1, total_seq(%ebx) ++ adcl $0, total_seq+4(%ebx) ++ + /* Unlock. */ + LOCK + #if cond_lock == 0 +diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-02-10 12:49:42.612737361 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-02-10 12:52:36.179000963 -0700 +@@ -366,6 +366,9 @@ __pthread_cond_wait: + incl cond_futex(%rdi) + movl cond_futex(%rdi), %edx + ++ /* Increment total_seq to ensure we do not lose wakeups. */ ++ incq total_seq(%rdi) ++ + /* Release internal lock. */ + LOCK + #if cond_lock == 0 diff --git a/glibc.spec b/glibc.spec index 8436e94..b3acce0 100644 --- a/glibc.spec +++ b/glibc.spec @@ -28,7 +28,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 24%{?dist}.4 +Release: 24%{?dist}.5 # GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries. # Things that are linked directly into dynamically linked programs # and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional @@ -55,6 +55,9 @@ Patch11: %{name}-rh758252.patch Patch12: %{name}-rh767746.patch Patch13: %{name}-rh552960.patch Patch14: %{name}-rh767696.patch +Patch15: %{name}-rh552960-2.patch +Patch16: %{name}-rh769993.patch + Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Obsoletes: glibc-profile < 2.4 Obsoletes: nss_db @@ -284,10 +287,10 @@ rm -rf %{glibcportsdir} %patch10 -p1 %patch11 -p1 %patch12 -p1 -# Causing multiple problems in Fedora & Debian. Disabled until issues -# are properly diagnosed and resolved. -#%patch13 -p1 +%patch13 -p1 %patch14 -p1 +%patch15 -p1 +%patch16 -p1 # A lot of programs still misuse memcpy when they have to use # memmove. The memcpy implementation below is not tolerant at @@ -1140,6 +1143,10 @@ rm -f *.filelist* %endif %changelog +* Fri Feb 10 2012 Jeff Law - 2.14.90-24.fc16.5 + - Fix lost wakeups in pthread_cond_*. (#552960, #769421) + - Define x86_64 feraiseexcept inline only under __USE_EXTERN_INLINES (#769993). + * Thu Dec 22 2011 Jeff Law - 2.14.90-24.fc16.4 - Revert change for 552960, it's causing multiple problems.