Python launched through guest shell stalls on queued filesystem RPCs
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- node.js, rust, wasm
调研方向
Start at pump_child_process_events_nowait and the WASM parent polling path, then run repro.mjs in both direct and shell modes. Trace how queued Python VFS requests and socket completions are assigned beneath WASM parents while stdout, stderr, and exit remain on the parent path. Done means the shell invocation completes with exit code 0 and stdout 42\n without regressing direct execution.
由索引模型根据 Issue 内容生成。
描述
Running python -c "print(42)" through the guest shell times out, while starting Python directly succeeds. This reproduces with embedded AgentOs.create(); no actor, Rivet Engine, database, or LLM is involved.
Reproduction
Tested with Node.js 24 on Linux arm64 and the published packages:
npm install --save-exact @rivet-dev/[email protected] @rivet-dev/[email protected]
node repro.mjs direct
node repro.mjs shell
repro.mjs:
import { AgentOs } from "@rivet-dev/agentos-core";
import { SidecarProcess } from "@rivet-dev/agentos-runtime-core";
// Isolate this timeout from a separate command-registration problem:
// configureVm currently omits the runtime commands registered by createVm.
const configureVm = SidecarProcess.prototype.configureVm;
SidecarProcess.prototype.configureVm = function (session, vm, options) {
return configureVm.call(this, session, vm, {
...options,
bootstrapCommands: [
...new Set(["node", "npm", "npx", "python", "python3",
...(options.bootstrapCommands ?? [])]),
],
});
};
const vm = await AgentOs.create({
defaultSoftware: true,
permissions: {
fs: "allow", process: "allow", childProcess: "allow",
network: "deny", env: "deny",
},
});
try {
const options = { timeoutMs: 10_000, output: { capture: "all" } };
const result = process.argv[2] === "direct"
? await vm.process.execFile("python", ["-c", "print(42)"], options)
: await vm.process.exec('python -c "print(42)"', options);
console.log(result);
} finally {
await vm.dispose();
}
Expected: both invocations finish with exit code 0 and stdout 42\n.
Observed:
- Direct:
outcome: "succeeded",exitCode: 0,stdout: "42\n"(about 2.4 seconds). - Shell:
outcome: "timed_out",exitCode: 137, empty stdout/stderr after 10 seconds, error codeexecution_timed_out.
Diagnosis
The shell resolves and starts Python. Python then stalls during filesystem initialization, before reaching the user code. Its initial fsReaddir("/") needs a Python VFS RPC response.
In current main (63ae3b256749d47c7b3a7c463128d5deda57d1bb):
- The WASM parent's polling path requeues Python VFS events for the owned process-event supervisor and wakes it.
pump_child_process_events_nowaitskips all children whose parent is WASM, to preserve the parent's ownership of stdout/stderr/exit.- That skip also prevents the supervisor from claiming the queued Python request. Python waits for the response while the shell waits for Python.
The repair should service supervisor-owned Python VFS requests (and Python socket completions) beneath WASM parents while keeping stdout/stderr/exit on the parent's polling path.
Related: #2007 addresses queued JavaScript process-control requests beneath WASM parents. Python VFS requests are a separate event variant and need handling too. This also differs from #1881 / #1980: in this reproduction Python is found and starts, then stalls.
- 主要语言
- Rust
- 星标
- 4.7k
- 派生
- 263
- 平均合并
- 9 小时 43 分钟
- 30 天内合并 PR
- 27
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rivet-dev/agentos 的其他 Issue
-
Python edits to filesystem.writeFile-created files are reverted by shadow reconciliation可能已有人在做 @ankssjain 于 1 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 20/100
rivet-dev/agentos#2022 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 半天 新手友好度 32/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 66/100
rivet-dev/agentos#1994 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 42/100
维护者通常 1 天内回复
查看 rivet-dev/agentos 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
bmander/geomsolver#118 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
Three Windows builds are keyed on a later release than their layout可能已有人在做 @ero-qt 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
priority:P3 type:docs
难度 2/5 1-3 小时 新手友好度 85/100
sebastian-software/ferroni#253 ·
维护者通常 1 天内回复