Out of Memory Error : Heap space error during static code analysis using IntelliJ Inspections Runner

We have been getting OOME Heap space error while trying to run static code analysis using IntelliJ IDEA Inspections Runner on our code base as a team city job.


We are using JVM parameters : -Xmx700m -XX:ReservedCodeCacheSize=340m and JDK 1.8

Any pointers on how to avoid the error would be appreciated.

Stack trace from the logs below.


[12:12:30]Step 1/1: Java Code Inspections (Inspections (IntelliJ IDEA)) (1h:12m:21s)
[12:12:30][Step 1/1] Initialization
[12:12:30][Step 1/1] Starting: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Dagent.home.dir=/opt/buildagent -Dagent.name=ip_10.233.123.143 -Dagent.ownPort=9090 -Dagent.work.dir=/opt/buildagent/work -Dbuild.number=639 -Dbuild.vcs.number=10a1389e2355f94da0a68be2f14f8f7583402898 -Dbuild.vcs.number.1=10a1389e2355f94da0a68be2f14f8f7583402898 -Dbuild.vcs.number.Admin_Sandbox_VcsRootForMaster=10a1389e2355f94da0a68be2f14f8f7583402898 -Didea.build.agent.port=9090 -Didea.config.path=/opt/buildagent/temp/buildTmp/config -Didea.home.path=/opt/buildagent/tools/idea -Didea.jars.nocopy=true -Didea.no.jdk.check=true -Didea.plugins.path=/opt/buildagent/tools/idea/plugins -Didea.system.path=/opt/buildagent/system/.intellij_idea/94cf170f5d69bcb1/94cf170f5d69bcb1/system_mt_build.gradle -Djava.awt.headless=true -Djava.io.tmpdir=/opt/buildagent/temp/buildTmp -Djava.library.path=/opt/buildagent/tools/idea/bin -Dnewlocalvcs.disabled=true -Dteamcity.agent.cpuBenchmark=597 -Dteamcity.agent.dotnet.agent_url=http://localhost:9090/RPC2 -Dteamcity.agent.dotnet.build_id=17474 -Dteamcity.auth.password=******* -Dteamcity.auth.userId=TeamCityBuildId=17474 -Dteamcity.build.changedFiles.file=/opt/buildagent/temp/buildTmp/changedFiles1539290623571488455.txt -Dteamcity.build.checkoutDir=/opt/buildagent/work/94cf170f5d69bcb1 -Dteamcity.build.id=17474 -Dteamcity.build.properties.file=/opt/buildagent/temp/buildTmp/teamcity.build7195868775060078847.properties -Dteamcity.build.tempDir=/opt/buildagent/temp/buildTmp -Dteamcity.build.workingDir=/opt/buildagent/work/94cf170f5d69bcb1 "-Dteamcity.buildConfName=Java Code Inspections" -Dteamcity.buildType.id=IgcMain_CodeAnalysis -Dteamcity.configuration.properties.file=/opt/buildagent/temp/buildTmp/teamcity.config3408300121102910835.properties "-Dteamcity.projectName=Static Code Analysis" -Dteamcity.runner.properties.file=/opt/buildagent/temp/buildTmp/teamcity.runner7092020977969620442.properties -Dteamcity.tests.recentlyFailedTests.file=/opt/buildagent/temp/buildTmp/testsToRunFirst6476470102867219753.txt "-Dteamcity.version=2018.1.1 (build 58406)" -Xmx700m -XX:ReservedCodeCacheSize=340m -classpath /usr/lib/jvm/java-8-openjdk-amd64/lib/tools.jar:/opt/buildagent/tools/idea/lib/bootstrap.jar:/opt/buildagent/tools/idea/lib/extensions.jar:/opt/buildagent/tools/idea/lib/openapi.jar:/opt/buildagent/tools/idea/lib/util.jar:/opt/buildagent/tools/idea/lib/jdom.jar:/opt/buildagent/tools/idea/lib/log4j.jar:/opt/buildagent/tools/idea/lib/trove4j.jar:/opt/buildagent/tools/idea/lib/jna.jar:/opt/buildagent/tools/idea/lib/slf4j-log4j12-1.7.10.jar com.intellij.idea.Main inspect /opt/buildagent/work/94cf170f5d69bcb1/mt/build.gradle project /opt/buildagent/temp/buildTmp/inspection3791619421515338433result -profilePath /opt/buildagent/work/94cf170f5d69bcb1/meta/code-inspection-profiles/intellij-igc-inspection-profile.xml -v3
[12:12:30][Step 1/1] in directory: /opt/buildagent/work/94cf170f5d69bcb1
[12:12:35][Step 1/1] Starting up IntelliJ IDEA 2018.1.4 (build IU-181.5087.20) ...done.
[12:13:10][Step 1/1] Opening project...done.
[12:13:10][Step 1/1] Initializing project...Loaded profile 'IGC-Inspection-Profile' from file '/opt/buildagent/work/94cf170f5d69bcb1/meta/code-inspection-profiles/intellij-igc-inspection-profile.xml'
[12:13:10][Step 1/1] done.
[12:13:10][Step 1/1] Inspecting with profile 'IGC-Inspection-Profile'
[12:13:12][Step 1/1] Processing project usages 0%
[12:13:12][Step 1/1] Processing project usages 1%
[12:13:14][Step 1/1] Processing project usages 2%
[12:13:16][Step 1/1] Processing project usages 3%
[12:13:17][Step 1/1] Processing project usages 4%
[12:13:17][Step 1/1] Processing project usages 5%
[12:13:17][Step 1/1] Processing project usages 6%
[12:13:18][Step 1/1] Processing project usages 7%
[12:13:19][Step 1/1] Processing project usages 8%
[12:13:19][Step 1/1] Processing project usages 9%
[12:13:19][Step 1/1] Processing project usages 10%
[12:13:20][Step 1/1] Processing project usages 11%
[12:13:21][Step 1/1] Processing project usages 12%
[12:13:21][Step 1/1] Processing project usages 13%
[12:13:22][Step 1/1] Processing project usages 14%
[12:13:23][Step 1/1] Processing project usages 15%
[12:13:24][Step 1/1] Processing project usages 16%
[12:13:29][Step 1/1] Processing project usages 17%
[12:13:30][Step 1/1] Processing project usages 18%
[12:13:32][Step 1/1] Processing project usages 19%
[12:13:35][Step 1/1] Processing project usages 20%
[12:13:36][Step 1/1] Processing project usages 21%
[12:13:37][Step 1/1] Processing project usages 22%
[12:13:37][Step 1/1] Processing project usages 23%
[12:13:38][Step 1/1] Processing project usages 24%
[12:13:40][Step 1/1] Processing project usages 25%
[12:13:41][Step 1/1] Processing project usages 26%
[12:13:41][Step 1/1] Processing project usages 27%
[12:13:42][Step 1/1] Processing project usages 28%
[12:13:42][Step 1/1] Processing project usages 29%
[12:13:43][Step 1/1] Processing project usages 30%
[12:13:43][Step 1/1] Processing project usages 31%
[12:13:43][Step 1/1] Processing project usages 32%
[12:13:43][Step 1/1] Processing project usages 33%
[12:13:43][Step 1/1] Processing project usages 34%
[12:13:49][Step 1/1] Processing project usages 35%
[12:13:51][Step 1/1] Processing project usages 36%
[12:13:52][Step 1/1] Processing project usages 37%
[12:13:53][Step 1/1] Processing project usages 38%
[12:13:53][Step 1/1] Processing project usages 39%
[12:13:54][Step 1/1] Processing project usages 40%
[12:13:54][Step 1/1] Processing project usages 41%
[12:13:55][Step 1/1] Processing project usages 42%
[12:13:55][Step 1/1] Processing project usages 43%
[12:13:55][Step 1/1] Processing project usages 44%
[12:13:55][Step 1/1] Processing project usages 45%
[12:13:56][Step 1/1] Processing project usages 46%
[12:13:57][Step 1/1] Processing project usages 47%
[12:13:57][Step 1/1] Processing project usages 48%
[12:13:57][Step 1/1] Processing project usages 49%
[12:13:57][Step 1/1] Processing project usages 50%
[12:13:58][Step 1/1] Processing external usages 40%
[12:13:58][Step 1/1] Processing external usages 41%
[12:13:59][Step 1/1] Processing external usages 42%
[12:13:59][Step 1/1] Processing external usages 43%
[12:13:59][Step 1/1] Processing external usages 44%
[12:13:59][Step 1/1] Processing external usages 45%
[12:13:59][Step 1/1] Processing external usages 46%
[12:13:59][Step 1/1] Processing external usages 47%
[12:14:00][Step 1/1] Processing external usages 48%
[12:14:00][Step 1/1] Processing external usages 49%
[12:14:00][Step 1/1] Processing external usages 50%
[12:14:00][Step 1/1] Processing external usages 51%
[12:14:00][Step 1/1] Processing external usages 52%
[12:14:00][Step 1/1] Processing external usages 53%
[12:14:00][Step 1/1] Processing external usages 54%
[12:14:00][Step 1/1] Processing external usages 55%
[12:14:00][Step 1/1] Processing external usages 56%
[12:14:00][Step 1/1] Processing external usages 57%
[12:14:00][Step 1/1] Processing external usages 58%
[12:14:00][Step 1/1] Processing external usages 59%
[12:14:00][Step 1/1] Processing external usages 51%
[12:14:00][Step 1/1] Processing external usages 52%
[12:14:00][Step 1/1] Processing external usages 53%
[12:14:01][Step 1/1] Processing external usages 54%
[12:14:01][Step 1/1] Processing external usages 55%
[12:14:01][Step 1/1] Processing external usages 56%
[12:14:01][Step 1/1] Processing external usages 57%
[12:14:01][Step 1/1] Processing external usages 58%
[12:14:01][Step 1/1] Processing external usages 59%
[12:14:01][Step 1/1] Processing external usages 60%
[12:14:01][Step 1/1] Processing external usages 61%
[12:14:01][Step 1/1] Processing external usages 62%
[12:14:01][Step 1/1] Processing external usages 63%
[12:14:01][Step 1/1] Processing external usages 64%
[12:14:01][Step 1/1] Processing external usages 65%
[12:14:01][Step 1/1] Analyzing code 66%
[12:14:01][Step 1/1] Analyzing code 67%
[12:14:01][Step 1/1] Analyzing code 67%
[12:14:02][Step 1/1] Analyzing code 68%
[12:14:03][Step 1/1] Analyzing code 69%
[12:14:04][Step 1/1] Analyzing code 70%
[12:14:04][Step 1/1] Analyzing code 71%
[12:14:04][Step 1/1] Analyzing code 72%
[12:14:06][Step 1/1] Analyzing code 73%
[12:14:06][Step 1/1] Analyzing code 74%
[12:14:06][Step 1/1] Analyzing code 75%
[12:14:07][Step 1/1] Analyzing code 76%
[12:14:07][Step 1/1] Analyzing code 77%
[12:14:08][Step 1/1] Analyzing code 78%
[12:14:09][Step 1/1] Analyzing code 79%
[12:14:10][Step 1/1] Analyzing code 80%
[12:14:10][Step 1/1] Analyzing code 81%
[12:14:11][Step 1/1] Analyzing code 82%
[12:14:11][Step 1/1] Analyzing code 83%
[12:14:11][Step 1/1] Analyzing code 84%
[12:14:12][Step 1/1] Analyzing code 85%
[12:14:12][Step 1/1] Analyzing code 86%
[12:14:12][Step 1/1] Analyzing code 87%
[12:14:13][Step 1/1] Analyzing code 88%
[12:14:13][Step 1/1] Analyzing code 89%
[12:14:13][Step 1/1] Analyzing code 90%
[12:14:13][Step 1/1] Analyzing code 91%
[12:14:15][Step 1/1] Analyzing code 92%
[12:14:17][Step 1/1] Analyzing code 93%
[12:14:18][Step 1/1] Analyzing code 94%
[12:14:21][Step 1/1] Analyzing code 95%
[12:14:24][Step 1/1] Analyzing code 96%
[12:14:30][Step 1/1] Analyzing code 97%
[12:14:36][Step 1/1] Analyzing code 98%
[12:14:46][Step 1/1] Analyzing code 99%

