VM can go to sleep as idle during a long /containers/create (first run of a large image): "the VM stopped"
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- docker, linux, rust
- Domain
- backend, distributed-systems
Research direction
Start with api.rs and trace how /containers/create interacts with touch(), start_sleeper, sleep_if_idle, awake_needed(), and hold_awake(). Compare the existing native build hold with the create and load request paths. Define the expected behavior as keeping the VM awake for the duration of a long request, then check relevant tests or add coverage for that lifecycle; linked pull request #1141 indicates work is already underway.
Written by the indexing model from the issue text.
Description
Kiri version and system
Kiri 0.3.0, Windows 11 (build 26300), WSL 2.
What you did
docker load of a 74-layer image (5.6 GB tar), then docker run --rm on it, with no other container running. The first run has to unpack the layers, which takes more than 60 s here.
What happened (seen once)
docker: Error response from daemon: the VM stopped
08:38:27.499Z INFO VM booted ms=59 cpus=20 memory_mib=2961
08:39:37.659Z ERROR request failed method=POST path=/containers/create status=500
08:39:37.711Z INFO VM asleep: idle; the next request wakes it idle_s=60
Keeping a small container running (docker run -d alpine sleep 1200) and repeating the run worked.
What you expected instead
A request in progress keeps the VM awake.
Anything else
I could not reproduce it in 5 later attempts (65–88 s each), but the kiri-build0 BuildKit container existed in all of them (running, paused, or started again by itself) and the VM never slept, so they are not a clean control.
From reading main (6d0c7a5): touch() runs only when a request starts (api.rs), start_sleeper/sleep_if_idle look at running containers, execs and awake_needed(), and hold_awake() is taken by native builds but not by /containers/create. The comment on hold_awake() describes the same gap for builds, so a hold around create (and other long requests such as load) may be enough.
- Dominant language
- Rust
- Stars
- 7.5k
- Forks
- 329
- Avg merge
- 8h 54m
- Merged PRs (30d)
- 426
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from libracoder/kiri
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
libracoder/kiri#1138 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
libracoder/kiri#1143 ·
Maintainers usually reply within 1 day
-
Windows: `kiri storage reclaim` does nothing and reports "Native Linux"Possibly taken @takealook97 claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
libracoder/kiri#1139 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 58/100
libracoder/kiri#1137 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
libracoder/kiri#1136 ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
foundry-rs/starknet-foundry#4733 ·
Maintainers usually reply within 4 days
-
autofix:working
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
roc-lang/basic-webserver#277 ·
Maintainers usually reply within 1 day