[GH-ISSUE #126] Nil pointer when remote server get timeout #52

Closed
opened 2026-02-26 04:33:54 +03:00 by kerem · 0 comments
Owner

Originally created by @mageddo on GitHub (Apr 22, 2019).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/126

Originally assigned to: @mageddo on GitHub.

What is expected

When server returns a nil msg DPS just logs it

What is Happening

A nil pointer is been thrown

2019/04/22 04:38:18 INFO f=remote.go:68 pkg=github.com/mageddo/dns-proxy-server/proxy.remoteDnsSolver m=Solve uuid=089AAA33-0CC7-0688-007B-54281483DAF8 status=complete, name=netmon-control.dropbox.com.spo.virtua.com.br., res=-1, err=status=answer-can-not-be-null, err=read udp 172.17.0.2:56086->8.8.8.8:53: i/o timeout
2019/04/22 04:38:18 ERROR f=asm_amd64.s:522 pkg=runtime m=call32 uuid=089AAA33-0CC7-0688-007B-54281483DAF8 status=fatal-error-handling-question, req=[{Name:netmon-control.dropbox.com.spo.virtua.com.br. Qtype:1 Qclass:1}], err=runtime error: invalid memory address or nil pointer dereference, stack=goroutine 607 [running]:
runtime/debug.Stack(0xc0000d9ba0, 0x788520, 0xac58c0)
	/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
main.handleQuestion.func1(0x8597c0, 0xc0001a8db0, 0xc00057ec60)
	/app/src/github.com/mageddo/dns-proxy-server/dns.go:32 +0x57
panic(0x788520, 0xac58c0)
	/usr/local/go/src/runtime/panic.go:513 +0x1b9
main.handleQuestion(0x85bd20, 0xc0003fe380, 0xc00057ec60)
	/app/src/github.com/mageddo/dns-proxy-server/dns.go:52 +0x5bd
github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.HandlerFunc.ServeDNS(0x80f5b8, 0x85bd20, 0xc0003fe380, 0xc00057ec60)
	/app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:84 +0x44
github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*ServeMux).ServeDNS(0xc00028fae0, 0x85bd20, 0xc0003fe380, 0xc00057ec60)
	/app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:210 +0x62
github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serve(0xc000360270, 0x857f20, 0xc000096240, 0x856080, 0xc00028fae0, 0xc000405000, 0x3e, 0x200, 0xc000384010, 0xc00040a000, ...)
	/app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:579 +0x2bd
created by github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serveUDP
	/app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:533 +0x2a7

Originally created by @mageddo on GitHub (Apr 22, 2019). Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/126 Originally assigned to: @mageddo on GitHub. ### What is expected When server returns a nil msg DPS just logs it ### What is Happening A nil pointer is been thrown ``` 2019/04/22 04:38:18 INFO f=remote.go:68 pkg=github.com/mageddo/dns-proxy-server/proxy.remoteDnsSolver m=Solve uuid=089AAA33-0CC7-0688-007B-54281483DAF8 status=complete, name=netmon-control.dropbox.com.spo.virtua.com.br., res=-1, err=status=answer-can-not-be-null, err=read udp 172.17.0.2:56086->8.8.8.8:53: i/o timeout 2019/04/22 04:38:18 ERROR f=asm_amd64.s:522 pkg=runtime m=call32 uuid=089AAA33-0CC7-0688-007B-54281483DAF8 status=fatal-error-handling-question, req=[{Name:netmon-control.dropbox.com.spo.virtua.com.br. Qtype:1 Qclass:1}], err=runtime error: invalid memory address or nil pointer dereference, stack=goroutine 607 [running]: runtime/debug.Stack(0xc0000d9ba0, 0x788520, 0xac58c0) /usr/local/go/src/runtime/debug/stack.go:24 +0xa7 main.handleQuestion.func1(0x8597c0, 0xc0001a8db0, 0xc00057ec60) /app/src/github.com/mageddo/dns-proxy-server/dns.go:32 +0x57 panic(0x788520, 0xac58c0) /usr/local/go/src/runtime/panic.go:513 +0x1b9 main.handleQuestion(0x85bd20, 0xc0003fe380, 0xc00057ec60) /app/src/github.com/mageddo/dns-proxy-server/dns.go:52 +0x5bd github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.HandlerFunc.ServeDNS(0x80f5b8, 0x85bd20, 0xc0003fe380, 0xc00057ec60) /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:84 +0x44 github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*ServeMux).ServeDNS(0xc00028fae0, 0x85bd20, 0xc0003fe380, 0xc00057ec60) /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:210 +0x62 github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serve(0xc000360270, 0x857f20, 0xc000096240, 0x856080, 0xc00028fae0, 0xc000405000, 0x3e, 0x200, 0xc000384010, 0xc00040a000, ...) /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:579 +0x2bd created by github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns.(*Server).serveUDP /app/src/github.com/mageddo/dns-proxy-server/vendor/github.com/miekg/dns/server.go:533 +0x2a7 ```
kerem 2026-02-26 04:33:54 +03:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dns-proxy-server-mageddo#52
No description provided.