eclipse / steady

Analyses your Java applications for open-source dependencies with known vulnerabilities, using both static analysis and testing to determine code context and usage for greater accuracy. https://eclipse.github.io/steady/
Apache License 2.0
517 stars 124 forks source link

eady.shared.util.MemoryMonitor - Memory consumption #578

Closed momo-tong closed 1 year ago

momo-tong commented 1 year ago

I got the error 2022-10-14 11:39:53,657 [vulas-memo] [INFO ] eady.shared.util.MemoryMonitor - Memory consumption (used/avg): [373.40 MB/370.02 MB], JVM (free/total/max): [954.60 MB/1328.00 MB/3944.00 MB] when i usejava -jar steady-cli-3.2.4-jar-with-dependencies.jar -goal app. However, I run this command for several projects after installing steady. Can you tell me the reason about this question and how to solve it. By the way, i can't find the log of steady.

The environment: CPU&MEMORY: 4 Core(vCPU)16 GiB OPERATING SYSTEM: Ubuntu 18.04 64bit

Error:

2022-10-14 11:36:49,747 [main] [INFO ] kend.requests.BasicHttpRequest - HTTP GET completed with response code [404] in [00.003 ms] (proxy=false)
2022-10-14 11:36:49,748 [main] [INFO ] kend.requests.BasicHttpRequest - HTTP POST [uri=http://localhost:8033/backend/libs?skipResponseBody=true, size=722.86 KB, tenant=603EFBA1**2597E6D0, space=D6680BC**2979E1]
2022-10-14 11:36:53,468 [main] [INFO ] kend.requests.BasicHttpRequest - HTTP POST completed with response code [201] in [03.719 ms] (proxy=false)
2022-10-14 11:36:53,474 [main] [INFO ] kend.requests.BasicHttpRequest - HTTP GET [uri=http://localhost:8033/backend/libs/1506F71C676067657C80349D7DEBE9DB15A21F20, tenant=603EFBA1**2597E6D0, space=D6680BC**2979E1]
2022-10-14 11:36:53,477 [main] [INFO ] kend.requests.BasicHttpRequest - HTTP GET completed with response code [404] in [00.002 ms] (proxy=false)
2022-10-14 11:36:53,478 [main] [INFO ] kend.requests.BasicHttpRequest - HTTP POST [uri=http://localhost:8033/backend/libs?skipResponseBody=true, size=64.75 KB, tenant=603EFBA1**2597E6D0, space=D6680BC**2979E1]
2022-10-14 11:36:53,649 [vulas-memo] [INFO ] eady.shared.util.MemoryMonitor - Memory consumption (used/avg): [372.90 MB/365.69 MB], JVM (free/total/max): [955.10 MB/1328.00 MB/3944.00 MB]
2022-10-14 11:37:53,652 [vulas-memo] [INFO ] eady.shared.util.MemoryMonitor - Memory consumption (used/avg): [372.90 MB/368.10 MB], JVM (free/total/max): [955.10 MB/1328.00 MB/3944.00 MB]
2022-10-14 11:38:53,655 [vulas-memo] [INFO ] eady.shared.util.MemoryMonitor - Memory consumption (used/avg): [372.90 MB/369.30 MB], JVM (free/total/max): [955.10 MB/1328.00 MB/3944.00 MB]
2022-10-14 11:39:53,657 [vulas-memo] [INFO ] eady.shared.util.MemoryMonitor - Memory consumption (used/avg): [373.40 MB/370.02 MB], JVM (free/total/max): [954.60 MB/1328.00 MB/3944.00 MB]

docker images

REPOSITORY                          TAG                 IMAGE ID            CREATED             SIZE
eclipse/steady-kb-importer          3.2.4               7eabf23fa9c0        5 months ago        436MB
eclipse/steady-rest-lib-utils       3.2.4               e6bfd8b31a43        5 months ago        277MB
eclipse/steady-rest-backend         3.2.4               db9c98a63abf        5 months ago        285MB
eclipse/steady-patch-lib-analyzer   3.2.4               34ded6a3fcd8        5 months ago        248MB
eclipse/steady-frontend-bugs        3.2.4               f6977034b7d6        5 months ago        98.1MB
eclipse/steady-frontend-apps        3.2.4               b6b61ec4265d        5 months ago        98.1MB
serenaponta commented 1 year ago

The log you posted is not showing any error. In fact the level of debugging is [INFO], the MemoryMonitor provides statistics about the memory consumption and it's printed whenever the ongoing operation takes several seconds/minutes.

From the log snippet it looks like you are running the app goal and libraries are uploaded (POSTed) to the backend. Every time the client encounters a library that the backend does not already know, it uploads all of its constructs and thus the POST request can take some time for bigger libraries (e.g., having ~20k constructs). As a result a longer runtime is expected when no libraries already exist in the backend. It should be enough to let it run.