[jdk17u-dev] RFR: 8325754: Dead AbstractQueuedSynchronizer$ConditionNodes survive minor garbage collections

Neethu Prasad nprasad at openjdk.org
Wed Jul 10 20:21:43 UTC 2024


On Mon, 17 Jun 2024 22:14:40 GMT, Neethu Prasad <nprasad at openjdk.org> wrote:

> **Notes**
> Backport of [JDK-8325754](https://bugs.openjdk.org/browse/JDK-8325754).
> 
> Unlink 'ConditionNode' before they are transferred to the sync queue as G1 seems to be able to collect “dead” ConditionNode instances during minor collections only if no formerly alive ConditionNode instances were promoted to the old generation and died there, which often cannot be avoided since e.g. on application startup many objects are promoted to the old generation after a few collections.
> 
> **Verification**
> 
> * jdk_util, Tier 1 & Tier 2 tests passed.
> * Ran G1LoiteringConditionNodes.java (sample code from bug description) and verified that YG GC time is not increasing after full GC.
> 
> _Before PR_
> 
> 
> dev-dsk-neethp-jdk-2c-ad54955c % /home/neethp/Development/jdk17u-dev/build/linux-x86_64-server-release/images/jdk/bin/java -Xms2048m -Xmx2048m -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:G1MaxNewSizePercent=20 '-Xlog:gc*,gc+age*=trace' -cp . G1LoiteringConditionNodes | grep -E 'Pause.*ms'
> [0.960s][info ][gc          ] GC(0) Pause Young (Normal) (G1 Evacuation Pause) 102M->1M(2048M) 5.290ms
> [2.485s][info ][gc          ] GC(1) Pause Young (Normal) (G1 Evacuation Pause) 149M->1M(2048M) 2.288ms
> [6.805s][info ][gc          ] GC(2) Pause Young (Normal) (G1 Evacuation Pause) 409M->1M(2048M) 2.393ms
> [11.165s][info ][gc          ] GC(3) Pause Young (Normal) (G1 Evacuation Pause) 409M->1M(2048M) 2.603ms
> [15.544s][info ][gc          ] GC(4) Pause Young (Normal) (G1 Evacuation Pause) 409M->1M(2048M) 2.462ms
> [19.955s][info ][gc          ] GC(5) Pause Young (Normal) (G1 Evacuation Pause) 409M->1M(2048M) 2.382ms
> [24.369s][info ][gc          ] GC(6) Pause Young (Normal) (G1 Evacuation Pause) 409M->1M(2048M) 2.246ms
> [28.790s][info ][gc          ] GC(7) Pause Young (Normal) (G1 Evacuation Pause) 409M->1M(2048M) 2.443ms
> [33.211s][info ][gc          ] GC(8) Pause Young (Normal) (G1 Evacuation Pause) 409M->1M(2048M) 2.331ms
> [37.639s][info ][gc          ] GC(9) Pause Young (Normal) (G1 Evacuation Pause) 409M->1M(2048M) 2.319ms
> [42.066s][info ][gc          ] GC(10) Pause Young (Normal) (G1 Evacuation Pause) 409M->1M(2048M) 2.629ms
> [46.515s][info ][gc          ] GC(11) Pause Young (Normal) (G1 Evacuation Pause) 409M->1M(2048M) 2.334ms
> [50.957s][info ][gc          ] GC(12) Pause Young (Normal) (G1 Evacuation Pause) 409M->1M(2048M) 2.280ms
> [55.382s][info ][gc          ] GC(13) Pause Young (Normal) (G1 Evacuation Pause) 409M->1M(2048M) 2.413ms
> [59.830s][info ][gc          ] GC(14) Pause Young (Norma...

Will integrate once backport to 21 is closed.
https://bugs.openjdk.org/browse/JDK-8334825

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

PR Comment: https://git.openjdk.org/jdk17u-dev/pull/2599#issuecomment-2220709144


More information about the jdk-updates-dev mailing list