Mercurial > hg > release > icedtea6-1.6
changeset 1700:373dcdea5871
Backport fix for Sun bug 6822370.
2010-03-10 Andrew John Hughes <ahughes@redhat.com>
* Makefile.am:
Add new patch.
* patches/openjdk/6822370-reentrantreadwritelock.patch:
Backported patch from HotSpot 16 to fix bug S6822370;
threads blocked when the ReentrantReadWriteLock is
not held.
author | Andrew John Hughes <ahughes@redhat.com> |
---|---|
date | Thu, 11 Mar 2010 01:51:53 +0000 |
parents | 29c75d7fc03a |
children | 7dc4eeee5f69 |
files | ChangeLog Makefile.am patches/openjdk/6822370-reentrantreadwritelock.patch |
diffstat | 3 files changed, 76 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Jan 27 15:56:02 2010 +0000 +++ b/ChangeLog Thu Mar 11 01:51:53 2010 +0000 @@ -1,3 +1,12 @@ +2010-03-10 Andrew John Hughes <ahughes@redhat.com> + + * Makefile.am: + Add new patch. + * patches/openjdk/6822370-reentrantreadwritelock.patch: + Backported patch from HotSpot 16 to fix bug S6822370; + threads blocked when the ReentrantReadWriteLock is + not held. + 2010-01-27 Andrew John Hughes <ahughes@redhat.com> * NEWS:
--- a/Makefile.am Wed Jan 27 15:56:02 2010 +0000 +++ b/Makefile.am Thu Mar 11 01:51:53 2010 +0000 @@ -644,7 +644,8 @@ patches/security/icedtea-6872358.patch \ patches/icedtea-jar-misc.patch \ patches/icedtea-6897844-xshm.patch \ - patches/icedtea-linux-separate-debuginfo.patch + patches/icedtea-linux-separate-debuginfo.patch \ + patches/openjdk/6822370-reentrantreadwritelock.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6822370-reentrantreadwritelock.patch Thu Mar 11 01:51:53 2010 +0000 @@ -0,0 +1,65 @@ +# HG changeset patch +# User dholmes +# Date 1259712624 18000 +# Node ID 49bd3de668dc35ba7cff876422d114a91f35bbd2 +# Parent b6e6e189e1db90e044c24be709bc581e2356a910 +6822370: ReentrantReadWriteLock: threads hung when there are no threads holding onto the lock (Netra x4450) +Summary: This day one bug is caused by missing memory barriers in various Parker::park() paths that can result in lost wakeups and hangs. +Reviewed-by: dice, acorn + +diff -r b6e6e189e1db -r 49bd3de668dc src/os/linux/vm/os_linux.cpp +--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp Wed Nov 25 19:15:17 2009 -0800 ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp Tue Dec 01 19:10:24 2009 -0500 +@@ -4656,6 +4656,7 @@ + // Return immediately if a permit is available. + if (_counter > 0) { + _counter = 0 ; ++ OrderAccess::fence(); + return ; + } + +@@ -4698,6 +4699,7 @@ + _counter = 0; + status = pthread_mutex_unlock(_mutex); + assert (status == 0, "invariant") ; ++ OrderAccess::fence(); + return; + } + +@@ -4737,7 +4739,7 @@ + if (jt->handle_special_suspend_equivalent_condition()) { + jt->java_suspend_self(); + } +- ++ OrderAccess::fence(); + } + + void Parker::unpark() { +diff -r b6e6e189e1db -r 49bd3de668dc src/os/solaris/vm/os_solaris.cpp +--- openjdk.orig/hotspot/src/os/solaris/vm/os_solaris.cpp Wed Nov 25 19:15:17 2009 -0800 ++++ openjdk/hotspot/src/os/solaris/vm/os_solaris.cpp Tue Dec 01 19:10:24 2009 -0500 +@@ -5803,6 +5803,7 @@ + // Return immediately if a permit is available. + if (_counter > 0) { + _counter = 0 ; ++ OrderAccess::fence(); + return ; + } + +@@ -5846,6 +5847,7 @@ + _counter = 0; + status = os::Solaris::mutex_unlock(_mutex); + assert (status == 0, "invariant") ; ++ OrderAccess::fence(); + return; + } + +@@ -5891,7 +5893,7 @@ + if (jt->handle_special_suspend_equivalent_condition()) { + jt->java_suspend_self(); + } +- ++ OrderAccess::fence(); + } + + void Parker::unpark() {