Repository navigation
Closed
github/codeql
#6012Description
Hi,
I have failure in the codeql-action, it has failed with an exit code of 100, looking at the docs it says it's likely a bug based on this error code.
This is an open source sample project, so all open.
The recent addition made as you can see from the PR is I've added Pulumi for its Azure infrastructure provisioning.
I think it start to look at Pulumi here:
Running TRAP import for CodeQL database at /home/runner/work/_temp/codeql_databases/csharp...
Running TRAP import for CodeQL database at /home/runner/work/_temp/codeql_databases/csharp...
Pulumi.AzureNative.dll.trap.gz, 9885761: java.lang.OutOfMemoryError: Java heap space
and then slowly goes wrong and fails, out of memory.
Here is the codeql workflow run here:
https://github.com/peteking/Samples.WeatherForecast-Part-11/pull/1/checks?check_run_id=2738620747
Part of the log is here for quick reference:
Finalizing csharp
/opt/hostedtoolcache/CodeQL/0.0.0-20210517/x64/codeql/codeql database finalize --threads=2 /home/runner/work/_temp/codeql_databases/csharp
Running pre-finalize script /opt/hostedtoolcache/CodeQL/0.0.0-20210517/x64/codeql/csharp/tools/pre-finalize.sh in /home/runner/work/Samples.WeatherForecast-Part-11/Samples.WeatherForecast-Part-11.
Running pre-finalize script /opt/hostedtoolcache/CodeQL/0.0.0-20210517/x64/codeql/csharp/tools/pre-finalize.sh in /home/runner/work/Samples.WeatherForecast-Part-11/Samples.WeatherForecast-Part-11.
[2021-06-03 15:44:36] [build-stderr] Scanning for files in /home/runner/work/Samples.WeatherForecast-Part-11/Samples.WeatherForecast-Part-11...
[2021-06-03 15:44:36] [build-stderr] Scanning for files in /home/runner/work/Samples.WeatherForecast-Part-11/Samples.WeatherForecast-Part-11...
[2021-06-03 15:44:36] [build-stderr] /home/runner/work/_temp/codeql_databases/csharp: Indexing files in in /home/runner/work/Samples.WeatherForecast-Part-11/Samples.WeatherForecast-Part-11...
[2021-06-03 15:44:36] [build-stderr] /home/runner/work/_temp/codeql_databases/csharp: Indexing files in in /home/runner/work/Samples.WeatherForecast-Part-11/Samples.WeatherForecast-Part-11...
[2021-06-03 15:44:36] [build-stderr] /home/runner/work/_temp/codeql_databases/csharp: Running in /home/runner/work/Samples.WeatherForecast-Part-11/Samples.WeatherForecast-Part-11: [/opt/hostedtoolcache/CodeQL/0.0.0-20210517/x64/codeql/xml/tools/index-files.sh, /home/runner/work/_temp/codeql_databases/csharp/working/files-to-index16194344738812882790.list]
[2021-06-03 15:44:36] [build-stderr] /home/runner/work/_temp/codeql_databases/csharp: Running in /home/runner/work/Samples.WeatherForecast-Part-11/Samples.WeatherForecast-Part-11: [/opt/hostedtoolcache/CodeQL/0.0.0-20210517/x64/codeql/xml/tools/index-files.sh, /home/runner/work/_temp/codeql_databases/csharp/working/files-to-index16194344738812882790.list]
Running TRAP import for CodeQL database at /home/runner/work/_temp/codeql_databases/csharp...
Running TRAP import for CodeQL database at /home/runner/work/_temp/codeql_databases/csharp...
Pulumi.AzureNative.dll.trap.gz, 9885761: java.lang.OutOfMemoryError: Java heap space
com.semmle.inmemory.trap.TrapScanner.getTokenString(TrapScanner.java:521)
com.semmle.inmemory.trap.TrapScanner.getLabelValue(TrapScanner.java:578)
com.semmle.inmemory.trap.TRAPReader.scanOneField(TRAPReader.java:754)
Pulumi.AzureNative.dll.trap.gz, 9885761: java.lang.OutOfMemoryError: Java heap space
com.semmle.inmemory.trap.TRAPReader.scanTuple(TRAPReader.java:495)
com.semmle.inmemory.trap.TrapScanner.getTokenString(TrapScanner.java:521)
com.semmle.inmemory.trap.TRAPReader.scanTuplesAndLabels(TRAPReader.java:439)
com.semmle.inmemory.trap.TrapScanner.getLabelValue(TrapScanner.java:578)
com.semmle.inmemory.trap.TRAPReader.importTuples(TRAPReader.java:376)
com.semmle.inmemory.trap.TRAPReader.scanOneField(TRAPReader.java:754)
com.semmle.inmemory.trap.ImportTasksProcessor.process(ImportTasksProcessor.java:172)
com.semmle.inmemory.trap.TRAPReader.scanTuple(TRAPReader.java:495)
com.semmle.inmemory.trap.ImportTasksProcessor.lambda$null$1(ImportTasksProcessor.java:129)
com.semmle.inmemory.trap.TRAPReader.scanTuplesAndLabels(TRAPReader.java:439)
com.semmle.inmemory.trap.ImportTasksProcessor$$Lambda$234/0x000000010031fc40.accept(Unknown Source)
com.semmle.util.concurrent.FutureUtils.lambda$null$8(FutureUtils.java:136)
com.semmle.util.concurrent.FutureUtils$$Lambda$236/0x000000010031f440.get(Unknown Source)
java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.base/java.lang.Thread.run(Unknown Source)
com.semmle.inmemory.trap.TRAPReader.importTuples(TRAPReader.java:376)
com.semmle.inmemory.trap.ImportTasksProcessor.process(ImportTasksProcessor.java:172)
com.semmle.inmemory.trap.ImportTasksProcessor.lambda$null$1(ImportTasksProcessor.java:129)
com.semmle.inmemory.trap.ImportTasksProcessor$$Lambda$234/0x000000010031fc40.accept(Unknown Source)
com.semmle.util.concurrent.FutureUtils.lambda$null$8(FutureUtils.java:136)
com.semmle.util.concurrent.FutureUtils$$Lambda$236/0x000000010031f440.get(Unknown Source)
java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.base/java.lang.Thread.run(Unknown Source)
Oops! A fatal internal error occurred.
Oops! A fatal internal error occurred.
java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
at com.semmle.util.exception.Exceptions.asUnchecked(Exceptions.java:103)
at com.semmle.inmemory.trap.TrapImporter.run(TrapImporter.java:105)
at com.semmle.cli2.ql.dataset.ImportCommand.executeSubcommand(ImportCommand.java:98)
at com.semmle.cli2.picocli.PlumbingRunner.run(PlumbingRunner.java:110)
at com.semmle.cli2.picocli.SubcommandCommon.runPlumbingInProcess(SubcommandCommon.java:159)
at com.semmle.cli2.database.FinalizeCommand.executeSubcommand(FinalizeCommand.java:110)
at com.semmle.cli2.picocli.SubcommandCommon.call(SubcommandCommon.java:448)
at com.semmle.util.exception.Exceptions.asUnchecked(Exceptions.java:103)
at com.semmle.inmemory.trap.TrapImporter.run(TrapImporter.java:105)
at com.semmle.cli2.ql.dataset.ImportCommand.executeSubcommand(ImportCommand.java:98)
at com.semmle.cli2.picocli.PlumbingRunner.run(PlumbingRunner.java:110)
at com.semmle.cli2.picocli.SubcommandCommon.runPlumbingInProcess(SubcommandCommon.java:159)
at com.semmle.cli2.database.FinalizeCommand.executeSubcommand(FinalizeCommand.java:110)
at com.semmle.cli2.picocli.SubcommandCommon.call(SubcommandCommon.java:448)
at com.semmle.cli2.picocli.SubcommandMaker.runMain(SubcommandMaker.java:201)
at com.semmle.cli2.picocli.SubcommandMaker.runMain(SubcommandMaker.java:209)
at com.semmle.cli2.CodeQL.main(CodeQL.java:96)
Caused by: java.lang.OutOfMemoryError: Java heap space
at com.semmle.cli2.picocli.SubcommandMaker.runMain(SubcommandMaker.java:201)
at com.semmle.cli2.picocli.SubcommandMaker.runMain(SubcommandMaker.java:209)
at com.semmle.cli2.CodeQL.main(CodeQL.java:96)
Caused by: java.lang.OutOfMemoryError: Java heap space
Error: The process '/opt/hostedtoolcache/CodeQL/0.0.0-20210517/x64/codeql/codeql' failed with exit code 100
Error: The process '/opt/hostedtoolcache/CodeQL/0.0.0-20210517/x64/codeql/codeql' failed with exit code 100
at Object.toolrunnerErrorCatcher (/home/runner/work/_actions/github/codeql-action/v1/lib/toolrunner-error-catcher.js:79:19)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Object.finalizeDatabase (/home/runner/work/_actions/github/codeql-action/v1/lib/codeql.js:414:13)
at async finalizeDatabaseCreation (/home/runner/work/_actions/github/codeql-action/v1/lib/analyze.js:74:9)
at async Object.runAnalyze (/home/runner/work/_actions/github/codeql-action/v1/lib/analyze.js:172:5)
at async run (/home/runner/work/_actions/github/codeql-action/v1/lib/analyze-action.js:50:30)
at async runWrapper (/home/runner/work/_actions/github/codeql-action/v1/lib/analyze-action.js:96:9)
Metadata
Metadata
Assignees
Labels
No labels
Activity
RasmusWL commentedon Jun 4, 2021
Hi @peteking, thanks for raising this 👍 We're looking into this, and trying to see if we can find a solution for you 😊
hvitved commentedon Jun 14, 2021
Working on a fix here: github/codeql#6012.
RasmusWL commentedon Jun 16, 2021
@peteking just for your information, the fact that the PR was fixed means that once the action has been updated to include this fix, you should no longer be seeing this. But it might take a bit of time before this happens (sometimes a few weeks)
peteking commentedon Aug 6, 2021
Just an update @RasmusWL - The error is still happening, has PR been merged and released yet? If not, any ETA at all?
edoardopirovano commentedon Aug 11, 2021
This is surprising - the fix has definitely been released quite a while ago. Let me do some investigating of why your issue has not been resolved and I will get back to you.
edoardopirovano commentedon Aug 12, 2021
It looks like the Actions workflow that calls the underlying CodeQL engine was not passing a suitable argument to it in order to allow it it to use the full RAM available on the machine the workflow was being run on. I've opened a PR to have it do that ( #702). I'll let you know once that PR is released so you can verify that this change does indeed resolve your issue 🙂
edoardopirovano commentedon Aug 16, 2021
Greetings @peteking! That PR is now merged and released. Would you be able to try your workflow again and let me know if it is now working?
peteking commentedon Aug 27, 2021
Hi @edoardopirovano, from what I can see, this particular error has been resolved.
However, there is another error, it's different and not error code 100.
I'll open a separate issue for that.
edoardopirovano commentedon Aug 27, 2021
Hi @peteking, glad to hear this error has been resolved, and I'm sorry you're still experiencing issues. Looking at your config file, it seems that you are running queries from the
@mainbranch of thecodeqlrepo. This is not recommended as that branch of the repo can contain changes to queries that are not compatible with released versions of the CodeQL Action and CLI. I believe this is the cause of the new error you are encountering - I suggest you change@mainto@codeql-cli/v2.5.9(we released 2.6.0 a couple of days ago, but the Action hasn't been updated to use this yet so 2.5.9 is a safer bet for now).I'm going to close this issue now as the problem you originally reported has now been resolved. Do feel free to open another issue if my suggestion above does not resolve the second error you have encountered.