JDK-8235737 : Inconsistent handling of _wb_conc_mark by G1
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 14
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2019-12-11
  • Updated: 2023-01-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
An inconsistency in the handling of the _wb_conc_mark GCCause by G1 was introduced by JDK-8232588. We get into try_collect_concurrently because is_user_requested_concurrent_full_gc is true for it, and the policy handling by decide_on_conc_mark_initiation similarly uses that function to decide whether concurrent marking should be forced (skipping mixed gc's and the like).

But then try_collect_concurrently uses GCCause::is_user_requested_gc to select how to handle the result of the VMOp, and that function returns false for _wb_conc_mark.

This treatment of _wb_conc_mark as a non-user-request for VMOp result handling can result in the request unexpectedly not actually starting a concurrent collection cycle.

It may be that try_collect_concurrently should be consistently using is_user_requested_concurrent_full_gc. However, it may also be that GCCause::is_user_requested_gc should be true for _wb_conc_mark.

Comments
It turns out this inconsistent treatment is currently necessary. We want _wb_conc_mark to really start a marking cycle, e.g. decide_on_conc_mark should force (skipping mixed gcs, and the like). But we can't block in try_collect, waiting for completion, as this cause is used by the G1 implementation of ConcurrentGCPhaseManager support. But that's being replaced by ConcurrentGCBreakpoints (JDK-8240239), which has it's own GCCause, rather than piggybacking on an existing cause.
03-03-2020