github / github/codeql

incorrect outofmemory death

Open
#21,543 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

I run a query like this:
```
../../sources/codeql/codeql query run ./queries/types-flow.ql -d ../../sources/linux-6.12.74/linux-db/ -j0 --ram 10240 > ./results/types-flow.txt
```
I get
```
types-flow.ql: [1/1 eval 4m37s] Failed: Query evaluation ran out of Java heap (Java heap maximum: 2070 MiB).
(eventual cause: OutOfMemoryError "Java heap space")
CodeQL is out of memory. Try increasing the memory available to CodeQL using the --ram option.
make: *** [Makefile:44: types-flow] Error 99
```
Clearly I passed 10GB to `--ram`, why does the error message say that the java heap maximum is 2GB?

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported CodeQL query command with --ram 10240 and capture the memory-related output. Trace how the CLI passes --ram to query evaluation and how the Java heap maximum is selected. Done when the discrepancy is explained and the error reports the relevant configured limit or the behavior is corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.