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 on CTRL-C (v0.107.0-b.11) #3655

Closed
timkgh opened this issue Sep 25, 2021 · 2 comments
Closed

Panic on CTRL-C (v0.107.0-b.11) #3655

timkgh opened this issue Sep 25, 2021 · 2 comments
Assignees
Milestone

Comments

@timkgh
Copy link

timkgh commented Sep 25, 2021

Issue Details

Panic when exiting process (CTRL-C)

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

goroutine 655 [running]:
github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).Resolve(0x0, 0xc0005c7b00, 0x0, 0x0)
	github.com/AdguardTeam/dnsproxy@v0.39.5/proxy/proxy.go:480 +0x30
github.com/AdguardTeam/AdGuardHome/internal/dnsforward.(*Server).processUpstream(0xc000276f00, 0xc00012bd60, 0x0)
	github.com/AdguardTeam/AdGuardHome/internal/dnsforward/dns.go:544 +0x8c
github.com/AdguardTeam/AdGuardHome/internal/dnsforward.(*Server).handleDNSRequest(0xc000276f00, 0xc000188380, 0xc0005c7b00, 0x0, 0x0)
	github.com/AdguardTeam/AdGuardHome/internal/dnsforward/dns.go:102 +0x2dc
github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).handleDNSRequest(0xc000188380, 0xc0005c7b00, 0x2123b60, 0x28)
	github.com/AdguardTeam/dnsproxy@v0.39.5/proxy/server.go:127 +0x240
github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).udpHandlePacket(0xc000188380, 0xc000bb12f0, 0x28, 0x28, 0xc00047751c, 0x4, 0x4, 0xc0004944e0, 0xc000306040)
	github.com/AdguardTeam/dnsproxy@v0.39.5/proxy/server_udp.go:105 +0x2fc
github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).udpPacketLoop.func1(0xc000188380, 0xc000bb12f0, 0x28, 0x28, 0xc00047751c, 0x4, 0x4, 0xc0004944e0, 0xc000306040, 0x1cc76e8, ...)
	github.com/AdguardTeam/dnsproxy@v0.39.5/proxy/server_udp.go:74 +0x7c
created by github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).udpPacketLoop
	github.com/AdguardTeam/dnsproxy@v0.39.5/proxy/server_udp.go:73 +0x500
  • Version of AdGuard Home server:
    • v0.107.0-b.11
  • How did you install AdGuard Home:
    • Manual, just running the process by hand for now
  • How did you setup DNS configuration:
    • router
  • If it's a router or IoT, please write device model:
    • EdgeRouter ER-12
  • CPU architecture:
    • mips64_softfloat
  • Operating system and version:
    • EdgeOS v2.0.9-hotfix.2

Expected Behavior

Exit cleanly, no crash. v0.106.3 is well behaved wrt CTRL-C

Actual Behavior

panic

@ainar-g ainar-g self-assigned this Sep 27, 2021
@ainar-g ainar-g added this to the v0.107.0 milestone Sep 27, 2021
adguard pushed a commit that referenced this issue Oct 6, 2021
Merge in DNS/adguard-home from 3655-stop-panic to master

Updates #3655.

Squashed commit of the following:

commit 5ffe519
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Wed Oct 6 13:06:33 2021 +0300

    dnsforward: imp code, docs

commit 3a4f04f
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Tue Oct 5 16:42:25 2021 +0300

    dnsforward: lock to read proxy
@EugeneOne1
Copy link
Member

@timkgh, Hello and thank you for the report. Latest edge build contains our solution for the issue. Could you please check if the problem remains?

@EugeneOne1
Copy link
Member

@timkgh, we'll close the issue for now if you don't mind. Please feel free to reopen it if the panic reoccurs.

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

Updates AdguardTeam#3655.

Squashed commit of the following:

commit 5ffe519
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Wed Oct 6 13:06:33 2021 +0300

    dnsforward: imp code, docs

commit 3a4f04f
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Tue Oct 5 16:42:25 2021 +0300

    dnsforward: lock to read proxy
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

3 participants