[12:50:22][Step 1/1] "ApplicationImpl pooled thread 14" #87 daemon prio=4 os_prio=0 tid=0x00007f5c40007000 nid=0x3267 waiting for monitor entry [0x00007f5c222cc000]
[12:50:22][Step 1/1] java.lang.Thread.State: BLOCKED (on object monitor)

[12:50:22][Step 1/1] "JobScheduler FJ pool 20/24" #71 daemon prio=4 os_prio=0 tid=0x00007f5bf4004000 nid=0x3257 waiting for monitor entry [0x00007f5bcf7f0000]
[12:50:22][Step 1/1] java.lang.Thread.State: BLOCKED (on object monitor)

[12:50:22][Step 1/1] "JobScheduler FJ pool 14/24" #62 daemon prio=4 os_prio=0 tid=0x00007f5c00008800 nid=0x324d waiting for monitor entry [0x00007f5c0820a000]
[12:50:22][Step 1/1] java.lang.Thread.State: BLOCKED (on object monitor)

[12:50:22][Step 1/1] "JobScheduler FJ pool 13/24" #61 daemon prio=4 os_prio=0 tid=0x00007f5c2c00f800 nid=0x324c waiting for monitor entry [0x00007f5c0830b000]
[12:50:22][Step 1/1] java.lang.Thread.State: BLOCKED (on object monitor)

