Integrated: 8354431: gc/logging/TestGCId fails on Shenandoah
Xiaolong Peng
xpeng at openjdk.org
Thu Apr 24 23:26:56 UTC 2025
On Thu, 24 Apr 2025 17:41:52 GMT, Xiaolong Peng <xpeng at openjdk.org> wrote:
> I can't reproduce the issue in Linux, but based on the gc log shared in JBS bug and the related code, it is easy to find the root cause of it.
>
>
> [0.133s][info][gc] GC(0) Concurrent reset after collect (unload classes) 0.033ms
> [0.135s][info][gc] Trigger: Learning 2 of 5. Free (3958K) is below initial threshold (7167K)
> [0.135s][info][gc] Failed to allocate Shared, 128K
> [0.137s][info][gc] Trigger: Handle Allocation Failure
> [0.148s][info][gc] GC(2) Degenerated GC upgrading to Full GC
> [0.167s][info][gc] GC(2) Pause Degenerated GC (Outside of Cycle) 5M->1M(10M) 30.323ms
>
>
> At 0.135s, a concurrent cycle was triggered: `[0.135s][info][gc] Trigger: Learning 2 of 5.`, meanwhile there was allocation failure causing degen: `[0.135s][info][gc] Failed to allocate Shared, 128K`.
> In the implementation of ShenandoahControlThread::service_concurrent_normal_cycle, it checks if there degen or cancellation before starting the concurrent cycle and return w/o any gc log, which causes the missing GCID 1 in the GC log.
>
> Since technically it is not a bug, to fix the potential failure of test `gc/logging/TestGCId` I'll add one line code to print GC log like "[0.135s][info][gc] GC(1) Cancelled"
>
> ### Test
> - [x] gc/logging/TestGCId
> - [x] hotspot_gc_shenandoah
This pull request has now been integrated.
Changeset: 8a39f07d
Author: Xiaolong Peng <xpeng at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/8a39f07d07f8c4e30dc29b14f28e33c9d8e2e65f
Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod
8354431: gc/logging/TestGCId fails on Shenandoah
Reviewed-by: wkemper, phh
-------------
PR: https://git.openjdk.org/jdk/pull/24856
More information about the hotspot-gc-dev
mailing list