celestiaorg / celestiaorg/go-header

p2p: peerTracker.gc leaks time.Ticker due to missing defer ticker.Stop(); please integrate leak static analyzer

Open
#223 1 comment 1 reaction 0 assignees View on GitHub
good first issue
Dominant language
Go
Stars
21
Forks
33
Avg merge
5d 20h
Merged PRs (30d)
7

Description

https://github.com/celestiaorg/go-header/blob/18f0eb1c5d3aeab6476123da0dad57e82c067984/p2p/peer_tracker.go#L228
leaks the ticker due to a missing `defer ticker.Stop()` For an efficient p2p mechanism, let’s ensure that we gut out noise and RAM consumers like this. I’d suggest integrating static analyzers in the workflow and CI process. At Orijtech Inc we built a bunch of tools at https://cyber.orijtech.com/tools but for this case we produced tickeryzer https://medium.com/orijtech-developers/tickeryzer-static-analyzer-to-report-missing-time-ticker-stop-call-which-causes-resource-leak-2060a617a830

Kindly cc-ing @Wondertan @walldiss @liamsi

Contributor guide

Open the contributing guide

Research direction

Start at p2p/peer_tracker.go around line 228 and inspect peerTracker.gc where the time.Ticker is created. Then review the repository's workflow and CI configuration for an appropriate static-analyzer integration; done means the ticker leak is addressed and the relevant analyzer check runs in CI.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
ci-cd, distributed-systems, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.