[12:50:22][Step 1/1] "ApplicationImpl pooled thread 14" #87 daemon prio=4 os_prio=0 tid=0x00007f5c40007000 nid=0x3267 waiting for monitor entry [0x00007f5c222cc000]
[12:50:22][Step 1/1] java.lang.Thread.State: BLOCKED (on object monitor)

[12:50:22][Step 1/1] "JobScheduler FJ pool 22/24" #77 daemon prio=4 os_prio=0 tid=0x00007f5bbc001000 nid=0x325d waiting for monitor entry [0x00007f5bcfdf8000]
[12:50:22][Step 1/1] java.lang.Thread.State: BLOCKED (on object monitor)

[12:50:22][Step 1/1] "JobScheduler FJ pool 19/24" #76 daemon prio=4 os_prio=0 tid=0x00007f5bb4001000 nid=0x325c waiting for monitor entry [0x00007f5c085ff000]
[12:50:22][Step 1/1] java.lang.Thread.State: BLOCKED (on object monitor)


[12:12:30][Step 1/1] Starting: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Dagent.home.dir=/opt/buildagent -Dagent.name=ip_10.233.123.143 -Dagent.ownPort=9090 -Dagent.work.dir=/opt/buildagent/work -Dbuild.number=639 -Dbuild.vcs.number=10a1389e2355f94da0a68be2f14f8f7583402898 -Dbuild.vcs.number.1=10a1389e2355f94da0a68be2f14f8f7583402898 -Dbuild.vcs.number.Admin_Sandbox_VcsRootForMaster=10a1389e2355f94da0a68be2f14f8f7583402898 -Didea.build.agent.port=9090 -Didea.config.path=/opt/buildagent/temp/buildTmp/config -Didea.home.path=/opt/buildagent/tools/idea -Didea.jars.nocopy=true -Didea.no.jdk.check=true -Didea.plugins.path=/opt/buildagent/tools/idea/plugins -Didea.system.path=/opt/buildagent/system/.intellij_idea/94cf170f5d69bcb1/94cf170f5d69bcb1/system_mt_build.gradle -Djava.awt.headless=true -Djava.io.tmpdir=/opt/buildagent/temp/buildTmp -Djava.library.path=/opt/buildagent/tools/idea/bin -Dnewlocalvcs.disabled=true -Dteamcity.agent.cpuBenchmark=597 -Dteamcity.agent.dotnet.agent_url=http://localhost:9090/RPC2 -Dteamcity.agent.dotnet.build_id=17474 -Dteamcity.auth.password=******* -Dteamcity.auth.userId=TeamCityBuildId=17474 -Dteamcity.build.changedFiles.file=/opt/buildagent/temp/buildTmp/changedFiles1539290623571488455.txt -Dteamcity.build.checkoutDir=/opt/buildagent/work/94cf170f5d69bcb1 -Dteamcity.build.id=17474 -Dteamcity.build.properties.file=/opt/buildagent/temp/buildTmp/teamcity.build7195868775060078847.properties -Dteamcity.build.tempDir=/opt/buildagent/temp/buildTmp -Dteamcity.build.workingDir=/opt/buildagent/work/94cf170f5d69bcb1 "-Dteamcity.buildConfName=Java Code Inspections" -Dteamcity.buildType.id=IgcMain_CodeAnalysis -Dteamcity.configuration.properties.file=/opt/buildagent/temp/buildTmp/teamcity.config3408300121102910835.properties "-Dteamcity.projectName=Static Code Analysis" -Dteamcity.runner.properties.file=/opt/buildagent/temp/buildTmp/teamcity.runner7092020977969620442.properties -Dteamcity.tests.recentlyFailedTests.file=/opt/buildagent/temp/buildTmp/testsToRunFirst6476470102867219753.txt "-Dteamcity.version=2018.1.1 (build 58406)" -Xmx700m -XX:ReservedCodeCacheSize=340m -classpath /usr/lib/jvm/java-8-openjdk-amd64/lib/tools.jar:/opt/buildagent/tools/idea/lib/bootstrap.jar:/opt/buildagent/tools/idea/lib/extensions.jar:/opt/buildagent/tools/idea/lib/openapi.jar:/opt/buildagent/tools/idea/lib/util.jar:/opt/buildagent/tools/idea/lib/jdom.jar:/opt/buildagent/tools/idea/lib/log4j.jar:/opt/buildagent/tools/idea/lib/trove4j.jar:/opt/buildagent/tools/idea/lib/jna.jar:/opt/buildagent/tools/idea/lib/slf4j-log4j12-1.7.10.jar com.intellij.idea.Main inspect /opt/buildagent/work/94cf170f5d69bcb1/mt/build.gradle project /opt/buildagent/temp/buildTmp/inspection3791619421515338433result -profilePath /opt/buildagent/work/94cf170f5d69bcb1/meta/code-inspection-profiles/intellij-igc-inspection-profile.xml -v3
[


[13:24:46][Step 1/1] [4332211] ERROR - ex.GlobalInspectionContextImpl - In file: graphiql.css
[13:24:46][Step 1/1] java.lang.OutOfMemoryError: Java heap space
[13:24:46][Step 1/1] at org.apache.xerces.xni.XMLString.toString(Unknown Source)
[13:24:46][Step 1/1] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source)
[13:24:46][Step 1/1] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
[13:24:46][Step 1/1] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
[13:24:46][Step 1/1] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
[13:24:46][Step 1/1] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[13:24:46][Step 1/1] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
[13:24:46][Step 1/1] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[13:24:46][Step 1/1] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
[13:24:46][Step 1/1] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
[13:24:46][Step 1/1] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:518)
[13:24:46][Step 1/1] at org.jdom.input.SAXBuilder.build(SAXBuilder.java:946)
[13:24:46][Step 1/1] at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:273)
[13:24:46][Step 1/1] at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:292)
[13:24:46][Step 1/1] at com.intellij.openapi.util.JDOMUtil.load(JDOMUtil.java:304)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.util.table.CssElementDescriptorFactory.doLoadDescriptors(CssElementDescriptorFactory.java:126)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.util.table.CssElementDescriptorFactory.loadDescriptors(CssElementDescriptorFactory.java:90)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.util.table.CssElementDescriptorFactory.reload(CssElementDescriptorFactory.java:53)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.util.table.CssElementDescriptorFactory.getDescriptorsMap(CssElementDescriptorFactory.java:46)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.util.table.CssElementDescriptorFactory.getDescriptor(CssElementDescriptorFactory.java:67)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.util.scheme.CssElementDescriptorProviderImpl.getPropertyDescriptor(CssElementDescriptorProviderImpl.java:56)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.util.table.CssShorthandExpandProcessor$1.visitValue(CssShorthandExpandProcessor.java:103)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.util.table.CssShorthandExpandProcessor$1.visitValue(CssShorthandExpandProcessor.java:93)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.util.table.CssTableValueVisitor$Recursive.visit(CssTableValueVisitor.java:18)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.util.table.CssTableValueBase.accept(CssTableValueBase.java:115)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.util.table.CssTableValueVisitor$Recursive.visit(CssTableValueVisitor.java:21)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.util.table.CssTableValueBase.accept(CssTableValueBase.java:115)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.util.table.CssShorthandExpandProcessor.processReferences(CssShorthandExpandProcessor.java:93)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.util.table.CssShorthandExpandProcessor.getPropertyValue(CssShorthandExpandProcessor.java:77)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.util.table.CssPropertyDescriptorImpl.getShorthandPsiValue(CssPropertyDescriptorImpl.java:115)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.CssDeclarationImpl.getShorthandPsiValue(CssDeclarationImpl.java:171)
[13:24:46][Step 1/1] at com.intellij.psi.css.impl.CssDeclarationImpl.getShorthandValue(CssDeclarationImpl.java:129)
[13:24:46][Step 1/1] [4334172] ERROR - ex.GlobalInspectionContextImpl - In file: graphiql.js
[13:24:46][Step 1/1] java.lang.OutOfMemoryError: Java heap space
[13:24:46][Step 1/1] at com.intellij.openapi.extensions.impl.ExtensionPointImpl.getExtensions(ExtensionPointImpl.java:199)
[13:24:46][Step 1/1] at com.intellij.openapi.extensions.Extensions.getExtensions(Extensions.java:105)
[13:24:46][Step 1/1] at com.intellij.openapi.extensions.Extensions.getExtensions(Extensions.java:98)
[13:24:46][Step 1/1] at com.intellij.openapi.extensions.Extensions.getExtensions(Extensions.java:93)
[13:24:46][Step 1/1] at com.intellij.openapi.extensions.ExtensionPointName.getExtensions(ExtensionPointName.java:35)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.index.FrameworkIndexingHandler.getExtensions(FrameworkIndexingHandler.java:175)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.index.FrameworkIndexingHandler.getExtensions(FrameworkIndexingHandler.java:168)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.psi.impl.JSCallExpressionImpl.shouldCreateStub(JSCallExpressionImpl.java:202)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.types.JSCallExpressionElementType.shouldCreateStub(JSCallExpressionElementType.java:46)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.FileElement$1.visitComposite(FileElement.java:135)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.CompositeElement.acceptTree(CompositeElement.java:131)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor$1.visit(RecursiveTreeElementWalkingVisitor.java:67)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor$1.visit(RecursiveTreeElementWalkingVisitor.java:59)
[13:24:46][Step 1/1] at com.intellij.util.WalkingState.walkChildren(WalkingState.java:65)
[13:24:46][Step 1/1] at com.intellij.util.WalkingState.elementStarted(WalkingState.java:52)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor.visitNode(RecursiveTreeElementWalkingVisitor.java:86)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.FileElement$1.visitComposite(FileElement.java:139)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.CompositeElement.acceptTree(CompositeElement.java:131)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.FileElement.calcStubbedDescendants(FileElement.java:126)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.FileElement.getStubbedSpine(FileElement.java:116)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.PsiFileImpl.getStubbedSpine(PsiFileImpl.java:241)
[13:24:46][Step 1/1] at com.intellij.psi.stubs.StubProcessingHelperBase.lambda$getAllSpines$0(StubProcessingHelperBase.java:76)
[13:24:46][Step 1/1] at com.intellij.psi.stubs.StubProcessingHelperBase$$Lambda$1156/1266311357.fun(Unknown Source)
[13:24:46][Step 1/1] at com.intellij.util.containers.ContainerUtilRt.map2List(ContainerUtilRt.java:393)
[13:24:46][Step 1/1] at com.intellij.util.containers.ContainerUtil.map(ContainerUtil.java:1865)
[13:24:46][Step 1/1] at com.intellij.psi.stubs.StubProcessingHelperBase.getAllSpines(StubProcessingHelperBase.java:76)
[13:24:46][Step 1/1] at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:56)
[13:24:46][Step 1/1] at com.intellij.psi.stubs.StubIndexImpl$2.process(StubIndexImpl.java:319)
[13:24:46][Step 1/1] at com.intellij.psi.stubs.StubIndexImpl$StubIdListContainerAction.perform(StubIndexImpl.java:646)
[13:24:46][Step 1/1] at com.intellij.psi.stubs.StubIndexImpl$StubIdListContainerAction.perform(StubIndexImpl.java:634)
[13:24:46][Step 1/1] at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:61)
[13:24:46][Step 1/1] at com.intellij.psi.stubs.StubIndexImpl.doProcessStubs(StubIndexImpl.java:348)
[13:24:46][Step 1/1] [4334173] ERROR - ex.GlobalInspectionContextImpl - IntelliJ IDEA 2018.1.4 Build #IU-181.5087.20
[13:24:46][Step 1/1] [4334174] ERROR - ex.GlobalInspectionContextImpl - IntelliJ IDEA 2018.1.4 Build #IU-181.5087.20
[13:24:46][Step 1/1] [4334174] ERROR - ex.GlobalInspectionContextImpl - JDK: 1.8.0_151
[13:24:46][Step 1/1] [4334174] ERROR - ex.GlobalInspectionContextImpl - JDK: 1.8.0_151
[13:24:46][Step 1/1] [4334174] ERROR - ex.GlobalInspectionContextImpl - VM: OpenJDK 64-Bit Server VM
[13:24:46][Step 1/1] [4334174] ERROR - ex.GlobalInspectionContextImpl - VM: OpenJDK 64-Bit Server VM
[13:24:46][Step 1/1] [4334174] ERROR - ex.GlobalInspectionContextImpl - Vendor: Oracle Corporation
[13:24:46][Step 1/1] [4334174] ERROR - ex.GlobalInspectionContextImpl - Vendor: Oracle Corporation
[13:24:46][Step 1/1] [4334174] ERROR - ex.GlobalInspectionContextImpl - OS: Linux
[13:24:46][Step 1/1] [4334174] ERROR - ex.GlobalInspectionContextImpl - OS: Linux
[13:24:46][Step 1/1] [4334174] ERROR - ex.GlobalInspectionContextImpl - Last Action:
[13:24:46][Step 1/1] [4334174] ERROR - ex.GlobalInspectionContextImpl - Last Action:
[13:24:46][Step 1/1] [4334180] ERROR - ex.GlobalInspectionContextImpl - In file: voyager.worker.js
[13:24:46][Step 1/1] java.lang.OutOfMemoryError: Java heap space
[13:24:46][Step 1/1] at com.intellij.lang.javascript.psi.util.JSTreeUtil$1.getOrCreateScopeNameUsage(JSTreeUtil.java:101)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.psi.util.JSTreeUtil$1.visitNode(JSTreeUtil.java:81)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor.visitComposite(RecursiveTreeElementWalkingVisitor.java:81)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.CompositeElement.acceptTree(CompositeElement.java:131)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor$1.visit(RecursiveTreeElementWalkingVisitor.java:67)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor$1.visit(RecursiveTreeElementWalkingVisitor.java:59)
[13:24:46][Step 1/1] at com.intellij.util.WalkingState.walkChildren(WalkingState.java:65)
[13:24:46][Step 1/1] at com.intellij.util.WalkingState.elementStarted(WalkingState.java:52)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor.visitNode(RecursiveTreeElementWalkingVisitor.java:86)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.psi.util.JSTreeUtil$1.visitNode(JSTreeUtil.java:75)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor.visitComposite(RecursiveTreeElementWalkingVisitor.java:81)
[13:24:46][Step 1/1] at com.intellij.psi.impl.source.tree.CompositeElement.acceptTree(CompositeElement.java:131)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.psi.util.JSTreeUtil.calcScopeNameUsage(JSTreeUtil.java:71)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.psi.util.JSTreeUtil.lambda$static$0(JSTreeUtil.java:54)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.psi.util.JSTreeUtil$$Lambda$2594/913687352.compute(Unknown Source)
[13:24:46][Step 1/1] at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.java:45)
[13:24:46][Step 1/1] at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
[13:24:46][Step 1/1] at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
[13:24:46][Step 1/1] at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:35)
[13:24:46][Step 1/1] at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:96)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.psi.util.JSTreeUtil.getScopeNameUsage(JSTreeUtil.java:188)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.psi.util.JSTreeUtil.getDeclarationsAndAssignmentsInCodeBlockInner(JSTreeUtil.java:172)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.psi.util.JSTreeUtil.getDeclarationsAndAssignmentsInScope(JSTreeUtil.java:148)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.psi.util.JSTreeUtil.definedInScopeAndUp(JSTreeUtil.java:117)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.psi.impl.JSDefinitionExpressionImpl.calculateSymbolNamespace(JSDefinitionExpressionImpl.java:395)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.psi.impl.JSDefinitionExpressionImpl$1.compute(JSDefinitionExpressionImpl.java:324)
[13:24:46][Step 1/1] at com.intellij.lang.javascript.psi.impl.JSDefinitionExpressionImpl$1.compute(JSDefinitionExpressionImpl.java:321)
[13:24:46][Step 1/1] at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.java:45)
[13:24:46][Step 1/1] at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
[13:24:46][Step 1/1] at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:60)
[13:24:46][Step 1/1] at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:35)
[13:24:46][Step 1/1] at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:96)
[13:24:46][Step 1/1] [4334180] ERROR - ex.GlobalInspectionContextImpl - IntelliJ IDEA 2018.1.4 Build #IU-181.5087.20
[13:24:46][Step 1/1] [4334180] ERROR - ex.GlobalInspectionContextImpl - JDK: 1.8.0_151
[13:24:46][Step 1/1] [4334180] ERROR - ex.GlobalInspectionContextImpl - VM: OpenJDK 64-Bit Server VM
[13:24:46][Step 1/1] [4334180] ERROR - ex.GlobalInspectionContextImpl - Vendor: Oracle Corporation
[13:24:46][Step 1/1] [4334181] ERROR - ex.GlobalInspectionContextImpl - OS: Linux
[13:24:46][Step 1/1] [4334181] ERROR - ex.GlobalInspectionContextImpl - Last Action:
[13:24:48][Step 1/1] Done.
[13:24:50][Step 1/1] Process exited with code 0
[13:24:51][Step 1/1] Out of memory: Java heap space
[13:24:51]Publishing internal artifacts
[13:24:51][Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[13:24:51][Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[13:24:51]Publishing artifacts
[13:24:51][Publishing artifacts] Collecting files to publish: [build/reports/jacoco/jacocoRootReport/html => coverage.zip, rest-api-tests/build/reports/tests/test => apitests.zip]
[13:24:51][Publishing artifacts] Artifacts path 'build/reports/jacoco/jacocoRootReport/html' not found
[13:24:51][Publishing artifacts] Artifacts path 'rest-api-tests/build/reports/tests/test' not found
[13:24:52]Calculating inspections statistics comparing to the build with id 17446 ...
[13:24:53]Total: 2683 (+1894 -32699) Errors: 23 (+19 -4)
[13:24:53]Build finished

0
2 comments

Hi,

 

is there any reason for you to force that amount of memory? You are clearly getting an out of memory error so you would need to increase it.

0
Avatar
Permanently deleted user

I did try to increase the memory but got the same result. 

I have noticed that the OOME always happens with javascript files in a particular directory , so am trying to exclude it during the inspection run.

I have tried various include/exclude patterns but it still fails while analyzing the same files (which means the include/exlcude does not seem to be working).

Can you please help me with the patterns?

Here is my Build Configuration:

 

mt is the root directory under which the main build.gradle exists. 

There are various other directories under mt.

eg. mt/byos, mt/service-lib and so on.

The code inspection is always throwing OOME on certain files under the mt/service-lib directory.

I tried to run it on only the byos directory using the include pattern  :

+:mt/byos/**

It still failed with the same error for graphiql.js which is under mt/service-lib.

Any idea what pattern should I provide to exclude mt/service-lib or to only include a single directory like byos?

I tried  -:service-lib/**  too but got the same result (which means exclude did not work either). 

Is this a bug?

[10:27:59][Step 4/4] [ 444497] ERROR - ex.GlobalInspectionContextImpl - In file: graphiql.js
[10:27:59][Step 4/4] java.lang.OutOfMemoryError: GC overhead limit exceeded
 
 

 

0

Please sign in to leave a comment.