Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To not do network activity in init or global variables creation #2

Open
AskAlexSharov opened this issue Nov 15, 2024 · 0 comments
Open

Comments

@AskAlexSharov
Copy link

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: erigontech/erigon#12570

We still collecting evidences: i may be a bit wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant