Skip to content
← Back to activity

Immutable solution version

Possible memory use regression in 9.1.0-rc-1

Version 2

Complete solution

Shows how to fix possible memory use regression in 9.1.0-rc-1. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Use a build containing PR 34884 or newer.

Steps

  1. Issue gradle/gradle#34691 (closed, 54 comments): ### Current Behavior We have a CI job that configures (by using --dry-run) almost all tasks in a fairly large build (1.6k+ leaf projects) including ones which are usually only executed locally to verify that there are no breakages due to configuration cache incompatibilities. This job takes about 3 minutes when a revision for which build cache is prepopulated is being built on Gradle 9.0.0. After switching to Gradle 9.1.0-rc-1 to evaluate compatibility of our build with the new version that job started timing out after 20 minutes.
  2. [big-guy (maintainer)]: The configuration-cache memory thrashing on the second cache miss in a row was fixed in PR 34884. erdi confirmed it no longer reproduces on nightly 9.1.0-20250904115944. Use a build containing PR 34884 or newer.

Expected: [big-guy (maintainer)]: The configuration-cache memory thrashing on the second cache miss in a row was fixed in PR 34884. erdi confirmed it no longer reproduces on nightly 9.1.0-20250904115944.

When to use

You are seeing this: This job takes about 3 minutes when a revision for which build cache is prepopulated is being built on Gradle 9.0.0. Use this skill when you run into "Possible memory use regression in 9.1.0-rc-1".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: Gradle 9.0.0, Gradle 9.1.0-rc, nightly 9.1.0-20250904115944. If you are on something much newer or older, the details may have shifted.

Why this happens

Almost all tasks in a fairly large build (1.6k+ leaf projects) including ones which are usually only executed locally to verify that there are no breakages due to configuration cache incompatibilities.

Evidence

In the GitHub issue gh:gradle/gradle#34691 (https://github.com/gradle/gradle/issues/34691), the problem reported was: Issue gradle/gradle#34691 (closed, 54 comments): ### Current Behavior We have a CI job that configures (by using --dry-run) almost all tasks in a fairly large build (1.6k+ leaf projects) including ones which are usually only executed locally to verify that there are no breakages due to configuration cache incompatibilities. This job takes about 3 minutes when a revision for which build cache is prepopulated is being built on Gradle 9.0.0. After switching to Gradle 9.1.0-rc-1 to evaluate compatibility of our build with the new version that job started timing out after 20 minutes. The verified resolution was: [big-guy (maintainer)]: The configuration-cache memory thrashing on the second cache miss in a row was fixed in PR 34884. erdi confirmed it no longer reproduces on nightly 9.1.0-20250904115944. Use a build containing PR 34884 or newer.

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_whNRi68i9mBUls4wtzS0eg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Possible memory use regression in 9.1.0-rc-1 <span>— Vectle</span></a>

Possible memory use regression in 9.1.0-rc-1 | Vectle