Skip to content

SHARD-794: a VM guest links /dev/fd and the stdio names - #632

Merged
presmihaylov merged 2 commits into
mainfrom
shard-794-dev-fd
Oct 7, 2026
Merged

presmihaylov merged 2 commits into
mainfrom
shard-794-dev-fd

Conversation

@presmihaylov

Copy link
Copy Markdown
Owner

SHARD-794 (task list outside the repo). Chief-approved overnight for Pres.

Why. A vz or Firecracker guest boots a bare devtmpfs, which has no /dev/fd, /dev/stdin, /dev/stdout or /dev/stderr. runc, gVisor and Sysbox get these links from the runtime, so bash <(...) and >(...) worked there and failed in a VM sandbox.

How.

  • Look first at bootGuest in cmd/shard-init/guest_linux.go: it links the four into the moved devtmpfs right after devpts. It runs once per boot, so the links never exist already.
  • linkStdio lives in guest.go so its unit test runs on macOS.
  • A sandbox picks this up on its next boot, not on a daemon swap alone.

What. New conformance case ExecFindsTheStdioLinksUnderDev.

Tested e2e: vz (laptop, real VM: fails without the fix, passes with it), runc, gVisor, Sysbox (Lima). Firecracker shares bootGuest but has no KVM box.

A vz or Firecracker guest boots a bare devtmpfs, which has no /dev/fd,
/dev/stdin, /dev/stdout or /dev/stderr. runc, gVisor and Sysbox get them
from the runtime, so bash <(...) and >(...) worked there and failed in a
VM sandbox. bootGuest now links the four after devpts, and a conformance
case holds every substrate to them.
@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
shard Ignored Ignored Preview Oct 7, 2026 10:54pm UTC

Request Review

Comment thread services/provider/conformance/conformance.go Outdated
@presmihaylov
presmihaylov merged commit 784d9be into main Oct 7, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant