Skip to content
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

java.lang.OutOfMemoryError: Java heap space on python project analysis #5671

Closed
tassadar81 opened this issue Apr 21, 2023 · 4 comments · Fixed by #5789
Closed

java.lang.OutOfMemoryError: Java heap space on python project analysis #5671

tassadar81 opened this issue Apr 21, 2023 · 4 comments · Fixed by #5789
Assignees
Labels

Comments

@tassadar81
Copy link

Describe the bug
java.lang.OutOfMemoryError: Java heap space

Version of dependency-check used
The problem occurs using version 8.2.1 and previous version of the command line version

Log file
When reporting errors, 99% of the time log file output is required. Please post the log file

To Reproduce
analyze a project with this dependency /site-packages/cmake/data/share/cmake-3.26/Modules/FindFLTK2.cmake' (CMake Analyzer): Java heap spac

@tassadar81 tassadar81 added the bug label Apr 21, 2023
@jeremylong
Copy link
Owner

Maybe try increasing the heap space?

export JAVA_OPTS="-Xms6144m -Xmx6144m -XX:NewSize=256m -XX:MaxNewSize=356m -XX:PermSize=256m -XX:MaxPermSize=356m"

@tassadar81
Copy link
Author

@jeremylong i saw it reaching always the maximum possible, last exectution it reached about 22Gibytes of ram on 24 available, so no 6 won't help

@aikebah
Copy link
Collaborator

aikebah commented May 29, 2023

There is indeed a structural flaw in the mechanism to detect selfreferences in the CMakeAnalyzer

...
Removed selfreferencing var FLTK_DIR (with value ${FLTK_INCLUDE_DIR})
Removed selfreferencing var FLTK_INCLUDE_DIR (with value ${FLTK_DIR})
Key FLTK_INCLUDE_PATH encountered
nextKey = FLTK_INCLUDE_PATH
nextKey = FLTK_INCLUDE_DIR
chainsize = 2
nextKey = FLTK_DIR
chainsize = 3
nextKey = FLTK_INCLUDE_DIR
chainsize = 4
nextKey = FLTK_DIR
chainsize = 5
nextKey = FLTK_INCLUDE_DIR
chainsize = 6
nextKey = FLTK_DIR
chainsize = 7
nextKey = FLTK_INCLUDE_DIR
...

as you can see for checking the FLTK_INCLUDE_PATH for circular references (one of the three CMake variables triggering an OoM condition) it is traversing the circular variable references of FLTK_DIR and FLTK_INCLUDE_DIR until it reaches OoM

@nhumblot nhumblot self-assigned this Jun 21, 2023
@nhumblot
Copy link
Collaborator

Hi 👋

I'm sorry for this, this is due to a logic flaw in the method detecting self referencing variables I implemented a year ago. I have a fix on my workstation and will provide a PR soon.

nhumblot added a commit that referenced this issue Jun 21, 2023
…nite loop leading to an OutOfMemoryError
nhumblot added a commit that referenced this issue Jun 21, 2023
nhumblot added a commit that referenced this issue Jun 21, 2023
…an infinite loop leading to an OutOfMemoryError
aikebah added a commit that referenced this issue Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants