Self-hosted Embed: failed pause or checkpoint loses the sandbox
Maintainer thường phản hồi trong vòng 1 ngày
@svalleru đang làm issue này rồi.
Từ ngày 23/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
On self-hosted Embed, a failed pause or checkpoint can stop the original sandbox and leave no snapshot the SDK can restore. Its files and process state become inaccessible.
Reproduce
Pause: disk sync failure
- Create a sandbox and write a file inside it.
- Call
sandbox.pause(keep_memory=True). - Use
straceto makefsyncreturnEIOfor the rootfs diff file during the pause.
Pause returns 500: Error pausing sandbox; the orchestrator reports failed to sync file: input/output error. Reproduced 2/2 times. Without the injected error, pause/resume preserves files and process memory.
Fault injection command
Attach after the diff file appears and before it is synced (about 1–2 seconds). Replace the path with the actual diff file path; a watcher was used to catch this window.
strace -f -p "$(pgrep -x orchestrator)" -qq -yy \
-P "/orchestrator/build/<build-id>-rootfs.ext4-<random-suffix>" \
-e trace=fsync,fdatasync \
-e inject=fsync:error=EIO:when=1 \
-o /tmp/pause-fsync.strace
The original incident followed repeated host No space left on device errors. Those logs do not establish the cause of the later fsync error.
Checkpoint: memory allocation failure
Exhaust the host's reserved hugepage memory pool, then call create_snapshot(). Starting the replacement sandbox fails with mmap memfd: cannot allocate memory. Reproduced 1/1 time with real memory exhaustion on the same release binary. Normal checkpoint/restore works with memory available.
Actual result
In both cases:
- The original sandbox's Firecracker process stops;
get_inforeturns “not found.” - The snapshot build is marked
failed; restoring it returns404: template not found.
The pause failure deletes the local snapshot artifacts. The checkpoint failure leaves local files, but they cannot be restored through the SDK.
Expected result
A failed pause or checkpoint should leave the sandbox recoverable: either the original sandbox remains available or a usable snapshot can be restored.
Environment
- Single-node Embed, local storage (
file:///var/lib/e2b/storage/templates) - Ubuntu 26.04 ARM64 VM with nested virtualization
- Orchestrator
v0.16.202609130627-59497eb9134(unmodified release binary) - API
v0.14.202609170000-908833e4c12; Python SDK2.51.0 - Compose revision:
a065a4ddb3f2c6a4149634d9acb14b62f65839ac
Related: #3659 covers a snapshot marked successful that crashes on restore.
- Ngôn ngữ chính
- Go
- Star
- 1.6k
- Fork
- 438
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của e2b-dev/runtime
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sandbox cache: StartRemoving state transition not broadcast, all allocations see stale Running stateĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của e2b-dev/runtime
Issue tương tự
-
enhancement low priority
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
eugenioenko/ttt#674 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Remove obsolete ipAllocationPolicy field from containernodepool-subnetworkref test dependencyĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
GoogleCloudPlatform/k8s-config-connector#13462 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
vavallee/bindery#2793 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày