Regex related queries causing out of memory exceptions? #13752
-
After one commit, our CodeQL github action began timing out. I could use some help finding out how to debug what specifically is causing the issue. https://github.com/hapifhir/org.hl7.fhir.core/actions/runs/5509181979 As far as I can tell, this is the code diff at which these timeouts began: hapifhir/org.hl7.fhir.core@do-20230705-codeql-d525281...do-20230710-codeql-284ad1c After some experimentation with the CLI locally, I found three Regex related queries that were all running out of memory, and temporarily removed them: java/polynomial-redos They all produced issues such as the following:
The commit is largely auto-generated code, so it's difficult to figure out what specifically is causing the issue. The amount of code that was added doesn't seem to be excessive:
I'm able to run single instances of these queries, and they either run out of memory, or they do not resolve after many hours: codeql query run --database ~/code-ql-database --output ~/codeql_results.json --threads 20 --ram 11000 /Users/me/.codeql/packages/codeql/java-queries/0.6.4/Security/CWE/CWE-020/OverlyLargeRange.ql |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
Hi @dotasek, Thanks for your question. We rolled out a new version of CodeQL today (2.14.0), would you mind re-trying with that version? I don't think this will actually solve the problem, but I'd like to check this before looping in someone from the relevant engineering team. |
Beta Was this translation helpful? Give feedback.
-
@jketema I have triggered the code check action on the latest version of our repo with debug enabled: https://github.com/hapifhir/org.hl7.fhir.core/actions/runs/5576139508 The logs indicate that it is using the new version (2.14.0)
|
Beta Was this translation helpful? Give feedback.
-
@jketema It looks like the process no longer times out, but instead reports the same out of memory exception: OutOfMemoryError "Java heap space" https://github.com/hapifhir/org.hl7.fhir.core/actions/runs/5576139508/jobs/10187005314 That looks like what was happening with local execution. |
Beta Was this translation helpful? Give feedback.
-
@jketema @erik-krogh thank you! Looking forward to retrying those tests. |
Beta Was this translation helpful? Give feedback.
-
This appears to be live via the GitHub action, and CodeQL now scans through all tests. Thank you very much! |
Beta Was this translation helpful? Give feedback.
This issue should be fixed with the following change: #13916
The fix should appear in a new release in a few weeks.