microsoft / Windows-Dev-Performance

A repo for developers on Windows to file issues that impede their productivity, efficiency, and efficacy
MIT License
438 stars 21 forks source link

netprofm holds on to process handles and leaks zombie processes #65

Open randomascii opened 3 years ago

randomascii commented 3 years ago
Item Value
OS, Version / Build Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0
Processor Architecture AMD64
Processor Type & Model Intel Xeon CPU E5-2690 v3 (2 processors)
Memory 96 GB
Storage Type, free / capacity (e.g. C: SSD 128GB / 512GB) 1 TB SSD, 430 GB free
Relevant apps installed Visual Studio, Chrome, full Chromium repo, Edge Canary, Edge Dev, ???

Description

After using this workstation for a while to develop Chrome I have noticed zombie processes accumulating. This is indicated through increasingly large process IDs and then verified by running FindZombieHandles.exe from an elevated command prompt. This shows:

1115 zombies held by svchost.exe(2496)
    1081 zombies of svchost.exe (process: 1081 - thread: 0)
    20 zombies of MicrosoftEdgeUpdate.exe (process: 20 - thread: 0)
    14 zombies of MicrosoftEdgeUpdate.exe (process: 14 - thread: 0)

Checking with Task Manager shows that svchost.exe(2496) is netprofm, the Network List Service. This machine has been running for twelve days, so roughly 100 zombies generated per day.

Steps to reproduce

Unknown.

Expected behavior

There should be zero zombie processes. Each zombie process consumes roughly 64 KB of kernel memory.

Actual behavior

A non-trivial number of zombie processes where netprofm is holding the process handle of the dead process.

For more details see: https://randomascii.wordpress.com/2018/02/11/zombie-processes-are-eating-your-memory/ FindZombieHandles.exe can be found at https://github.com/randomascii/blogstuff/tree/main/FindZombieHandles

randomascii commented 3 years ago

Note that WmiPrvSE.exe also leaks process handles - 220 random processes. OpenConsole.exe (the new terminal?) has leaked another 99. Other Microsoft processes also leak a few handles but those are the three main ones.

AvriMSFT commented 3 years ago

Hey Bruce! Thanks for filing. I've reached out to the team who owns the process and have filed a bug. I'll update this thread when I hear back from them on potential investigations/solutions/other updates.