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分
- マージ済み PR(30日)
- 27
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 1週間以上 初心者へのやさしさ 42/100
メンテナーはふだん 1 日以内に返信
rivet-dev/agentos の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
bmander/geomsolver#118 ·
メンテナーはふだん 1 日以内に返信
-
Three Windows builds are keyed on a later release than their layout対応中かも @ero-qt が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
メンテナーはふだん 1 日以内に返信
-
Markdown Preview Fonts Don't Show Selected Option対応中かも @RadhiRasho が今日担当しました。 オープンstate:needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
zed-industries/zed#65300 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信