To not do network activity in `init` or global variables creation
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- go
- Domain
- networking
Research direction
Trace the global defaultClient = New() initialization through New, NewUserConfig, net.ResolveTCPAddr, and net.DefaultResolver.Dial. Review the linked Erigon issue and determine whether the reported race is reproducible. Done means package initialization no longer performs the problematic network activity or mutation, with the behavior verified on affected systems.
Written by the indexing model from the issue text.
Description
seems next global variable creation:
var defaultClient = New()
Does network activity:
NewUserConfig -> net.ResolveTCPAddr("tcp", fmt.Sprintf("[%s]:0", address))
and then mutating net.DefaultResolver.Dial
seems it's not thread-safe in golang (in OS's C libraries which used by golang).
And on some OS this race-condition caused crash: https://github.com/erigontech/erigon/issues/12570
We still collecting evidences: i may be a bit wrong
- Dominant language
- Go
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
netdata/netdata#24062 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
meshery/meshery#22119 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
automation documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day