ObjectExplorer icon indicating copy to clipboard operation
ObjectExplorer copied to clipboard

RamMap "zombie" processes?

Open huyz opened this issue 1 year ago • 6 comments

RamMap shows that I currently have a huge Page Table of several GBs; looking at the Processes, sorting by name, as suggested by https://superuser.com/questions/782855/why-does-my-page-table-take-up-so-much-memory/1499539#1499539 , reveals that I have thousands of sshd.exe, pwsh.exe, cmd.exe, conhost.exe, docker.exe, com.docker.cli.exe leftover processes.

Would it make sense for these to show up in ObjectExplorer too?

huyz avatar Jun 09 '24 22:06 huyz

Yes, these would show in System/Zombie Processes (most likely)

zodiacon avatar Jun 09 '24 22:06 zodiacon

Ah ok, well only a few are showing up when I'm expecting thousands. Hmm, I wonder why that is.

huyz avatar Jun 10 '24 08:06 huyz

It's possible (although rare) that the processes are held alive because of kernel references rather than handles. Object Explorer looks for handles to processes who are "dead" as far as code execution is concerned. Also check out "Zombie threads" - these might keep zombie processes alive.

zodiacon avatar Jun 10 '24 13:06 zodiacon

Yeah they're not in Zombie threads either.

I don't know enough about kernel internals to know how kernel references relate to the Page Table, but certainly these processes are preventing the Page Table from shrinking from 14GB to 50MB in my case.

huyz avatar Jun 10 '24 13:06 huyz

Something else may be going on here. Best to generate a kernel dump and investigate.

zodiacon avatar Jun 10 '24 13:06 zodiacon

This thread gives more details: https://learn.microsoft.com/en-us/archive/msdn-technet-forums/0b610346-fc53-4b39-8cfd-9737d265c3f4

This issue normally happens due to Zombie Processes. Some process does not destory the process handle to another process when it exits. That orphan process handles takes Memory and shown in the RAMMAP with 20KB Total size. Normal way to troubleshoot the issue is take a Memory Dump and analyse the dump in Windbg.

This is an age-old problem with Windows apparently.

huyz avatar Jun 16 '24 08:06 huyz