[Bug] Substrate actor can remain suspended while a request waits for reachability

Đang mở
#3,785 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

Chưa có ai nhận issue nà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
28/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ệ
go, postgresql
Lĩnh vực
backend

Hướng nghiên cứu

Start at the wait loop in EnsureSessionActor, on release/v0.10.x at commit 16e5363, and compare the path for an actor already SUSPENDED at the first check (which resumes) with the path where it turns SUSPENDING then SUSPENDED mid-poll (which only polls until the context expires and never calls ResumeActor). Read the session lifecycle code on main too, since the reporter notes it differs. Rebuild their reproducer with a fake ate-api and a local HTTP health endpoint, short deadline, and treat both cases resuming as done.

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

Mô tả

What happened

On v0.10.0-beta6, a second request to the same SandboxAgent session can time out if it arrives while the previous turn is being checkpointed. The actor remains suspended while the controller waits for it to become reachable.

The same wait logic remains on release/v0.10.x at commit 16e5363. I reproduced it there with a deterministic test using a fake ate-api and a local HTTP health endpoint:

  1. Call EnsureSessionActor for an existing session.
  2. Have the actor report SUSPENDING, then SUSPENDED (or initially RUNNING, then SUSPENDING and SUSPENDED).
  3. The call polls the suspended actor until its context expires. It does not call ResumeActor.

An actor already suspended at the initial check resumes normally. I expected the request to resume the actor and proceed in both cases. The test uses a short deadline to make the failure visible.

This affects our existing beta6 deployment. I understand Substrate has since been disabled in the official 0.10.x charts. The current main has a different session lifecycle implementation. In a controlled test with PostgreSQL and a fake actor, I did not reproduce this timeout when a send arrived during a successful suspension; this is not an end-to-end Substrate test.

AI assistance was used for the investigation and reproducer.

Ngôn ngữ chính
Go
Star
4.5k
Fork
937
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
150

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 kagent-dev/kagent

Tất cả issue của kagent-dev/kagent

Issue tương tự

Thêm issue về Go

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.