Python launched through guest shell stalls on queued filesystem RPCs
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, rust, wasm
- Lĩnh vực
- backend, operating-systems
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 4.7k
- Fork
- 263
- Merge trung bình
- 8 giờ 57 phút
- Pull request đã merge (30 ngày)
- 30
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 rivet-dev/agentos
-
Python edits to filesystem.writeFile-created files are reverted by shadow reconciliationCó thể đã có người làm @ankssjain đã nhận 3 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
rivet-dev/agentos#2022 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 32/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 66/100
rivet-dev/agentos#1994 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rivet-dev/agentos
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
pact-foundation/pact-cli#154 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
antithesishq/bombadil#361 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
test(executor_l0): assert execute() TaskOutcome, not only bus events / 断言 execute() 返回的 TaskOutcomeĐang mởtype:debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
skaiy/wild_agentos#425 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Default-import note suggests `import * as process` for velt:process, which does not name the builtinĐang mở
Độ 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
-
bug ticket
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
cratestack/cratestack#1154 ·
Maintainer thường phản hồi trong vòng 1 ngày