8316401: sun/tools/jhsdb/JStackStressTest.java failed with "InternalError: We should have found a thread that owns the anonymous lock"
Reviewed-by: cjplummer, dholmes
This commit is contained in:
parent
c45308afac
commit
bd918f49d2
@ -241,7 +241,11 @@ public class Threads {
|
||||
return thread;
|
||||
}
|
||||
}
|
||||
throw new InternalError("We should have found a thread that owns the anonymous lock");
|
||||
// We should have found the owner, however, as the VM could be in any state, including the middle
|
||||
// of performing GC, it is not always possible to do so. Just return null if we can't locate it.
|
||||
System.out.println("Warning: We failed to find a thread that owns an anonymous lock. This is likely");
|
||||
System.out.println("due to the JVM currently running a GC. Locking information may not be accurate.");
|
||||
return null;
|
||||
}
|
||||
// Owner can only be threads at this point.
|
||||
Address o = monitor.owner();
|
||||
|
Loading…
x
Reference in New Issue
Block a user