Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

To not do network activity in `init` or global variables creation

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.