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

オープン
#3,785 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
28/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, postgresql
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Go
スター
4.5k
フォーク
937
平均マージ
1日 10時間
マージ済み PR(30日)
150

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

kagent-dev/kagent のほかの issue

kagent-dev/kagent の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。