Skip to content

[8.4.0] Support generational ZGC and generational Shenandoah#26684

Merged
iancha1992 merged 1 commit intobazelbuild:release-8.4.0from
bazel-io:cp26676-8.4.0
Aug 4, 2025
Merged

[8.4.0] Support generational ZGC and generational Shenandoah#26684
iancha1992 merged 1 commit intobazelbuild:release-8.4.0from
bazel-io:cp26676-8.4.0

Conversation

@bazel-io
Copy link
Copy Markdown
Member

@bazel-io bazel-io commented Aug 1, 2025

Bazel currently does not start when you launch the server JVM with generational ZGC using -XX:+UseZGC and -XX:+ZGenerational. Or if you're on JDK 24+ the same problem is encountered with just -XX:+UseZGC.

The same problem is encountered with -XX:+UseShenandoahGC and -XX:ShenandoahGCMode=generational.

Non-generational ZGC is removed as of JDK 24. Generational Shenandoah is being promoted from experimental to production in JDK 25.

This fix is modeled after #12644

Closes #26676.

PiperOrigin-RevId: 789746919
Change-Id: Ia070fa9b39cef07cc9987544c014d589b2504dce

Commit 3a1fe64

Bazel currently does not start when you launch the server JVM with generational ZGC using `-XX:+UseZGC` and `-XX:+ZGenerational`. Or if you're on JDK 24+ the same problem is encountered with just `-XX:+UseZGC`.

The same problem is encountered with `-XX:+UseShenandoahGC` and `-XX:ShenandoahGCMode=generational`.

Non-generational ZGC is removed as of JDK 24. Generational Shenandoah is being promoted from experimental to production in JDK 25.

This fix is modeled after bazelbuild#12644

Closes bazelbuild#26676.

PiperOrigin-RevId: 789746919
Change-Id: Ia070fa9b39cef07cc9987544c014d589b2504dce
@bazel-io bazel-io requested a review from a team as a code owner August 1, 2025 13:57
@bazel-io bazel-io added team-Performance Issues for Performance teams awaiting-review PR is awaiting review from an assigned reviewer labels Aug 1, 2025
@bazel-io bazel-io requested a review from meisterT August 1, 2025 13:57
@iancha1992 iancha1992 enabled auto-merge August 1, 2025 18:14
@iancha1992 iancha1992 added this pull request to the merge queue Aug 4, 2025
Merged via the queue into bazelbuild:release-8.4.0 with commit 96ce233 Aug 4, 2025
47 checks passed
@github-actions github-actions Bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Aug 4, 2025
CyrusNajmabadi pushed a commit to CyrusNajmabadi/bazel that referenced this pull request Feb 11, 2026
JDK 21+ introduces generational ZGC ("ZGC Old Generation") and
generational Shenandoah ("Shenandoah Old Gen"). Bazel's
isTenuredSpace() only knew the older pool names ("ZHeap",
"Shenandoah"), causing MemoryPressureModule to crash on startup
when using these collectors.

This is a backport of the upstream fix:
- Issue: bazelbuild#26676
- PR: bazelbuild#26684
- Commit: bazelbuild@3a1fe64

Co-authored-by: Cursor <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Performance Issues for Performance teams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants