JDK 21 | JDK 22 |
---|---|
21.0.4-oracleFixed | 22 b25Fixed |
Blocks :
|
|
Blocks :
|
|
Relates :
|
|
Relates :
|
In JDK-8318757 we can see that running a monitor deflation pass during a safepointed operation can interleave with the async monitor deflation, which causes various problems. The fix is to stop deflating monitors in the thread dump operation and instead only collect relevant monitors. There is yet another place where we call monitor deflation from outside of the monitor deflation thread. That place is the "final audit" part, which walks over monitors and performs verification and logging. Before the walk over the list of monitors we perform a monitor deflation pass to prune the system from "uninteresting" monitors. I propose that we remove the monitor deflation from the final audit, and that we instead only visit "interesting" monitors (those that have an owner or "is busy"). After this change it's only the monitor deflation thread that performs monitor deflation. It is unclear to me if the final audit can actually interleave with the async monitor deflation, but this removal makes it easier to reason around monitor deflation since it is only one thread that is performing it.
|