Skip to content

Fix zombie process leak from grpcui processes#30

Merged
boubz1623 merged 1 commit intomainfrom
fix/grpcui-zombie-processes
Feb 12, 2026
Merged

Fix zombie process leak from grpcui processes#30
boubz1623 merged 1 commit intomainfrom
fix/grpcui-zombie-processes

Conversation

@kazvictor
Copy link
Contributor

Summary

  • grpcui processes were started with cmd.Start() but cmd.Wait() was never called, causing every exited grpcui process to remain as a zombie (Z / <defunct>) in the OS process table
  • Over time this accumulated hundreds of zombies (observed 1366 in production) and could exhaust the system process limit (~2666 on macOS)
  • Added a goroutine to call cmd.Wait() after each grpcui start, which reaps the process immediately when it exits

Test plan

  • go build succeeds
  • go test ./... passes
  • Run kportforward --grpcui and verify zero zombie accumulation with ps -A -o stat,ppid,pid,command | grep '^Z'
  • Verify grpcui processes still start and function correctly

🤖 Generated with Claude Code

grpcui processes were started with cmd.Start() but cmd.Wait() was never
called, causing every exited grpcui process to remain as a zombie in the
OS process table. Over time this accumulated hundreds of zombies and
could exhaust the system process limit.

Add a goroutine to call cmd.Wait() after each grpcui process starts,
which reaps the process immediately when it exits for any reason.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@boubz1623 boubz1623 merged commit f597b42 into main Feb 12, 2026
9 checks passed
@boubz1623 boubz1623 deleted the fix/grpcui-zombie-processes branch February 12, 2026 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants