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 / Termination filterMsg #3551

Closed
lex-obrien opened this issue Sep 4, 2021 · 8 comments
Closed

Panic / Termination filterMsg #3551

lex-obrien opened this issue Sep 4, 2021 · 8 comments
Assignees
Milestone

Comments

@lex-obrien
Copy link

Issue Details

running

AdGuard Home, version v0.107.0-b.9
Running from openWrt, downloaded from github release
Arm v7

  • CPU architecture:
  • Operating system and version:

Receive a panic which caused the service to die and then restart.

I have only seen it once, but panics are definitely not good :)

panic: runtime error: index out of range [0] with length 0

goroutine 43834 [running]:
github.com/AdguardTeam/dnsproxy/proxy.filterMsg(0x28191d0, 0x28191d0, 0x1e70000, 0x0)
github.com/AdguardTeam/dnsproxy@v0.39.4/proxy/cache.go:427 +0x1ac
github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).Resolve(0x252c540, 0x2061b90, 0x0, 0x0)
github.com/AdguardTeam/dnsproxy@v0.39.4/proxy/proxy.go:502 +0xc0
github.com/AdguardTeam/AdGuardHome/internal/dnsforward.(*Server).processUpstream(0x21b7600, 0x24fc420, 0x0)
github.com/AdguardTeam/AdGuardHome/internal/dnsforward/dns.go:544 +0x68
github.com/AdguardTeam/AdGuardHome/internal/dnsforward.(*Server).handleDNSRequest(0x21b7600, 0x252c540, 0x2061b90, 0x0, 0x0)
github.com/AdguardTeam/AdGuardHome/internal/dnsforward/dns.go:102 +0x21c
github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).handleDNSRequest(0x252c540, 0x2061b90, 0x3, 0x2661c20)
github.com/AdguardTeam/dnsproxy@v0.39.4/proxy/server.go:127 +0x1e4
github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).udpHandlePacket(0x252c540, 0x2998540, 0xe0, 0xe0, 0x28fce80, 0x10, 0x10, 0x27bc2e8, 0x256c448)
github.com/AdguardTeam/dnsproxy@v0.39.4/proxy/server_udp.go:105 +0x194
github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).udpPacketLoop.func1(0x252c540, 0x2998540, 0xe0, 0xe0, 0x28fce80, 0x10, 0x10, 0x27bc2e8, 0x256c448, 0x1ac9440, ...)
github.com/AdguardTeam/dnsproxy@v0.39.4/proxy/server_udp.go:74 +0x5c
created by github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).udpPacketLoop
github.com/AdguardTeam/dnsproxy@v0.39.4/proxy/server_udp.go:73 +0x334

@lex-obrien
Copy link
Author

Also, I just realized that dnsproxy has its own repo: https://github.com/AdguardTeam/dnsproxy
Apologies if I should have opened it over there.

@lex-obrien
Copy link
Author

It seems to be happening a few times per day, but each time it does successfully restart and continue (same stack trace).

@ameshkov
Copy link
Member

ameshkov commented Sep 5, 2021

Just in case, could you please record the verbose-level log as well?

  1. Configure AdGuard Home to write verbose-level log.
  2. Reproduce the issue.
  3. Post the log file here.

adguard pushed a commit to AdguardTeam/dnsproxy that referenced this issue Sep 8, 2021
Merge in DNS/dnsproxy from 3551-dont-panic to master

Updates AdguardTeam/AdGuardHome#3551.

Squashed commit of the following:

commit 570d149
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Wed Sep 8 17:20:46 2021 +0300

    proxy: fix index panic
adguard pushed a commit that referenced this issue Sep 8, 2021
Merge in DNS/adguard-home from 3551-dont-panic to master

Updates #3551.

Squashed commit of the following:

commit 45560e1
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Wed Sep 8 20:00:27 2021 +0300

    all: upd dnsproxy
@EugeneOne1
Copy link
Member

@lex-obrien, the latest build in the edge channel should fix the issue. Could you please check, if it still panics?

@lex-obrien
Copy link
Author

Thank you, trying it now!

adguard pushed a commit that referenced this issue Sep 9, 2021
Merge in DNS/adguard-home from 3551-dont-panic to master

Updates #3551.

Squashed commit of the following:

commit 45560e1
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Wed Sep 8 20:00:27 2021 +0300

    all: upd dnsproxy
@EugeneOne1
Copy link
Member

@lex-obrien, we'll close the issue for now. Please, feel to reopen it if the panic recurs.

@haberdabers
Copy link

Do you know when v0.107.0-b.10 will be released?

@ainar-g
Copy link
Contributor

ainar-g commented Sep 14, 2021

@haberdabers, in a couple of hours, if all goes to plan.

heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Merge in DNS/adguard-home from 3551-dont-panic to master

Updates AdguardTeam#3551.

Squashed commit of the following:

commit 45560e1
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Wed Sep 8 20:00:27 2021 +0300

    all: upd dnsproxy
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

5 participants