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

Explicit sidecar stops accepting VMs after ~2048 create then dispose cycles "SidecarEventBufferOverflow"

Đã đóng
#2,052 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

Một pull request liên quan đã được merge.

  • #2065 của @eersnington — đã merge

Đánh giá

Độ khó
4/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, rust, wasm
Lĩnh vực
backend, devtools

Hướng nghiên cứu

The reproduction uses AgentOs.createSidecar, AgentOs.create, and vm.dispose from @rivet-dev/agentos-core; begin by tracing how vm_lifecycle events are buffered and consumed, then check where SidecarEventBufferOverflow is exported. The report asks to discard lifecycle events nobody awaits and export the error type. Done means repeated create, evaluate, and dispose cycles no longer fill the buffer, and callers can import the error class.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hi Rivet team,

A long-lived explicit sidecar stops working after about 2048 VMs. Each cycle is create → evaluate → dispose on the same sidecar. Run 2048 fails with SidecarEventBufferOverflow, and every later call on that sidecar fails the same way until it's replaced.

sidecar event buffer overflow after 4096 queued events (capacity 4096) while buffering vm_lifecycle

4096 events after 2048 VMs looks like two vm_lifecycle events per disposed VM staying in the buffer, but we haven't dug further.

Repro (0.4.1, Node 24, macOS):

import { AgentOs } from "@rivet-dev/agentos-core";

const sidecar = await AgentOs.createSidecar();
for (let run = 0; run < 2100; run++) {
    try {
        const vm = await AgentOs.create({ defaultSoftware: false, sidecar: { kind: "explicit", handle: sidecar } });
        await vm.javascript.evaluate("(async () => 1)()");
        await vm.dispose();
        console.log(`run ${run} success`);
    } catch (error) {
        console.log(`run ${run}`, error.name, error.message);
        break;
    }
}
run 2048: SidecarEventBufferOverflow sidecar event buffer overflow after 4096 queued events (capacity 4096) while buffering vm_lifecycle

For now we treat the overflow as a closed sidecar and start a new one. Two small things would help:

  • not keeping lifecycle events nobody waits for, so a long-lived sidecar doesn't fill up
  • exporting SidecarEventBufferOverflow from @rivet-dev/agentos-core, so we can check instanceof instead of error.name

Thanks a lot!

Ngôn ngữ chính
Rust
Star
4.8k
Fork
272
Merge trung bình
13 giờ 24 phút
Pull request đã merge (30 ngày)
49

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.