jdaugherty commented on PR #16631:
URL: https://github.com/apache/grails-core/pull/16631#issuecomment-6379742915

   Root cause of the red lanes, and what changed on the branch.
   
   **Cause.** Every lane that failed died in 
`:grails-data-mongodb-core:compileTestGroovy` with `OutOfMemoryError: Java heap 
space`, and the heap dumps the diagnostic commit uploaded were all the same 
size (1,257 MB) even though `CompilePlugin` asks for `-Xmx2G`. The MongoDB 
modules' shared test scripts (`gradle/mongodb-test-config.gradle`, 
`gradle/mongodb-forked-test-config.gradle`) set 
`groovyOptions.forkOptions.jvmArgs = ['-Xmx768m']` on `compileTestGroovy`. 
Gradle builds the Groovy compiler daemon's command line from the javac-side 
`options.forkOptions.jvmArgs` (where the shared `-Xmx2G` lives) followed by the 
groovy-side list, and the last `-Xmx` wins, so these test compiles ran with a 
768 MB heap while every other module's got 2 GB. Reproduced locally with a GC 
log on the fork: `Heap Max Capacity: 768M`, out of memory at 754 MB live, same 
1,257 MB dump. The module's test sources now need about 1 GB to compile (this 
PR adds two specs, and 8.1.x's merge-up added two more), so a f
 resh compiler fork always dies; a lane passed only when Gradle handed the task 
an idle compiler daemon another task had started with the larger heap, which is 
why the failing lanes moved around between runs.
   
   **Fix.** 428ae475ba removes the override so the shared `-Xmx2G` applies, as 
it does for the other modules (the test forks keep their own `-Xmx1028M`). 
Verified locally: `Heap Max Capacity: 2G`, no full GCs, peak about 1.05 GB, 
compile succeeds. The cap dates from the mono-repo integration (a58aa145cf) and 
is on every release branch, so the same commit is on #16747 against 7.0.x.
   
   **Branch layout.** 67ba541f11 is the feature. 5ed78b9dee (the 
`isDomainClass` cache that pinned every compiled class node) and 428ae475ba are 
compiler/build fixes that ride here only so this PR can go green; both are in 
#16747 and will be dropped from this branch once that merges up to 9.0.x. The 
temporary diagnostic commit is gone.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to