[master] RFR: Deflate monitors of dead objects before they become unreachable

Aleksey Shipilev shade at openjdk.java.net
Tue Nov 30 13:03:19 UTC 2021


On Wed, 17 Nov 2021 21:49:50 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> I've seen occasional failures in G1, where the refinement thread tries to parse a heap region that has dead objects, and would sometimes see an object with a monitor that has already been deflated. And because deflation does not bother to restore the header of dead objects, it would reach to unknown memory and crash.
> 
> The fix is to restore the header of dead objects just before they become unreachable. This can be done in the closures used by WeakProcessor::weak_oops_do(), right before the weak root will be cleared.
> 
> Testing:
>  - [x] tier1
>  - [x] tier2
>  - [x] tier3
>  - [ ] tier4

Marked as reviewed by shade (Committer).

-------------

PR: https://git.openjdk.java.net/lilliput/pull/28


More information about the lilliput-dev mailing list