AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
25.5k stars 1.83k forks source link

panic: runtime error: index out of range #3930

Closed cedwards closed 2 years ago

cedwards commented 2 years ago

Issue Details

Expected Behavior

Expected to run continuously and provide DNS service.

Actual Behavior

Random crashes across all instances (3x) with the following error:

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

goroutine 3228 [running]:
github.com/AdguardTeam/dnsproxy/proxy.filterMsg(0xc0003aa000, 0xc0003aa000, 0x0, 0x1, 0x0)
        github.com/AdguardTeam/dnsproxy@v0.39.2/proxy/cache.go:427 +0x1c5
github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).Resolve(0xc000096700, 0xc000333200)
        github.com/AdguardTeam/dnsproxy@v0.39.2/proxy/proxy.go:499 +0x13a
github.com/AdguardTeam/AdGuardHome/internal/dnsforward.(*Server).processUpstream(0xc000150000, 0xc00034c280)
        github.com/AdguardTeam/AdGuardHome/internal/dnsforward/dns.go:545 +0x538
github.com/AdguardTeam/AdGuardHome/internal/dnsforward.(*Server).handleDNSRequest(0xc000150000, 0xc000096700, 0xc000333200)
        github.com/AdguardTeam/AdGuardHome/internal/dnsforward/dns.go:102 +0x37e
github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).handleDNSRequest(0xc000096700, 0xc000333200)
        github.com/AdguardTeam/dnsproxy@v0.39.2/proxy/server.go:127 +0x4d3
github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).udpHandlePacket(0xc000096700, {0xc0000b3c50, 0x22, 0x22}, {0xc0007213b0, 0x10, 0x10}, 0xc00130bd70, 0xc000010400)
        github.com/AdguardTeam/dnsproxy@v0.39.2/proxy/server_udp.go:105 +0x325
github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).udpPacketLoop.func1(0xc000096700, {0xc0000b3c50, 0x22, 0x22}, {0xc0007213b0, 0x10, 0x10}, 0xc00130bd70, 0xc000010400, {0x1ff0cc0, ...})
        github.com/AdguardTeam/dnsproxy@v0.39.2/proxy/server_udp.go:74 +0x8b
created by github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).udpPacketLoop
        github.com/AdguardTeam/dnsproxy@v0.39.2/proxy/server_udp.go:73 +0x35c
TheCeet commented 2 years ago

Try to update to beta v15?

EugeneOne1 commented 2 years ago

@cedwards, hello. This one looks like a dup of #3551. Could you please install one of beta versions later than v0.107.0-b.9 (e.g. v0.107.0-b.10) and check if it panics?