RFR (S): 8210557: G1 next bitmap verification at the end of concurrent mark sometimes fails
thomas.schatzl at oracle.com
Thu Sep 20 14:31:58 UTC 2018
can I have reviews for this smal change that removes an unnecessary
and actually superfluous assert that can sometimes fail?
So if G1 concurrent mark gets aborted by a full gc, it intends to check
whether the next mark bitmap for the next concurrent cycle is
Unfortunately, G1 full gc uses the next bitmap for its own marking, so
depending on when this thread gets scheduled, it may errorneously
detect that the next mark bitmap contains marks (well, from the first
phase of full gc :)).
This bitmap-clear check is actually unnecessary: at the end of full gc
the next bitmap is already checked for being completely empty (in
So instead of trying to change scheduling of that verification (to e.g.
run outside GC), I opted to remove this verification (and associated
passing hs-tier1-5,jdk-tier1-3 with -XX:+G1VerifyBitmaps; however since
this is just removal of verification code there is extremely low risk
of introducing a bug. :)
More information about the hotspot-gc-dev