"Invalid memory address or nil pointer dereference" error on v1.6(f57e9a9) release
GoldJohnKing opened this issue · comments
OS Version: Windows 10 x64 19041.84
Overture Verison: v1.6(f57e9a9) release, overture-windows-amd64.zip
I've updated to latest v1.6(f57e9a9) release from v1.6-rc9(adccb00) v1.6-rc8(4dc8303) release this moring.
When DNS resolve request was sent to an invalid DNS configured in Overture, it shows "Invalid memory address or nil pointer dereference" error and crashes instantly. This issue never happens on earlier releases.
Full logs below:
time="2020-03-08 10:16:43" level=info msg="Overture v1.6"
time="2020-03-08 10:16:43" level=info msg="If you want to use overture safe and sound, please read the README.md from project repository: https://github.com/shawn1m/overture"
time="2020-03-08 10:16:43" level=info msg="Domain TTL file domain_ttl_sample has been loaded with 1 records (0 failed)"
time="2020-03-08 10:16:43" level=info msg="Domain file accelerated-domains.china.conf.txt has been loaded with 72674 records (full-map)"
time="2020-03-08 10:16:43" level=info msg="Domain file gfw_all_domain.txt has been loaded with 5584 records (full-map)"
time="2020-03-08 10:16:43" level=info msg="IP network file china_ip_list.txt has been loaded with 5794 records"
time="2020-03-08 10:16:43" level=warning msg="No element has been loaded from IP network file: ip_network_alternative_sample"
time="2020-03-08 10:16:43" level=info msg="Minimum TTL has been set to 900"
time="2020-03-08 10:16:43" level=info msg="CacheSize is 250"
time="2020-03-08 10:16:43" level=info msg="Hosts file has been loaded successfully"
time="2020-03-08 10:16:43" level=info msg="Overture is listening on :53"
time="2020-03-08 10:16:44" level=warning msg="dns server address [2001:4860:4860::8888]:443 is invalid"
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x72d938]
goroutine 50 [running]:
github.com/shawn1m/overture/core/outbound/clients/resolver.(*BaseResolver).Exchange(0xc000006088, 0xc0008395f0, 0x0, 0x0, 0x0)
/home/travis/gopath/src/github.com/shawn1m/overture/core/outbound/clients/resolver/base_resolver.go:30 +0x68
github.com/shawn1m/overture/core/outbound/clients/resolver.(*UDPResolver).Exchange(0xc000006088, 0xc0008395f0, 0x3, 0x1, 0x0)
/home/travis/gopath/src/github.com/shawn1m/overture/core/outbound/clients/resolver/udp_resolver.go:12 +0x3e
github.com/shawn1m/overture/core/outbound/clients.(*RemoteClient).Exchange(0xc0000b03c0, 0x1, 0x0)
/home/travis/gopath/src/github.com/shawn1m/overture/core/outbound/clients/remote.go:77 +0xc2
github.com/shawn1m/overture/core/outbound/clients.(*RemoteClientBundle).Exchange.func1(0xc00005a101, 0xc0000b03c0, 0xc00005a120)
/home/travis/gopath/src/github.com/shawn1m/overture/core/outbound/clients/remote_bundle.go:51 +0x3b
created by github.com/shawn1m/overture/core/outbound/clients.(*RemoteClientBundle).Exchange
/home/travis/gopath/src/github.com/shawn1m/overture/core/outbound/clients/remote_bundle.go:50 +0xb7
I've also found almost all my IPv6 DNS are marked as invalid DNS, regardless of its connectability.
The IPv6 connection in your device is running well?
The IPv6 connection in your device is running well?
Yes. I could ping those IPv6 address and could visit IPv6-only sites.
And I wrote IPv6 address in config like this:
"Address": "[2620:119:35::35]:443"
OK. I will fix it later.
Great! The latest build solved both the error and invalid IPv6 DNS issue.
v1.6.1-rc1 is available now.