Ericsson / codechecker

CodeChecker is an analyzer tooling, defect database and viewer extension for static and dynamic analyzer tools.
https://codechecker.readthedocs.io
Apache License 2.0
2.27k stars 383 forks source link

Enormous memory consumption #3951

Open baloghadamsoftware opened 1 year ago

baloghadamsoftware commented 1 year ago

Describe the bug When analyzing a project with ten thousands of source files the analyzis consumes all the memory

CodeChecker version 6.22.1

To Reproduce

  1. Check out the Linux kernel
  2. Create a .config file by executing e.g. 'make menuconfig', then press 'Save' and 'Exit'
  3. Build the kernel while logging it, e.g.: 'CodeChecker log -o linux.json -b 'make -j4'
  4. Analyze the code: 'CodeChecker analyze -o analyzis linux.json'

Expected behaviour Analysis should have started properly. However, it does not happen but all the memory of the computer is consumed by CodeChecker itself (actually the third CodeChecker thread), without starting any analyzer.

Desktop (please complete the following information)

Additional context There are about 60000 files to analyze. When I split the log into 4 equal parts, the analysis starts but my 8Gb of memory is almost consumed by CodeChecker, not the analyzer engines.

Matthieu-Sauer commented 5 months ago

I have the same issue. when analysing a huge codebase (thousands of files or so) on a server, the entire ram gets eaten during the clang-tidy pass and the server crashes. the server has ~200Go of ram, so ram should not be an issue there.