Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Python launched through guest shell stalls on queued filesystem RPCs

Đã đóng
#2,012 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ankssjain đang làm issue này rồi.

Từ ngày 29/9/2026.

  • #2013 của @ankssjain — đang mở

Đá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 code execution_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):

  1. The WASM parent's polling path requeues Python VFS events for the owned process-event supervisor and wakes it.
  2. pump_child_process_events_nowait skips all children whose parent is WASM, to preserve the parent's ownership of stdout/stderr/exit.
  3. 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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rivet-dev/agentos

Tất cả issue của rivet-dev/agentos

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.