RFR: 8320525: G1: G1UpdateRemSetTrackingBeforeRebuild::distribute_marked_bytes accesses partially unloaded klass [v2]

Thomas Schatzl tschatzl at openjdk.org
Fri Nov 24 14:43:18 UTC 2023


> Hi all,
> 
>   please review this fix that removes the access to a partially unloaded (i.e. unlinked only) `Klass` used for debug code in `G1UpdateRemSetTrackingBeforeRebuild::distribute_marked_bytes`.
> 
> This starts to fail if metadata purging happens before the call to this methods (as https://bugs.openjdk.org/browse/JDK-8317809 suggests). The test gc/g1/humongousObjects/TestHumongousClassLoader.java starts to crash on linux-x86 with 100% reproduction because it more aggressively uncommits memory when purging metaspace.
> 
> The fix fixes the asserts to only access the klass when it should not be unloaded yet.
> 
> Testing: failing test case not failing any more, gha
> 
> Thanks,
>   Thomas

Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:

  ayang review, improve documentation for assert.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/16766/files
  - new: https://git.openjdk.org/jdk/pull/16766/files/eff72aa6..c86922f1

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=16766&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16766&range=00-01

  Stats: 5 lines in 1 file changed: 0 ins; 4 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/16766.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16766/head:pull/16766

PR: https://git.openjdk.org/jdk/pull/16766


More information about the hotspot-gc-dev mailing list