-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Perform Codeql analysis error #1461
Comments
Exit code 137 means the process was terminated by receiving a Unfortunately there's no direct way to control how much RAM the "dataset import" phase of database construction will take. Analysis of larger codebases will just need proportionally more RAM. If you're using a Also check if the machine is running other RAM-heavy things in parallel -- for example if the Python analysis is still running, or if your self-hosted runner runs different tasks together. |
@hmakholm am using github action for codeql. Is there any way to control memory usage via action workflow script |
Unfortunately there's no current way to configure this phase to use less memory. If you were running the CodeQL CLI directly rather than through Without this option, the JVM will default to using up to 1/4 of whatever the OS says the physical memory size is, so if it's the only thing that is running, you shouldn't be seeing into OOM killer trouble. If you're running the self-hosted runner in a virtualized environment, the memory-size reporting might be sufficiently off to fool Java, but I haven't heard of that being a common problem. |
Scratch that -- The relevant engineering team tells me that we do have an undocumented way to do this: In the workflow block that runs the
replacing Some trial and error may be necessary to find a value that has a chance of working -- it you set it too low for the codebase you're analyzing, the same phase may instead terminate with an explicit, internally generated "out of memory" condition. |
Correct me if I'm wrong but for -Xmx1234 the value set by default is in bytes, not megabytes. |
That's correct. |
Could I get some clarification as to who "we" refers to here? Are users supposed to set this flag, or is it supposed to be done in the action? |
The CodeQL Action has its own way of determining how much memory to use, based on the total amount of memory in the system. in 99.5% of the cases, this is good enough and you don't need to set the memory yourself explicitly. If you are running out of memory, you can set the So, in this case "we" refers to the user. |
try increasing the memory that codeql is allowed to use; see github/codeql-action#1461 Change-Id: Iafa226884c632f5cee31769813951bc0af56a128
I tried doing this in cooljeanius/apple-gdb-1824@b559d98, but it doesn't seem to have worked... |
Update: looks like doubling the |
The image you are using only has 16GB of ram, so adding the extra option bumped the requested amount of ram over the physical ram that's available. You could try using an |
While performing codeql analysis am getting below error
A fatal error occurred: Dataset import for /home/devops/actions-runner-uat/_work/_temp/codeql_databases/javascript/db-javascript failed with code 137.
Error: The process '/home/devops/actions-runner-uat/_work/_tool/CodeQL/0.0.0-20220615/x64/codeql/codeql' failed with exit code 2
it's a python based application with some javascript lib files , while performing code-scanning python is working fine but when it comes to javascript it fails .
To perform this scanning am using linux based self-hosted runner .
I dont have idea why does this happens. please let me know any solutions.
The text was updated successfully, but these errors were encountered: