Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Python launched through guest shell stalls on queued filesystem RPCs

未关闭
#2,012 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@ankssjain 已经在做这个了。

开始于 2026年9月29日。

  • #2013 来自 @ankssjain —— 未关闭

评估

难度
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 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.

主要语言
Rust
星标
4.7k
派生
263
平均合并
9 小时 43 分钟
30 天内合并 PR
27

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rivet-dev/agentos 的其他 Issue

查看 rivet-dev/agentos 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。