Severe memory leak in bdservicehost.exe - 100% repro
Hello,
I'm seeing a 100% repro memory leak in bdservicehost.exe
that can be reproduced reliably after a reboot. I run on Windows 11 version 22H2, on a 8C/16HT Ryzen7 machine with 16GB RAM. Using Bitdefender Total Security, bdservicehost.exe
file version is 26.0.28.92.
To repro it simply takes to build & run the LLVM unit tests. After the run, it can be observed that Bitdefender takes almost 13GB of commit. A second run of the LLVM unit tests kills the machine to a point where the tests don't complete or fail abnormally, and the machine becomes unresponsive.
To repro:
- Install Visual Studio 2022 Community Edition
- Install the latest Windows SDK - Windows app development | Microsoft Developer
- Open a "x64 native tools command prompt for VS 2022" and install the scoop package manager by following the steps here: Scoop
- Then,
scoop install cmake ninja python git
- Then get LLVM,
git clone --config core.autocrlf=false https://github.com/llvm/llvm-project.git
- Then,
cd llvm-project && mkdir build && cd build
- Then,
cmake -GNinja ../llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_PROJECTS="llvm;clang;lld;clang-tools-extra;mlir" -DLLVM_ENABLE_ASSERTIONS=ON
- Then,
ninja check-all
After everything is compiled, and while the LLVM tests are running, observe in Process Explorer how the "Private Bytes" of
bdservicehost.exe
is increasing monotonically. I think the whole situation is caused by the large number of processes that the LLVM tests are starting. Adding an exception for this specific folder does not solve the issue.@Flexx are you able to help here please? Thanks a lot in advance.
Comments
-
I was unable to reproduce the same issue.
Maybe the bitdefender developers can have a look into this.
Generate bitdefender support tool logs (https://www.bitdefender.com/consumer/support/answer/1733/)
Generate bitdefender connectivity logs (https://www.bitdefender.com/consumer/support/answer/9689/)
Share the logs & your query with bitdefender support team by dropping them an email at bitsy@bitdefender.com
The support team will reply back to your query within next 24-48 hours excluding weekends.
Regards
Life happens, Coffee helps!
Show your Attitude, when you reach that Altitude!
Bitdefender Ultimate Security Plus (user)
2 -
Hello @aganea ,
Which instance of bdservicehost is : services\bdshieldsrv_config.json (vsserv) or services\bdauxsrv_config.json (bdauxsrv) ?
What are the LLVM tests doing? And in what situation would a user use them?
cheers,
Mike
Intel Core i7-7700 @ 3.60Ghz, 64GB DDR4 || Gigabyte nVIDIA GeForce® GTX 1070 G1 8GB || WD Blue NAND 500GB + 1TB
1 -
@Mike_BD It is the bdshieldsrv instance.
The LLVM tests are running LLVM binaries through python, to exercise a specific situation in the compiler. When using the above
cmake
command, it runs approx. 70,000 tests, each of which can invoke one, or up to several tens of LLVM binaries. I could trace with procmon.exe to see how many PE invocation the tests are triggering, but probably in the range of 300,000-400,000 invocations. For the vast majority those are very short runs (<1sec), the process starts, runs something, and then shuts down.Those are essentially used by LLVM developers, it is not meant for end-users/developers. But I would imagine anyone compiling large C++ codebases like Unreal Engine or Chromium would end up hitting the same issue, if the issue is relative to starting/stopping that many processes.
1 -
@aganea we've managed to repro, thanks a lot for sharing this with us. Indeed, while the situation might be relevant for only a handful of users, it's still relevant for our product as a whole and I confirm dev team is currently working on it.
Intel Core i7-7700 @ 3.60Ghz, 64GB DDR4 || Gigabyte nVIDIA GeForce® GTX 1070 G1 8GB || WD Blue NAND 500GB + 1TB
2