Minimal Node.js app to demonstrate zombie processes left after git commands (remote repo) using simple-git 3.28.0
docker build -t simple-git-repro .
docker run --name repro --rm simple-git-repro
Each git command which reaches out to remote repo leaves a "zombie" process
docker exec -it repro ps -o pid,ppid,stat,tty,args
PID PPID STAT TT COMMAND
1 0 S ? npm start
18 1 S ? {MainThread} node dist/index.js
39 1 Z ? [git]
45 1 Z ? [git]
57 1 Z ? [git]
63 1 Z ? [git]
154 0 R 136,0 ps -o pid,ppid,stat,tty,args