Skip to content

chore(deps): update gradle to v9.5.0#18372

Closed
renovate[bot] wants to merge 2 commits into
mainfrom
renovate/gradle-9.x
Closed

chore(deps): update gradle to v9.5.0#18372
renovate[bot] wants to merge 2 commits into
mainfrom
renovate/gradle-9.x

Conversation

@renovate

@renovate renovate Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Update Change
gradle (source) minor 9.4.19.5.0

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

gradle/gradle (gradle)

v9.5.0

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot requested a review from a team as a code owner April 28, 2026 12:51
trask
trask previously approved these changes Apr 28, 2026
@trask trask enabled auto-merge (squash) April 28, 2026 14:38
@trask trask disabled auto-merge April 28, 2026 21:14
@trask

trask commented Apr 28, 2026

Copy link
Copy Markdown
Member

A little concerning:

Unexpected exception thrown.
java.lang.OutOfMemoryError: Java heap space
Unexpected exception thrown.

https://github.com/open-telemetry/opentelemetry-java-instrumentation/actions/runs/25053875707/job/73454612524?pr=18372

@linux-foundation-easycla

linux-foundation-easycla Bot commented Apr 29, 2026

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: renovate[bot] / name: renovate[bot] (2acfd6e)
  • ✅ login: trask / name: Trask Stalnaker (e484ca2)

@renovate

renovate Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor Author

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

Reproduce upstream Gradle 9.5.0 daemon OOM seen in CI by enabling:
- -XX:+HeapDumpOnOutOfMemoryError with HeapDumpPath under $GITHUB_WORKSPACE/gradle-diagnostics
- -Xlog:gc*,gc+heap=info,gc+age=info verbose GC logging (rotated)

On job failure, copy the daemon log directory and any hs_err_pid*.log
into the diagnostics directory and upload the whole tree as the
'gradle-daemon-diagnostics' artifact (retained 7 days).

Temporary; intended to be reverted once the OOM root cause is identified.
@trask trask force-pushed the renovate/gradle-9.x branch from edd869a to e484ca2 Compare April 29, 2026 22:13
@trask

trask commented Apr 30, 2026

Copy link
Copy Markdown
Member

OOM stack (daemon log)

Exception in thread "JNA Cleaner" java.lang.OutOfMemoryError: Java heap space
Unexpected exception thrown.
org.gradle.internal.remote.internal.MessageIOException: Could not read message from '/127.0.0.1:42332'.
    at org.gradle.internal.remote.internal.inet.SocketConnection.receive(SocketConnection.java:96)
    at org.gradle.internal.remote.internal.hub.MessageHub$ConnectionReceive.run(MessageHub.java:270)
    ...
Caused by: java.lang.OutOfMemoryError: Java heap space

Problem in daemon expiration check
java.lang.OutOfMemoryError: Java heap space
    at java.base/java.lang.StringUTF16.compress(StringUTF16.java:211)
    at java.base/java.lang.String.<init>(String.java:303)
    at java.base/java.io.DataInputStream.readUTF(DataInputStream.java:550)
    at o.g.internal.serialize.InputStreamBackedDecoder.readString(InputStreamBackedDecoder.java:78)
    at o.g.launcher.daemon.registry.DaemonStopEvent$Serializer.read(DaemonStopEvent.java:116)
    at o.g.launcher.daemon.registry.DaemonRegistryContent$Serializer.readStopEvents(DaemonRegistryContent.java:130)
    at o.g.launcher.daemon.server.DaemonRegistryUnavailableExpirationStrategy.checkExpiration(DaemonRegistryUnavailableExpirationStrategy.java:63)
    at o.g.launcher.daemon.server.MasterExpirationStrategy.checkExpiration(MasterExpirationStrategy.java:80)
    at o.g.launcher.daemon.server.Daemon$DaemonExpirationPeriodicCheck.run(Daemon.java:273)

The OOM is in the daemon JVM itself — not a test worker fork (tests are skipped via -PskipTests=true).

Heap dump analysis (Eclipse MAT 1.16.1)

HeapDumpOnOutOfMemoryError produced a 5,452,521,642-byte dump (objects: 82,518,156). Total live retained ≈ 3.16 GB.

Suspect 1 — 677 MB (21.4%): build-operation queue not draining

Class java.util.concurrent.ThreadPoolExecutor (Gradle's DefaultExecutorFactory$TrackedManagedExecutor)
Single-instance retained heap 677,039,984 bytes
Total ThreadPoolExecutor retained (top-level dominator) 677 MB across 64 instances
Accumulation point LinkedBlockingQueue$Node chain (677 MB)
Owner thread Build operations Thread 4

Owner thread stack (parked acquiring a worker lock while the queue grows):

java.lang.Object.wait(Object.java:339)
o.g.internal.resources.DefaultResourceLockCoordinationService.withStateLock(DefaultResourceLockCoordinationService.java:109)
o.g.internal.work.DefaultWorkerLeaseService.acquireLocks(DefaultWorkerLeaseService.java:297)
o.g.internal.work.DefaultWorkerLeaseService.releaseWorkerLeaseAndWaitFor(DefaultWorkerLeaseService.java:476)
o.g.internal.work.DefaultWorkerLeaseService.acquireLocksWithoutWorkerLeaseWhileBlocked(DefaultWorkerLeaseService.java:465)
o.g.internal.work.DefaultWorkerLeaseService.withLocksAcquired(DefaultWorkerLeaseService.java:277)
o.g.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:270)
o.g.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:129)
o.g.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.runBatch(DefaultBuildOperationQueue.java:285)
o.g.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.lambda$runOperations$0(DefaultBuildOperationQueue.java:246)
o.g.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:84)
o.g.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.runOperations(DefaultBuildOperationQueue.java:243)
o.g.internal.operations.DefaultBuildOperationQueue$WorkerRunnable.run(DefaultBuildOperationQueue.java:236)
o.g.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
o.g.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)

