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 system df, Error snapshot not found #6509

Closed
3 tasks done
xiangzhang1 opened this issue Oct 7, 2022 · 8 comments
Closed
3 tasks done

docker system df, Error snapshot not found #6509

xiangzhang1 opened this issue Oct 7, 2022 · 8 comments

Comments

@xiangzhang1
Copy link

  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID: DA02CA0A-13DF-4101-A0BB-2B2640992A9D/20221007192443

Overview

Screen Shot 2022-10-08 at 3 44 16 AM

Screen Shot 2022-10-08 at 3 24 36 AM

Whenever I go to Docker Desktop Dashboard -> Images, the error message "Unable to calculate image disk size" pops up. When running docker system df, I get Error response from daemon: error getting build cache usage: failed to get usage for j3svhcbbl74vqb00pwkqjgj8q: snapshot 98mm1nreuc65eum0wpl436h5t not found. I do not know how to reproduce the problem, but vaguely remember Ctrl-C'ing during apt-get install build-essentials during docker build. While I've only used Docker for <10 containers and <5 hours, somehow I get the feeling that maybe during some failed unsafe transaction, some database integrity is compromised, and docker ends up looking for some snapshot that it didn't get the memo was deleted.

Expected and Actual behavior

  1. Open Docker Desktop Dashboard.
  2. Go to "Images".
    Expected behavior: No error message. Disk usage is shown, just like it was shown 5 minutes ago.
    Actual behavior: Red banner with message "Unable to calculate image disk size". "Last refresh: never".
  3. Run docker system df in Terminal.
    Expected behavior: No error message.
    Actual behavior: Error response from daemon: error getting build cache usage: failed to get usage for j3svhcbbl74vqb00pwkqjgj8q: snapshot 98mm1nreuc65eum0wpl436h5t not found.

Information

  • macOS Version: macOS Monterey 12.6
  • Intel chip or Apple chip: Intel chip
  • Docker Desktop Version: 4.12.0 (85629)

Output of /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check

Starting diagnostics

[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0031: does the Docker API work?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0001: is the application running?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0017: can a VM be started?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0007: is the backend responding?
[PASS] DD0014: are the backend processes running?
[PASS] DD0008: is the native API responding?
[PASS] DD0009: is the vpnkit API responding?
[PASS] DD0010: is the Docker API proxy responding?
[PASS] DD0012: is the VM networking working?
[PASS] DD0032: do Docker networks overlap with host IPs?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0019: is the com.docker.vmnetd process responding?
[PASS] DD0033: does the host have Internet access?
No fatal errors detected.

Steps to reproduce the behavior

I am unable to reproduce the unclean behavior cleanly. Since the problem is with the Docker daemon and not with any particular image/container, I am unable to provide a Dockerfile.

I was unable to fix it by restarting my laptop, but was able to fix it by going to Debug -> Clean / Purge data.

@trungutt
Copy link

Hi @xiangzhang1, thanks for detailed explanation. Effectively, Images screen makes that docker system df call behind the scene, and that call failed for several different reasons for our users. I guess you have Buildkit option enabled (Docker Desktop > Settings > Docker Engine)? I'll try go get an answer from our internal team

@xiangzhang1
Copy link
Author

Yes, Buildkit was enabled. Actually, I was not even aware of those default options. Personally I am not necessarily in need of an answer or a solution (especially since I've reset my local installation of Docker), and mostly only wished to report the incident.

@jayDevel
Copy link

I had the same problem which was the result of a lack of space on my disk. This corrupted my docker image cache, even when there was enough disk space afterwards. My solution was a complete removal of the cache and starting from scratch.

@KulykDmytro
Copy link

KulykDmytro commented Dec 3, 2022

Have faced with same stuff, when occasionally ran out of disk space (v4.14.1)

@JHooper-bsl
Copy link

JHooper-bsl commented Feb 9, 2023

I have this issue also, however I'm running on windows and my ssd has space, but I keep getting docker running out of disk space during builds - I think the build cache isn't getting used properly and resulting in 30+GB caches that don't get reused for some reason.

I am also unable to run a docker system df I did a docker system prune -a and that hasn't fixed this issue.

My local docker config has a 104GB virtual disk limit and I'm running docker desktop 4.16.3 (96739).
I had to do a factory reset to fix.

@thaJeztah
Copy link
Member

@jedevc can this be related to moby/buildkit#3605 / moby/moby#44943 ? (don't think so though, as desktop is not yet on buildkit 0.10 / 0.11?)

@jedevc
Copy link

jedevc commented Feb 9, 2023

This looks the same as moby/buildkit#3599 to me.

As raised on the community slack here:

@crazy-max: probably related to moby/buildkit#3595
...
Ok then it's related to this issue. I guess you're using the default builder. What's the output of docker buildx ls?

@docker-robott
Copy link
Collaborator

There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

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

No branches or pull requests

8 participants