net: race condition in dnsclient_unix.go resolverConfig init #15495
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
Please answer these questions before submitting your issue. Thanks!
go version
)?go version go1.6 linux/amd64
go env
)?GOARCH="arm"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
We were seeing issues where systems in the field would get stuck reporting:
dial tcp: lookup mywebsite.com on [::1]:53: read udp [::1]:50878->[::1]:53: read: connection refused
even though /etc/resolv.conf was populated with a legitimate nameserver. Restarting the application fixed the issue.
We believe this happens when net/dnsclient_unix.go
resolverConfig.init()
happens to run at the same time as /etc/resolv.conf being updated from empty to populated. There's a chance for:conf.dnsConfig
conf.modTime
conf.dnsConfig
The text was updated successfully, but these errors were encountered: