mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[GH-ISSUE #391] bug(overlaybd): failed pause persistence deletes a live disk layer #98
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#98
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Hygge-Gezelligheid on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/kvcache-ai/AgentENV/issues/391
When runtime and pause artifacts are on the same filesystem, OverlayBD restacking puts a disk layer still needed by the live sandbox inside the pause artifact directory. If saving the paused record fails, cleanup deletes this directory and AgentENV resumes the sandbox with a missing disk layer.
Affected component
Orchestrator / sandbox lifecycle
AgentENV version
f9a39636caa3d234bbb96d2406685d7a6d3dabc4(0.2.3), unmodified product source.1.15.1-patch-v1; guest kernel6.1.175.Host environment
7.0.0-30-generic, x86_64, KVM and ublk.ubuntu:24.04sandbox, 1 vCPU, 256 MiB RAM.Operation and configuration
POST /sandboxes/{sandbox_id}/pause. Firecracker process pool disabled; block pool enabled. Complete configuration and launch commands are in the folded reproduction below.Steps to reproduce
ubuntu:24.04using the configuration below.ENOSPCfor exactly one write to the paused-record RocksDB WAL.image.json.Expected behavior
If pause fails and the original sandbox is resumed, its disk layers remain available. A later pause must not fail because cleanup removed a live layer.
Actual behavior
The first pause returns HTTP 500. The sandbox then reports
running, but its liveimage.jsonreferences a deletedsnapshot.commit. Retrying pause fails on that missing file, and the following sandbox lookup returns 404.The fault spans three code paths:
persist_paused()deletesartifact_rootwhenput_record()fails, removing that same layer.sandbox.resume()without restoring the deleted layer.Logs and diagnostics
First failure:
persist paused sandbox record: put RocksDB value/No space left on device.Retry:
link or copy runtime overlaybd layerfails because the referencedsnapshot.commitno longer exists. Full sanitized output is folded below.Reproduction frequency
Once with the supplied real KVM reproduction. The normal pause/resume control passed; the injector recorded exactly one failed write.
Regression information
Confirmed at the commit above. The introducing commit and last known good version are unknown.
Additional context
Complete reproduction: build and launch commands, two source files, result and logs
Use an empty dedicated test server with working KVM, OverlayBD, ublk and network setup. Prepare the runtime dependencies named below, including the tools image. Choose an unused API port and network ranges. The script creates and removes its own test sandboxes; stop the dedicated server after it finishes.
Build, configuration and launch commands
fail_db_write.c
reproduce.py
Observed result
Relevant logs
Pre-submission checklist