-
Notifications
You must be signed in to change notification settings - Fork 23
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
panic in goroutine, rmsg
is nil
#126
Comments
Thanks for the report and digging in to investigate! |
It does appear there are possible gaps in error handling in this area: Lines 337 to 369 in aa0c407
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm getting a nil panic from this line:
dnsr/resolver.go
Line 374 in aa0c407
Because this occurs in a goroutine spawned by this library, it's not recoverable
Full trace
I've not managed to reliably reproduce it but I'm reasonably sure the bug comes from these lines
dnsr/resolver.go
Lines 354 to 359 in aa0c407
The
err
return fromclient.ExchangeWithConnContext
is never checked because it's been shadowed by line 354This means that resolvers with
dnsr.WithTCPRetry()
can panic if:In this case, the error check is ineffective at guarding against nil
rmsg
values because the error from the TCP lookup has been lost to the shadowederr
vardnsr/resolver.go
Lines 369 to 371 in aa0c407
The text was updated successfully, but these errors were encountered: