changeset 14291:c8e69e83977f

8000988: VM deadlock when running btree006 on windows-i586 Reviewed-by: johnc, jcoomes, ysr
author jmasa
date Tue, 30 Oct 2012 10:23:55 -0700
parents c1e3cfccfefd
children 7ee97c6fd7f1
files hotspot/src/share/vm/memory/collectorPolicy.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/memory/collectorPolicy.cpp	Fri Oct 26 14:18:57 2012 -0700
+++ b/hotspot/src/share/vm/memory/collectorPolicy.cpp	Tue Oct 30 10:23:55 2012 -0700
@@ -742,6 +742,8 @@
   uint gc_count = 0;
   uint full_gc_count = 0;
 
+  assert(!Heap_lock->owned_by_self(), "Should not be holding the Heap_lock");
+
   do {
     MetaWord* result = NULL;
     if (GC_locker::is_active_and_needs_gc()) {
@@ -756,7 +758,6 @@
       }
       JavaThread* jthr = JavaThread::current();
       if (!jthr->in_critical()) {
-        MutexUnlocker mul(Heap_lock);
         // Wait for JNI critical section to be exited
         GC_locker::stall_until_clear();
         // The GC invoked by the last thread leaving the critical