Suspect 2 — 488 MB (15.4%): Guava caches holding incremental-compile data

  • 34 com.google.common.cache.LocalCache$LocalManualCache instances retain 487,695,152 bytes.
  • Two single caches dominate: 281 MB and 157 MB retained.
  • 161 CompileJavaBuildOperationReportingCompiler instances retain 681 MB — roughly one per compileJava task in the build, and none released after the task completed.
  • Reachable via o.g.api.internal.tasks.compile.incremental.recomp.CurrentCompilationAccess and IncrementalResultStoringCompiler.

Per-class retention inside the caches (subset):

Class Objects Retained (≥)
o.g.api.internal.tasks.compile.incremental.deps.ClassSetAnalysisData 4,444 840 MB
o.g.api.internal.tasks.compile.incremental.deps.ClassAnalysis 1,006,487 208 MB
o.g.api.internal.tasks.compile.incremental.compilerapi.deps.DependentsSet$DefaultDependentsSet 2,267,823 437 MB
com.google.common.cache.LocalCache$StrongAccessEntry 1,462,462 613 MB
com.google.common.collect.RegularImmutableSet 2,780,730 584 MB
com.google.common.collect.ImmutableMapEntry 3,716,341 378 MB
o.g.internal.hash.HashCode$HashCode128 1,310,441 42 MB

Suspect 3 — 685 MB: BuildOperationState / BuildOperationDescriptor

  • 177 BuildOperationState retain 685,215,552 bytes (also 685 MB via 177 BuildOperationDescriptor).
  • Each retains a CompileJavaBuildOperationReportingCompiler$1$1 (161 instances retain 685 MB cumulatively).
  • The build-operation tracking infrastructure is keeping every :compileJava build-op's full compilation context alive.

Other notable retainers

Object Retained
o.g.api.tasks.util.internal.CachingPatternSpecFactory$CachingSpec (single instance) 52 MB
o.g.api.tasks.util.internal.CachingPatternSpecFactory (single instance) 41 MB
o.g.api.internal.cache.StringInterner (single instance) 37 MB
4,110,081 String instances 370 MB
com.gradle.scan.plugin.internal.d.j.a.d (single instance, Develocity plugin internal) 35 MB

ClassLoader-level dominators

ClassLoader Retained % of heap
o.g.internal.classloader.VisitableURLClassLoader @ 0x740699698 (Gradle core) 1,279,746,256 40.48%
<system class loader> 932,314,248 29.49%
o.g.initialization.MixInLegacyTypesClassLoader 747,514,976 23.65%
VisitableURLClassLoader$InstrumentingVisitableURLClassLoader (×2) 168,405,360 5.33%

Diagnosis

The dump points at two coupled regressions in Gradle 9.5.0:

  1. compileJava build-operation graph is never released.
    161 CompileJavaBuildOperationReportingCompiler / IncrementalResultStoringCompiler / CurrentCompilationAccess instances — one per task — remain reachable after their tasks finish, each pinning a Guava LocalCache of ClassSetAnalysisData / ClassAnalysis / DependentsSet. Cumulative impact: ~840 MB of ClassSetAnalysisData alone, and 685 MB of BuildOperationState chained to them.
  2. DefaultBuildOperationQueue / TrackedManagedExecutor not draining.
    "Build operations Thread 4" is parked in DefaultWorkerLeaseService.acquireLocks while the executor's LinkedBlockingQueue keeps accumulating runnables (677 MB of LinkedBlockingQueue$Nodes). Combined with (1), every queued op pins another BuildOperationDescriptor chain.

Diagnostics artifact

The CI run for commit e484ca2d uploaded a gradle-daemon-diagnostics artifact (≈1.3 GB compressed, 5.4 GB heap dump) containing:

  • daemon.hprof — heap dump (5.4 GB)
  • gc.log — verbose G1 GC log (rotated)
  • daemon-logs/9.5.0/daemon-2478.out.log — Gradle daemon stdout
  • system-info.txtdf -h / free -m / uname -a

Available for 7 days at https://github.com/open-telemetry/opentelemetry-java-instrumentation/actions/runs/25136630109.

@trask

trask commented Apr 30, 2026

Copy link
Copy Markdown
Member

Reported at gradle/gradle#37753

@github-actions github-actions Bot mentioned this pull request May 5, 2026
@trask trask closed this May 11, 2026
@trask trask deleted the renovate/gradle-9.x branch May 11, 2026 17:12
@renovate

renovate Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (9.5.0). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant