[ 
https://issues.apache.org/jira/browse/SOLR-16634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17680030#comment-17680030
 ] 

Michael Gibney commented on SOLR-16634:
---------------------------------------

Yeah, you really have to run localSettings first. Expecting a full initial 
build/test on a clean checkout is definitely going to have issues. I think 
we're all on the same page with that now; in which case I think the "on fresh 
clone" in the current issue title ("'gradlew check' fails with OOM on fresh 
clone") is confusing the situation.

Ishan, assuming you're now attempting a full build/test _after_ having 
generated {{gradle.properties}}, I wonder if there could be a remaining issue 
that we need (to some extent) to scale {{org.gradle.jvmargs=-Xmx1g}} according 
to the settings of {{org.gradle.workers.max}} and/or {{tests.jvms}}. These 
latter two are set dynamically according to available hardware:

{code}
        // Approximate a common-sense default for running gradle/tests with 
parallel
        // workers: half the count of available cpus but not more than 12.
        def cpus = Runtime.runtime.availableProcessors()
        def maxWorkers = (int) Math.max(1d, Math.min(cpus * 0.5d, 12))
        def testsJvms = (int) Math.max(1d, Math.min(cpus * 0.5d, 12))
{code}

So if you have a ton of available processors, you could have up to 12x 
parallelization, and depending on how that affects the top-level gradle memory 
requirements, maybe some dynamic adjustment is necessary?


> "gradlew check" fails with OOM on fresh clone
> ---------------------------------------------
>
>                 Key: SOLR-16634
>                 URL: https://issues.apache.org/jira/browse/SOLR-16634
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Ishan Chattopadhyaya
>            Priority: Major
>
> I have a 64GB machine, where a fresh Solr clone was done. "gradlew check" 
> failed with this following:
> https://issues.apache.org/jira/browse/SOLR-15616?focusedCommentId=17679832&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17679832
> {code}
> [ishan@7980xe solr] $ ./gradlew check -x test -Pvalidation.errorprone=true
> Downloading gradle-wrapper.jar from 
> https://raw.githubusercontent.com/gradle/gradle/v7.6.0/gradle/wrapper/gradle-wrapper.jar
> To honour the JVM settings for this build a single-use Daemon process will be 
> forked. See 
> https://docs.gradle.org/7.6/userguide/gradle_daemon.html#sec:disabling_the_daemon.
> Daemon will be stopped at the end of the build 
> > Task :localSettings
> IMPORTANT. This is the first time you ran the build. I wrote some sane 
> defaults (for this machine) to 'gradle.properties', they will be picked up on 
> consecutive gradle invocations (not this one).
> Run gradlew :helpLocalSettings for more information.
> > Task :rat
> Trying to override old definition of task javadoc
> > Task :solr:solrj:compileJava
> Note: Some input files use or override a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> > Task :solr:solrj-streaming:compileJava
> Note: Some input files use or override a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> > Task :solr:solrj-zookeeper:compileJava
> Note: Some input files use or override a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> FAILURE: Build failed with an exception.
> * What went wrong:
> Gradle build daemon has been stopped: JVM garbage collector thrashing and 
> after running out of JVM memory
> * Try:
> > Run with --stacktrace option to get the stack trace.
> > Run with --info or --debug option to get more log output.
> > Run with --scan to get full insights.
> * Get more help at https://help.gradle.org
> {code}
> For context, [~krisden] has attributed this to user error: 
> https://issues.apache.org/jira/browse/SOLR-15616?focusedCommentId=17679837&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17679837
> Please also note that "gradlew localSettings" also resulted in a subsequent 
> OOM failure (details here: 
> https://issues.apache.org/jira/browse/SOLR-15616?focusedCommentId=17679841&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17679841)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to