Skip to content

Commit

Permalink
8316401: sun/tools/jhsdb/JStackStressTest.java failed with "InternalE…
Browse files Browse the repository at this point in the history
…rror: We should have found a thread that owns the anonymous lock"
  • Loading branch information
Roman Kennke committed Sep 25, 2023
1 parent 0f77d25 commit 18e46db
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ public JavaThread owningThreadFromMonitor(ObjectMonitor monitor) {
return thread;
}
}
throw new InternalError("We should have found a thread that owns the anonymous lock");
// We should have found the owner. However, the code can run concurrently with
// Java code and locking state can change at any time. This code is not
// expected to be precise, so we return null here.
return null;
}
// Owner can only be threads at this point.
Address o = monitor.owner();
Expand Down

0 comments on commit 18e46db

Please sign in to comment.