8007476: assert(the_owner != NULL) failed: Did not find owning Java thread for lock word address

Make deadlock detection a little more robust in the case of being unable to find the JavaThread associated with an object lock.

Reviewed-by: sla, acorn
This commit is contained in:
Daniel D. Daugherty 2013-02-27 15:00:30 -08:00
parent 84144898c1
commit 776841b1bc
4 changed files with 47 additions and 8 deletions

View file

@ -4285,7 +4285,9 @@ JavaThread *Threads::owning_thread_from_monitor_owner(address owner, bool doLock
if (owner == (address)p) return p;
}
}
assert(UseHeavyMonitors == false, "Did not find owning Java thread with UseHeavyMonitors enabled");
// Cannot assert on lack of success here since this function may be
// used by code that is trying to report useful problem information
// like deadlock detection.
if (UseHeavyMonitors) return NULL;
//
@ -4303,7 +4305,7 @@ JavaThread *Threads::owning_thread_from_monitor_owner(address owner, bool doLock
}
}
}
assert(the_owner != NULL, "Did not find owning Java thread for lock word address");
// cannot assert on lack of success here; see above comment
return the_owner;
}