RFR: 8333786: Serial: Remove SerialHeap::_incremental_collection_failed [v3]

Albert Mingkun Yang ayang at openjdk.org
Fri Jun 14 13:25:19 UTC 2024


On Fri, 14 Jun 2024 12:41:26 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Do you have an idea why this surfaced just recently and did not crash before?

https://bugs.openjdk.org/browse/JDK-8332516 makes it more likely to run young-gc, which can result into promotion-failure in tight heaps. When promotion-failure occurs, sliding in full-gc might not be able to fit all objs in first three spaces. This doesn't occur all the time, hence the intermittent test failure.

> Or did the functionality never work?

The underlying issue is in the full-gc sliding choice, so it has never worked, but extremely unlikely before.

> It seems to be used/exercised as well given that crash.

It's exercised in stress tests, which allocate until OOM and do full-gc compaction -- uncommon in real code.

> Not that I am too hung up on that feature, but removing existing functionality seems to need to be weighed against the benefits. This change does not seem to remove too complicated code, but maybe there are more benefits I can't see right now.

It's to get rid of this "hack", `gch->set_incremental_collection_failed(); // Slight lie: a full gc left us in that state`.

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

PR Comment: https://git.openjdk.org/jdk/pull/19594#issuecomment-2168034720


More information about the hotspot-gc-dev mailing list