Skip to main content

This version of GitHub Enterprise was discontinued on 2023-01-18. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Exit codes

Exit codes signify the status of a command after the CodeQL CLI runs it.

GitHub CodeQL is licensed on a per-user basis upon installation. You can use CodeQL only for certain tasks under the license restrictions. For more information, see "About the GitHub CodeQL license."

If you have a GitHub Enterprise account and GitHub Advanced Security license, you can use CodeQL for automated analysis, continuous integration and continuous delivery. You can create an enterprise account by contacting the sales team. For more information, see "About GitHub Advanced Security."

Note: This article was migrated from the CodeQL documentation website in January 2023.

About exit codes

The CodeQL CLI reports the status of each command it runs as an exit code. This exit code provides information for subsequent commands or for other tools that rely on the CodeQL CLI.

0

Success, normal termination.

1

The command successfully determined that the answer to your question is ā€œnoā€.

This exit code is only used by a few commands, such as codeql test run, codeql database check, codeql query format,and codeql resolve extractor. For more details, see the documentation for those commands.

2

Something went wrong.

The CLI writes a human-readable error message to stderr. This includes cases where an extractor fails with an internal error, because the codeql driver canā€™t distinguish between internal and user-facing errors in extractor behavior.

3

The launcher was unable to find the CodeQL installation directory.

In this case, the launcher canā€™t start the Java code for the CodeQL CLI at all. This should only happen when something is severely wrong with the CodeQL installation.

32

The extractor didnā€™t find any code to analyze when running codeql database create or codeql database finalize.

33

One or more query evaluations timed out.

Itā€™s possible that some queries that were evaluated in parallel didnā€™t time out. The results for those queries are produced as usual.

98

Evaluation was explicitly canceled.

99

The CodeQL CLI ran out of memory.

This doesnā€™t necessarily mean that all the machineā€™s physical RAM has been used. If you donā€™t use the --ram option to set a limit explicitly, the JVM decides on a default limit at startup.

100

A fatal internal error occurred.

This should be considered a bug. The CLI usually writes an abbreviated error description to stderr. If you can reproduce the bug, itā€™s helpful to use --logdir and send the log files to GitHub in a bug report.

Other

In the case of really severe problems within the JVM that runs codeql, it might return a nonzero exit code of its own choosing. This should only happen if something is severely wrong with the CodeQL installation, or if there is a memory issue with the host system running the CodeQL process. For example, Unix systems may return Exit Code 137 to indicate that the kernel has killed a process that CodeQL has started. One way to troubleshoot this is to modify your ā€“ram= flag for the codeql database analyze step and re-run your workflow.