mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
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
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue