ipfs/kubo

Add goroutine leak profile to `ipfs diag profile`

Open

#11.191 aperta il 10 feb 2026

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)Go (2725 fork)batch import
P1effort/hourshelp wantedkind/enhancement

Metriche repository

Star
 (13.906 star)
Metriche merge PR
 (Merge medio 9g 4h) (27 PR mergiate in 30 g)

Descrizione

Go 1.26 ships an experimental goroutine leak profiler (GOEXPERIMENT=goroutineleakprofile). It detects goroutines blocked on channels, mutexes, or conditions that can never unblock, using GC reachability analysis. Zero runtime overhead unless actively collecting.

Available at /debug/pprof/goroutineleak when enabled.

Proposal

Once 1.27 ships with it enabled by default:

  • Add a goroutine-leak collector to ipfs diag profile --collectors (gated on the experiment being available at runtime)
  • Expose it via the existing /debug/pprof/ endpoint on the API port

This would help diagnose daemon goroutine leaks without external tooling. Useful for long-running nodes where leaked goroutines accumulate over time.

References

Guida contributor