Skip to content

Lane memory check on Windows measures the host, not Docker Desktop's VM: a lane that does not fit starts and the engine hangs #309

Closed

Description

@7schmiede

Reported from a downstream Windows machine on 0.24.1 (Docker Desktop with the WSL 2 backend).

What happened

A second lane started on this machine next to the main tree (the pool had no node free, so devstack up --on local). The memory check let it start. A few minutes later the Docker engine stopped answering: docker ps and docker version hung, the engine pipe returned 500 Internal Server Error, and every container of the main tree and the lane became unreachable (databases timed out in the pre-login handshake). Only a restart of Docker Desktop brought it back.

Why the check let it through

memory_fits (crates/devstack-daemon/src/api.rs) compares the lane's need with devstack_proc::memory_available(), which on Windows is GlobalMemoryStatusEx, the host's free memory. The containers do not run in that memory but in Docker Desktop's VM, which has its own limit:

measured value
host, free (GlobalMemoryStatusEx) ~36 GB
Docker VM, total (docker info --format '{{.MemTotal}}') 31.3 GiB
the lane's need as the pool measured it ("most of its last 5 runs") 19.3 GiB
main tree, running at the same time about the same stack

Main tree plus lane do not fit into 31 GiB, while the host still reported plenty.

Suggestion

  • When the stack's containers run in a VM (Docker Desktop on Windows and macOS), measure the headroom there: the VM's MemTotal from docker info minus what the running containers use (docker stats --no-stream), or the WSL VM's memory, and check the lane's container part against that. Native services keep the host check.
  • Say which limit refused the lane ("Docker Desktop's VM has 31.3 GiB, the containers of the main tree use …"), and keep --force as the way past it.
  • devstack doctor could show the VM's limit next to the host memory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions