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

Docker Desktop's "resource saver mode" causes WSL to "lock" when AutoMemoryReclaim is set to gradual #11066

Open
1 of 2 tasks
jtabox opened this issue Jan 23, 2024 · 6 comments

Comments

@jtabox
Copy link

jtabox commented Jan 23, 2024

Windows Version

Microsoft Windows [Version 10.0.22621.3007]

WSL Version

2.0.14.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1-1

Distro Version

Ubuntu 22.04

Other Software

Docker Desktop 4.26.1 (131620) - Windows version

Repro Steps

When Docker Desktop is running but is in "Resource Saver" mode, running any command that has to read from the disk will "hang" until I manually "wake up" Docker from its Resource Saver mode (by running a container for example).

I'm not really sure about the "read from disk" part, but it's been the common denominator of commands affected by this (e.g. apt, ls, lsof are all affected, while zsh scripts that are already running or top/htop aren't).

This issue happens when Docker Desktop is running in resource saver mode AND WSL's autoMemoryReclaim is set to gradual.

I've tried the following scenarios and they don't seem to cause the issue:

  • autoMemoryReclaim is set to dropcache
  • autoMemoryReclaim is disabled (commented out in .wslconfig)
  • Docker Desktop is running in its normal mode
  • Docker Desktop isn't running at all

For now I have autoMemoryReclaim set to dropcache, but if you want me to run additional tests or need some other info let me know.

Expected Behavior

Expected the normal command behavior.

Actual Behavior

I've taken a screen recording while the issue happens:

20240123_204049_explorer.mp4

Diagnostic Logs

Those are the corresponding WSL logs for the screen recording:

WslLogs-AutoMemReclaim-Gradual-2024-01-23_20-40-10.zip

Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@briantist
Copy link

I also see this with Ansible commands, even ansible --version. If I restart docker or just run any docker command that contacts the daemon, the hanging commands immediately resume.

@kmoschcau
Copy link

I am also seeing this. I got the hunch that anything accessing the network also hangs, not just what's accessing the file system.

@Max-Sum
Copy link

Max-Sum commented Jun 4, 2024

I am facing the same issue. Maybe related to #10378

@HuaHuaY HuaHuaY mentioned this issue Jun 27, 2024
2 tasks
@cwjacklin
Copy link

same issue here.

it's actually just slowing down the system a lot but not hanging indefinitely.

one can see this if you ran "service --status-all". it takes minutes to list services one by one. if i stop docker desktop, then the command finishes quickly.

@jdblischak
Copy link

My problem is similar but not identical. I am running WSL2 Ubuntu 22.04. I can run ls and even apt list without problem. They complete instantly. However, running sudo apt-get update hangs indefinitely when Docker Desktop is in "Resource Saver mode".

To fix it, all I have to do is click on the Resume button in Docker Desktop. Then sudo apt-get update runs instantly

image

Note that I also confirmed that I do have autoMemoryReclaim=gradual set in ~/.wslconfig

> wsl -v
WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.22631.4037

I also just updated Docker Desktop today, and the problem persists with Docker Desktop 4.33.1 (161083)

$ docker --version
Docker version 27.1.1, build 6312585

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants