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

panic: runtime error: invalid memory address or nil pointer dereference #831

Closed
vtacquet opened this issue Jun 13, 2019 · 27 comments
Closed

Comments

@vtacquet
Copy link

Steps to reproduce

  1. adguard is running in docker (via docker-compose) on a raspberry pi 3 (hypriot)
  2. adguard crashes after 20 seconds, after it restarts you can continue, but it crashes again, you can even pass the wizard if you click fast enough, but it always crashes
  3. i am using macvlan to assign an ip address to the container

Expected behavior

it should not crash
(without macvlan it does not crash)

Actual behavior

adguard | panic: runtime error: invalid memory address or nil pointer dereference
adguard | [signal SIGSEGV: segmentation violation code=0x1 addr=0x2c pc=0x1d89a8]
adguard |
adguard | goroutine 41 [running]:
adguard | crypto/tls.(*Conn).write(0x2fb0000, 0x2ca83c0, 0x125, 0x140, 0x2fd6000, 0x120, 0x180)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:896 +0xf4
adguard | crypto/tls.(*Conn).writeRecordLocked(0x2fb0000, 0x6c9416, 0x2fd6000, 0x120, 0x180, 0x0, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:945 +0x1fc
adguard | crypto/tls.(*Conn).writeRecord(0x2fb0000, 0x2fd6016, 0x2fd6000, 0x120, 0x180, 0x0, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:967 +0x90
adguard | crypto/tls.(*Conn).clientHandshake(0x2fb0000, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/handshake_client.go:167 +0x114
adguard | crypto/tls.(*Conn).Handshake(0x2fb0000, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:1343 +0xe8
adguard | net/http.(*persistConn).addTLS.func2(0x0, 0x2fb0000, 0x0, 0x2cb8300)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/net/http/transport.go:1190 +0x34
adguard | created by net/http.(*persistConn).addTLS
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/net/http/transport.go:1186 +0x174

Screenshot: ![server 2019-06-13 16-49-42](https://user-images.githubusercontent.com/5128967/59443106-b8e78880-8dfb-11e9-8fef-3c4692d5b611.png) ![server 2019-06-13 16-53-31(1)](https://user-images.githubusercontent.com/5128967/59443194-d3216680-8dfb-11e9-8901-0d617782c0a0.png)

Your environment

Description Value
Version of AdGuard Home server: v0.96-hotfix
How did you setup DNS configuration: it crashes during the wizard
If it's a router or IoT, please write device model: Raspberry Pi 3 Model B
Operating system and version: Hypriot v1.10.0
Docker version: 18.09.0
@vtacquet
Copy link
Author

vtacquet commented Jun 13, 2019

in the crash log you can see crypto libraries for amd64, this is however an armhf-latest tag (image: adguard/adguardhome:armhf-latest)

@ameshkov ameshkov added this to the v0.97 milestone Jun 13, 2019
@itssimon
Copy link

itssimon commented Jun 16, 2019

I'm seeing the same crash happen with the AdGuard Home Hass.io add-on

@ameshkov
Copy link
Member

Guys, is this the full stack trace? I don't see our code in the stack trace, it's hard to figure where it comes from.

@frenck
Copy link
Contributor

frenck commented Jun 17, 2019

Same here, unfortunately, I do not have a full stack trace:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x606775]

goroutine 425001 [running]:
crypto/tls.(*Conn).write(0xc00027d500, 0xc000f00000, 0x11d, 0x120, 0xc006478600, 0x118, 0x180)
	/home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:896 +0x135
crypto/tls.(*Conn).writeRecordLocked(0xc00027d500, 0xbb5f16, 0xc006478600, 0x118, 0x180, 0x0, 0x0, 0x0)
	/home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:945 +0x2a1
crypto/tls.(*Conn).writeRecord(0xc00027d500, 0xc006478616, 0xc006478600, 0x118, 0x180, 0x0, 0x0, 0x0)
	/home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:967 +0xaf
crypto/tls.(*Conn).clientHandshake(0xc00027d500, 0x0, 0x0)
	/home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/handshake_client.go:167 +0x17c
crypto/tls.(*Conn).Handshake(0xc00027d500, 0x0, 0x0)
	/home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:1343 +0xef
net/http.(*persistConn).addTLS.func2(0x0, 0xc00027d500, 0xc000dc00f0, 0xc0060a6360)
	/home/travis/.gimme/versions/go1.12.5.linux.amd64/src/net/http/transport.go:1190 +0x42
created by net/http.(*persistConn).addTLS
	/home/travis/.gimme/versions/go1.12.5.linux.amd64/src/net/http/transport.go:1186 +0x1ab

@vtacquet
Copy link
Author

This is all I have before the signal:

$ docker-compose up adguard
Removing adguard
Recreating 0ecfd3c8d3e8_adguard ... done
Attaching to adguard
adguard | 2019/06/17 09:02:09 [info] AdGuard Home, version v0.96-hotfix, channel release
adguard |
adguard | 2019/06/17 09:02:09 [info] Added 7 client aliases from /etc/hosts
adguard | 2019/06/17 09:02:09 [info] Upstream 0: https://dns.cloudflare.com:443/dns-query
adguard | 2019/06/17 09:02:09 [info] Start DNS server periodic jobs
adguard | 2019/06/17 09:02:09 [info] Starting the DNS proxy server
adguard | 2019/06/17 09:02:09 [info] Ratelimit is enabled and set to 20 rps
adguard | 2019/06/17 09:02:09 [info] The server is configured to refuse ANY requests
adguard | 2019/06/17 09:02:09 [info] DNS cache is enabled
adguard | 2019/06/17 09:02:09 [info] Creating the UDP server socket
adguard | 2019/06/17 09:02:09 [info] Listening to udp://[::]:53
adguard | 2019/06/17 09:02:09 [info] Creating the TCP server socket
adguard | 2019/06/17 09:02:09 [info] Listening to tcp://[::]:53
adguard | 2019/06/17 09:02:09 [info] Entering the tcp listener loop on [::]:53
adguard | 2019/06/17 09:02:09 [info] Entering the UDP listener loop on [::]:53
adguard | 2019/06/17 09:02:09 [info] AdGuard Home is available on the following addresses:
adguard | 2019/06/17 09:02:09 [info] Go to http://127.0.0.1:80
adguard | 2019/06/17 09:02:09 [info] Go to http://192.168.1.56:80
adguard | panic: runtime error: invalid memory address or nil pointer dereference
adguard | [signal SIGSEGV: segmentation violation code=0x1 addr=0x2c pc=0x1d89a8]
adguard |
adguard | goroutine 8 [running]:
adguard | crypto/tls.(*Conn).write(0x1508000, 0x14e23c0, 0x125, 0x140, 0x1566000, 0x120, 0x180)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:896 +0xf4
adguard | crypto/tls.(*Conn).writeRecordLocked(0x1508000, 0x6c9416, 0x1566000, 0x120, 0x180, 0x0, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:945 +0x1fc
adguard | crypto/tls.(*Conn).writeRecord(0x1508000, 0x1566016, 0x1566000, 0x120, 0x180, 0x0, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:967 +0x90
adguard | crypto/tls.(*Conn).clientHandshake(0x1508000, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/handshake_client.go:167 +0x114
adguard | crypto/tls.(*Conn).Handshake(0x1508000, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:1343 +0xe8
adguard | net/http.(*persistConn).addTLS.func2(0x0, 0x1508000, 0x0, 0x17d4200)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/net/http/transport.go:1190 +0x34
adguard | created by net/http.(*persistConn).addTLS
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/net/http/transport.go:1186 +0x174
adguard exited with code 2

@ameshkov
Copy link
Member

Is there any issue if you change the upstream to 1.1.1.1 or tls://1.1.1.1?

As I understand, this happens only with:

  1. The armhf-latest docker image
  2. macvlan enabled
  3. RPI 3

@frenck
Copy link
Contributor

frenck commented Jun 17, 2019

@ameshkov I run amd64, so 1 & 3 are not valid conclusions.

@ameshkov
Copy link
Member

Got it, so it's just macvlan. This should be easy to reproduce then, thank you!

@vtacquet
Copy link
Author

Found the issue. It is related to systemd-resolved. On Hypriot the systemd-resolved is bound to 127.0.0.1:53 and this crashes Adguard with macvlan support (even so Adguard is starting on an 192.168.1.x ip). Without macvlan it just says the port is in use, but since macvlan is bound to another IP this should not crash.

@ameshkov
Copy link
Member

So disabling systemd-resolved resolves this?

@vtacquet
Copy link
Author

this is what I did to solve it:
sudo systemctl stop systemd-resolved
sudo systemctl daemon-reload
sudo systemctl disable systemd-resolved

to answer your question: yes

@ameshkov
Copy link
Member

ameshkov commented Jun 17, 2019

Well, the only thing I don't understand now is what crypto/tls has to do with this all? 🤔

@vtacquet
Copy link
Author

yeah, that is what put me on the wrong track...

@vtacquet
Copy link
Author

Even starting systemd-resolved when Adguard is running (with macvlan) doesn't crash it anymore, maybe the start of Adguard tries to open the wrong ip/port combo ?

@vtacquet
Copy link
Author

Disregard that statement, it just went down with signal 2

@ameshkov
Copy link
Member

Could you please run it with verbose logging enabled?

@frenck
Copy link
Contributor

frenck commented Jun 17, 2019

I don't want to spoil the party, but I don't run systemd-resolved in my system. It has been hard disabled and DNS management by the NetworkManager has been disabled as well, still, I run into this.

Edit: Nevermind, @vtacquet told already to disregard.

@ameshkov
Copy link
Member

Guys, what about using a different upstream? #831 (comment)

Does it change anything?

@frenck
Copy link
Contributor

frenck commented Jun 17, 2019

@ameshkov I can test it... nevertheless, I do not have a reproduction trigger, as in, it occurs rarely at my end. (ran for a week without this happening).

@vtacquet
Copy link
Author

It is not solved at all, it just takes some time to crash:

adguard | 2019/06/17 12:42:23 [info] AdGuard Home, version v0.96-hotfix, channel release
adguard |
adguard | 2019/06/17 12:42:23 [info] Added 7 client aliases from /etc/hosts
adguard | 2019/06/17 12:42:23 [info] Upstream 0: https://dns.cloudflare.com:443/dns-query
adguard | 2019/06/17 12:42:24 [info] Start DNS server periodic jobs
adguard | 2019/06/17 12:42:24 [info] Starting the DNS proxy server
adguard | 2019/06/17 12:42:24 [info] Ratelimit is enabled and set to 20 rps
adguard | 2019/06/17 12:42:24 [info] The server is configured to refuse ANY requests
adguard | 2019/06/17 12:42:24 [info] DNS cache is enabled
adguard | 2019/06/17 12:42:24 [info] Creating the UDP server socket
adguard | 2019/06/17 12:42:24 [info] Listening to udp://[::]:53
adguard | 2019/06/17 12:42:24 [info] Creating the TCP server socket
adguard | 2019/06/17 12:42:24 [info] Listening to tcp://[::]:53
adguard | 2019/06/17 12:42:24 [info] AdGuard Home is available on the following addresses:
adguard | 2019/06/17 12:42:24 [info] Go to http://127.0.0.1:80
adguard | 2019/06/17 12:42:24 [info] Go to http://192.168.1.56:80
adguard | 2019/06/17 12:42:24 [info] Entering the UDP listener loop on [::]:53
adguard | 2019/06/17 12:42:24 [info] Entering the tcp listener loop on [::]:53
adguard | panic: runtime error: invalid memory address or nil pointer dereference
adguard | [signal SIGSEGV: segmentation violation code=0x1 addr=0x2c pc=0x1d89a8]
adguard |
adguard | goroutine 62 [running]:
adguard | crypto/tls.(*Conn).write(0x309a600, 0x2cbe500, 0x125, 0x140, 0x31ec000, 0x120, 0x180)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:896 +0xf4
adguard | crypto/tls.(*Conn).writeRecordLocked(0x309a600, 0x6c9416, 0x31ec000, 0x120, 0x180, 0x0, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:945 +0x1fc
adguard | crypto/tls.(*Conn).writeRecord(0x309a600, 0x31ec016, 0x31ec000, 0x120, 0x180, 0x0, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:967 +0x90
adguard | crypto/tls.(*Conn).clientHandshake(0x309a600, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/handshake_client.go:167 +0x114
adguard | crypto/tls.(*Conn).Handshake(0x309a600, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:1343 +0xe8
adguard | net/http.(*persistConn).addTLS.func2(0x0, 0x309a600, 0x0, 0x2cfc980)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/net/http/transport.go:1190 +0x34
adguard | created by net/http.(*persistConn).addTLS
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/net/http/transport.go:1186 +0x174
adguard exited with code 2

@vtacquet
Copy link
Author

setting another upstream (8.8.8.8) with macvlan is no solution, it crashes every minute

@ameshkov
Copy link
Member

@vtacquet hmm, so this is not DOH.

Another question: do you have "browsing security" or "parental control" enabled?

@vtacquet
Copy link
Author

vtacquet commented Jun 17, 2019

None of those enabled for the moment. It's a standard install.

@ameshkov
Copy link
Member

I'd like to figure out what this goroutine was doing before the panic occurred. Could you please record the verbose log (set verbose: true in the config).

Meanwhile, we're trying to reproduce this on our side, but no luck so far.

@vtacquet
Copy link
Author

Starting adguard ... done
Attaching to adguard
adguard | 2019/06/18 13:37:19 1#1 [info] AdGuard Home, version v0.96-hotfix, channel release
adguard |
adguard | 2019/06/18 13:37:19 1#1 [debug] Current working directory is /opt/adguardhome/work
adguard | 2019/06/18 13:37:19 1#1 [debug] main.clientAddHost(): 'localhost': '127.0.0.1' -> [1]
adguard | 2019/06/18 13:37:19 1#1 [debug] main.clientAddHost(): 'localhost': '::1' -> [2]
adguard | 2019/06/18 13:37:19 1#1 [debug] main.clientAddHost(): 'ip6-localnet': 'fe00::0' -> [3]
adguard | 2019/06/18 13:37:19 1#1 [debug] main.clientAddHost(): 'ip6-mcastprefix': 'ff00::0' -> [4]
adguard | 2019/06/18 13:37:19 1#1 [debug] main.clientAddHost(): 'ip6-allnodes': 'ff02::1' -> [5]
adguard | 2019/06/18 13:37:19 1#1 [debug] main.clientAddHost(): 'ip6-allrouters': 'ff02::2' -> [6]
adguard | 2019/06/18 13:37:19 1#1 [debug] main.clientAddHost(): 'adguard': '192.168.1.56' -> [7]
adguard | 2019/06/18 13:37:19 1#1 [info] Added 7 client aliases from /etc/hosts
adguard | 2019/06/18 13:37:19 1#1 [debug] main.upgradeConfig(): got schema version 3
adguard | 2019/06/18 13:37:19 1#1 [debug] Reading config file: /opt/adguardhome/conf/AdGuardHome.yaml
adguard | 2019/06/18 13:37:19 1#1 [debug] main.(*filter).load(): Loading filter 1 contents to: /opt/adguardhome/work/data/filters/1.txt
adguard | 2019/06/18 13:37:19 1#1 [debug] Couldn't load filter 1 contents due to stat /opt/adguardhome/work/data/filters/1.txt: no such file or directory
adguard | 2019/06/18 13:37:19 1#1 [debug] Writing YAML file: /opt/adguardhome/conf/AdGuardHome.yaml
adguard | 2019/06/18 13:37:20 1#1 [info] Upstream 0: https://dns.cloudflare.com:443/dns-query
adguard | 2019/06/18 13:37:20 1#1 [debug] github.com/AdguardTeam/AdGuardHome/dnsforward.(*Server).initDNSFilter(): Creating dnsfilter
adguard | 2019/06/18 13:37:20 1#1 [debug] github.com/AdguardTeam/AdGuardHome/dnsforward.(*Server).startInternal(): Loading stats from querylog
adguard | 2019/06/18 13:37:20 1#1 [info] Start DNS server periodic jobs
adguard | 2019/06/18 13:37:20 1#1 [info] Starting the DNS proxy server
adguard | 2019/06/18 13:37:20 1#1 [info] Ratelimit is enabled and set to 20 rps
adguard | 2019/06/18 13:37:20 1#1 [info] The server is configured to refuse ANY requests
adguard | 2019/06/18 13:37:20 1#1 [info] DNS cache is enabled
adguard | 2019/06/18 13:37:20 1#1 [info] Creating the UDP server socket
adguard | 2019/06/18 13:37:20 1#1 [info] Listening to udp://[::]:53
adguard | 2019/06/18 13:37:20 1#1 [info] Creating the TCP server socket
adguard | 2019/06/18 13:37:20 1#1 [info] Listening to tcp://[::]:53
adguard | 2019/06/18 13:37:20 1#12 [info] Entering the tcp listener loop on [::]:53
adguard | 2019/06/18 13:37:20 1#13 [debug] main.(*filter).update(): Downloading update for filter 1 from https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt
adguard | 2019/06/18 13:37:20 1#1 [info] AdGuard Home is available on the following addresses:
adguard | 2019/06/18 13:37:20 1#36 [debug] main.customDialContext(): network:tcp addr:adguardteam.github.io:443
adguard | 2019/06/18 13:37:20 1#1 [info] Go to http://127.0.0.1:80
adguard | 2019/06/18 13:37:20 1#1 [info] Go to http://192.168.1.56:80
adguard | 2019/06/18 13:37:20 1#11 [info] Entering the UDP listener loop on [::]:53
adguard | 2019/06/18 13:37:20 1#50 [debug] github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).handleUDPPacket(): Start handling new UDP packet from 127.0.0.1:51548
adguard | 2019/06/18 13:37:20 1#16 [debug] github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).handleUDPPacket(): Start handling new UDP packet from 127.0.0.1:56142
adguard | 2019/06/18 13:37:20 1#50 [debug] github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).logDNSMessage(): IN: ;; opcode: QUERY, status: NOERROR, id: 37158
adguard | ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
adguard |
adguard | ;; QUESTION SECTION:
adguard | ;adguardteam.github.io. IN AAAA
adguard |
adguard | 2019/06/18 13:37:20 1#16 [debug] github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).logDNSMessage(): IN: ;; opcode: QUERY, status: NOERROR, id: 35496
adguard | ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
adguard |
adguard | ;; QUESTION SECTION:
adguard | ;adguardteam.github.io. IN A
adguard |
adguard | 2019/06/18 13:37:30 1#50 [debug] github.com/AdguardTeam/dnsproxy/upstream.lookup(): failed to lookup for dns.cloudflare.com in 10000 milliseconds using 1.1.1.1:53: read udp 192.168.1.56:48171->1.1.1.1:53: i/o timeout
adguard | 2019/06/18 13:37:30 1#50 [debug] github.com/AdguardTeam/dnsproxy/proxy.exchangeWithUpstream(): upstream https://dns.cloudflare.com:443/dns-query failed to exchange ;adguardteam.github.io. IN AAAA in 10001 milliseconds. Cause: couldn't initialize HTTP client or transport, cause: couldn't initialize HTTP transport, cause: c
ouldn't bootstrap https://dns.cloudflare.com:443/dns-query, cause: failed to lookup dns.cloudflare.com, cause: read udp 192.168.1.56:48171->1.1.1.1:53: i/o timeout
adguard | 2019/06/18 13:37:30 1#50 [debug] github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).Resolve(): RTT: 10002 ms
adguard | 2019/06/18 13:37:30 1#50 [debug] github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).logDNSMessage(): OUT: ;; opcode: QUERY, status: SERVFAIL, id: 37158
adguard | ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
adguard |
adguard | ;; QUESTION SECTION:
adguard | ;adguardteam.github.io. IN AAAA
adguard |
adguard | 2019/06/18 13:37:30 1#50 [debug] github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).handleUDPPacket(): error handling DNS (udp) request: talking to dnsUpstream failed, cause: couldn't initialize HTTP client or transport, cause: couldn't initialize HTTP transport, cause: couldn't bootstrap https://dns.cloudflare.com:443/dns-query, cause:
failed to lookup dns.cloudflare.com, cause: read udp 192.168.1.56:48171->1.1.1.1:53: i/o timeout
adguard | 2019/06/18 13:37:40 1#16 [debug] github.com/AdguardTeam/dnsproxy/upstream.lookup(): failed to lookup for dns.cloudflare.com in 10001 milliseconds using 1.1.1.1:53: read udp 192.168.1.56:42274->1.1.1.1:53: i/o timeout
adguard | 2019/06/18 13:37:40 1#16 [debug] github.com/AdguardTeam/dnsproxy/proxy.exchangeWithUpstream(): upstream https://dns.cloudflare.com:443/dns-query failed to exchange ;adguardteam.github.io. IN A in 20003 milliseconds. Cause: couldn't initialize HTTP client or transport, cause: couldn't initialize HTTP transport, cause: coul
dn't bootstrap https://dns.cloudflare.com:443/dns-query, cause: failed to lookup dns.cloudflare.com, cause: read udp 192.168.1.56:42274->1.1.1.1:53: i/o timeout
adguard | 2019/06/18 13:37:40 1#16 [debug] github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).Resolve(): RTT: 20004 ms
adguard | 2019/06/18 13:37:40 1#16 [debug] github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).logDNSMessage(): OUT: ;; opcode: QUERY, status: SERVFAIL, id: 35496
adguard | ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
adguard |
adguard | ;; QUESTION SECTION:
adguard | ;adguardteam.github.io. IN A
adguard |
adguard | 2019/06/18 13:37:40 1#16 [debug] github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).handleUDPPacket(): error handling DNS (udp) request: talking to dnsUpstream failed, cause: couldn't initialize HTTP client or transport, cause: couldn't initialize HTTP transport, cause: couldn't bootstrap https://dns.cloudflare.com:443/dns-query, cause:
failed to lookup dns.cloudflare.com, cause: read udp 192.168.1.56:42274->1.1.1.1:53: i/o timeout
adguard | 2019/06/18 13:37:40 1#36 [debug] main.customDialContext(): LookupIPAddr: adguardteam.github.io: []
adguard | panic: runtime error: invalid memory address or nil pointer dereference
adguard | [signal SIGSEGV: segmentation violation code=0x1 addr=0x2c pc=0x1d89a8]
adguard |
adguard | goroutine 56 [running]:
adguard | crypto/tls.(*Conn).write(0x2b16000, 0x2d02000, 0x125, 0x140, 0x2ac0300, 0x120, 0x180)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:896 +0xf4
adguard | crypto/tls.(*Conn).writeRecordLocked(0x2b16000, 0x6c9416, 0x2ac0300, 0x120, 0x180, 0x0, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:945 +0x1fc
adguard | crypto/tls.(*Conn).writeRecord(0x2b16000, 0x2ac0316, 0x2ac0300, 0x120, 0x180, 0x0, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:967 +0x90
adguard | crypto/tls.(*Conn).clientHandshake(0x2b16000, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/handshake_client.go:167 +0x114
adguard | crypto/tls.(*Conn).Handshake(0x2b16000, 0x0, 0x0)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/crypto/tls/conn.go:1343 +0xe8
adguard | net/http.(*persistConn).addTLS.func2(0x0, 0x2b16000, 0x0, 0x28cc380)
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/net/http/transport.go:1190 +0x34
adguard | created by net/http.(*persistConn).addTLS
adguard | /home/travis/.gimme/versions/go1.12.5.linux.amd64/src/net/http/transport.go:1186 +0x174
adguard exited with code 2

@vtacquet
Copy link
Author

I can't get it to fail with running a docker command, only when starting it from docker-compose. Must have something to do with macvlan on docker-compose (there is a bug where the gateway is not added to a macvlan network - hence the problem connecting to 1.1.1.1 and cloudflare)

@ameshkov
Copy link
Member

Well, that was easier than I thought, we should've started with the log :)

The new docker image will be soon available in the edge tag.

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

No branches or pull requests

4 participants