Zombie processes and goroutine leak in ScriptRun / CustomSync executors on cancellation
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
- #6735 de @pulkitvats2007-crypto — cerrado sin fusionar
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- go, kubernetes
- Área
- devops, infrastructure
Línea de trabajo
Rastrea la cancelación y el manejo de tiempos de espera de los ejecutores ScriptRun y CustomSync, incluido el rollback de Kubernetes, y sigue cómo se inicia y se monitoriza el proceso de shell subyacente. Reproduce el problema con un comando sleep 300 de larga duración e inspecciona la lista de procesos del agente y los logs después de la cancelación. Se considera terminado cuando el árbol de procesos termina y no quedan goroutines ni procesos secundarios después de que la etapa se cancele o se agote el tiempo de espera.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened:
When a deployment is cancelled or times out during a ScriptRun, CustomSync, or Kubernetes rollback stage, the Piped agent stops tracking the stage but fails to terminate the underlying shell process. This results in orphaned "zombie" processes (e.g., kubectl, terraform, sleep) and leaked goroutines on the Piped agent host. These orphaned processes continue to run and mutate cluster state even after a rollback has been initiated, leading to potential data corruption and agent resource exhaustion.
What you expected to happen:
When a stage is cancelled or times out, the Piped agent should immediately and definitively terminate the underlying OS process tree associated with that stage's command. This ensures that no unauthorized mutations occur after cancellation and that agent resources are correctly reclaimed.
How to reproduce it:
- Create a PipeCD application with a ScriptRun stage that executes a long-running command (e.g.,
run: sleep 300). - Trigger a deployment for this application.
- Once the ScriptRun stage is active, click the "Cancel" button in the PipeCD web UI.
- Observe the PipeCD UI and logs; the stage will be reported as
CANCELLED. - Check the process list on the Piped agent host (e.g.,
ps aux | grep sleep). You will find that the sleep process is still running in the background.
Environment:
- piped version: master / latest
- control-plane version: master / latest
- Others: This is a platform-agnostic bug affecting any Piped agent utilizing ScriptRun or CustomSync executors.
- Lenguaje dominante
- Go
- Estrellas
- 1.4k
- Forks
- 391
- Merge medio
- 4 d 1 h
- PR fusionados (30 d)
- 58
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de pipe-cd/pipecd
-
Applications at the repository root are not triggered by new commitsPosiblemente ocupada @Daksha1611 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 2 días
-
pipedv1 kubernetes plugins ignore trafficRouting.istio.host in K8S_TRAFFIC_ROUTINGPosiblemente ocupada @Dhirenderchoudhary la tomó hoy. Abierto
Dificultad 2/5 Medio día Aptitud para principiantes 74/100
pipe-cd/pipecd#7626 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
pipectl transfer restore application drops backed-up labelsPosiblemente ocupada @bhavishyajain545 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
pipe-cd/pipecd#7622 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 2 días
Todos los issues de pipe-cd/pipecd
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
docker-compose: postgres healthcheck should probe TCP (pg_isready -h localhost)Posiblemente ocupada @zezo-mohamed22 la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
OneBusAway/watchdog#305 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
self-care self-care:agent-discoverability
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
githubnext/gh-cao#20928 ·
Los mantenedores suelen responder en 1 día
-
automation documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
SocialGouv/iterion#3287 ·
Los mantenedores suelen responder en 1 día