Refuse a second park of a fiber whose park is still running

Abierto
#56 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
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go, linux

Línea de trabajo

Read Runtime.Park in pkg/runtime/host/host_linux.go and Core.Park in pkg/core/core.go, then inspect the existing park tests. Add a table case that starts two parks on one fiber and checks that one delta survives intact. The change is done when a second park is refused before file work and the test passes.

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

Descripción

Two parks of one fiber can run at once. A pressure park and a caller's Park are the likely pair.

Runtime.Park in pkg/runtime/host/host_linux.go (around line 1774) sets f.parked and f.released without checking whether a park already set them. Core.Park in pkg/core/core.go has no guard either.

Each park then runs os.RemoveAll(dir) on the same delta directory (around line 1792). The second park can wipe the first one's delta while it is being written. refengine's HOLD is idempotent (sdk/c/template/engine/src/main.rs, hold), so both parks also SAVE the same held slice.

The GPU PoC's move test showed the two parks meeting on one fiber on 2026-10-23. That time the pressure park came second and found the fiber gone (host: unknown fiber), so nothing was lost.

Fix. Refuse a park when f.parked is already set, under r.mu, before any file work. Answer it the way a park of an unknown fiber is answered, or with a dedicated busy error.

Test. A table case that starts two parks of one fiber and checks that one delta survives intact.

Found during the GPU PoC (#4). Left for after the PoC.

Lenguaje dominante
Go
Estrellas
5
Forks
5
Merge medio
15 h 27 min
PR fusionados (30 d)
41

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 Azure/fiberd

Todos los issues de Azure/fiberd

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.