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

Abierto
#3,785 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
28/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go, postgresql
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Go
Estrellas
4.5k
Forks
937
Merge medio
1 d 10 h
PR fusionados (30 d)
150

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de kagent-dev/kagent

Todos los issues de kagent-dev/kagent

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.