Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak/zombie processes on windows #6451

Open
jpambrun opened this issue Feb 7, 2024 · 6 comments
Open

Memory leak/zombie processes on windows #6451

jpambrun opened this issue Feb 7, 2024 · 6 comments
Assignees
Labels
area/utilities Supporting utilities and scripts kind/bug Something isn't working platform/windows runtime/moby

Comments

@jpambrun
Copy link

jpambrun commented Feb 7, 2024

Actual Behavior

My 32gb computer memory gets exhausted in ~24hrs when running docker-desktop. The sum of process memory doesn't add up to the total used. Task manager will show 98% used, but the sum is below 10gb. Meanwhile the computer is unusable. Using rammap.exe, I can see 10,000s of what appears to be zombie docker.exe (and also conhost.exe) process
image

Running pskill yields "Unable to kill process 53764: A process being terminated has no threads to terminate.", for comparison trying to kill non-existing pid yieds "Unable to kill process 345345: Process does not exist.". Reinstalling or rebooting didn't help.

Steps to Reproduce

In my case, just have docker-desktop running. No running container image or docker build is needed to reproduce.

Result

Computer unusable due to ram exhaustion.

Expected Behavior

No that..

Additional Information

No response

Rancher Desktop Version

1.12.3

Rancher Desktop K8s Version

none

Which container engine are you using?

moby (docker cli)

What operating system are you using?

Windows

Operating System / Build Version

windows 11

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

None

Windows User Only

sentinel, twingate

@jpambrun jpambrun added the kind/bug Something isn't working label Feb 7, 2024
@mook-as
Copy link
Contributor

mook-as commented Feb 8, 2024

Hi!

Are you able to see those zombies in Process Explorer? If yes, can you share their command line (if available)? Otherwise, we may need to try using procmon.exe (filter only for process name docker.exe, and show only Process & Thread Activity) to see what the command line is.

Just to double check, do you have any extensions installed? (In case those are spawning docker.exe; it's also quite possible that it's something Rancher Desktop is doing internally.)

@jpambrun
Copy link
Author

jpambrun commented Feb 9, 2024

Hi, thanks for getting back to me. I uninstalled and re-installed and it doesn't occur anymore. It didn't show in processexplorer. The only suspicious thing I could across task manager/process explorer/rammap was in rammap. Otherwise there was no trace of where the missing memory went (and even the rammap the long list doesn't really isn't solid evidence).

I didn't know about procmon. If this ever occurs again I will try to get some insight on why docker.exe was launched so many times. I am closing this issues in the meantime.

@jpambrun jpambrun closed this as completed Feb 9, 2024
@jpambrun-vida
Copy link

@mook-as and if anyone else stumble on this issue. Using procmon I could determine that it's VScode invoking docker.exe context ls about every second. Disabling the "Dev containers" extension makes it stop.

I am still not sure if something is wrong with the docker version supplied in rancher-desktop or with the extension. Running while true; do docker.exe context ls --format json ; done didn't seem to reproduce (not before I lost patience anyway). I don't use this vscode extension so I have pretty much exhausted my motivation to chase this.

@jpambrun-vida
Copy link

BTW, the docker demon nor rancher-desktop has to be running for this issue to manifest itself.

@mook-as
Copy link
Contributor

mook-as commented Feb 12, 2024

That sounds interesting; it sounds like VSCode is not cleaning up properly from invoking docker.exe context ls, then; I had expected the issue to be us holding on to (the process handle for) docker.exe on exit. Maybe VSCode is doing that instead; but in that case, there wouldn't be anything we could fix from our end.

@jandubois
Copy link
Member

@mook-as Can you check if this might be something specific to our docker.exe version. I can't think of anything off-hand, but there are other open issues with docker.exe and stdout/stderr handling, so maybe that is somehow related?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/utilities Supporting utilities and scripts kind/bug Something isn't working platform/windows runtime/moby
Projects
None yet
Development

No branches or pull requests

4 participants