ipfs/kubo

Add goroutine leak profile to `ipfs diag profile`

Open

#11,191 创建于 2026年2月10日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)Go (2,725 fork)batch import
P1effort/hourshelp wantedkind/enhancement

仓库指标

Star
 (13,906 star)
PR 合并指标
 (平均合并 4天 2小时) (30 天内合并 28 个 PR)

描述

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

贡献者指南