Submit an issue View all issues Source
MIR-622

`miren exec` panics with "close of closed channel"

Done Bug public
phinze phinze Opened Jan 15, 2026 Updated Mar 10, 2026

Running miren exec causes a panic in the exec handler. The command output is returned successfully, but then the RPC handler panics, which may cause issues with the Miren service.

Reproduction

miren exec -C garden ls

Output

app
bin
...
panic: close of closed channel

goroutine 134 [running]:
miren.run/lib/sandbox.(*Exec).Do.func2()
        miren.run/lib/sandbox/exec.go:116 +0x85
created by miren.run/lib/sandbox.(*Exec).Do in goroutine 50
        miren.run/lib/sandbox/exec.go:113 +0x205

The exec command does return results before panicking, so it's a partial failure. However, repeated exec calls may destabilize the service.

Expected behavior

miren exec should complete without panicking.