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

crashes on some lookups #25

Open
balboah opened this issue Aug 25, 2020 · 0 comments
Open

crashes on some lookups #25

balboah opened this issue Aug 25, 2020 · 0 comments

Comments

@balboah
Copy link

balboah commented Aug 25, 2020

Hello,

While using coredns 1.7.0 with the config:

    .:53 {
        debug
        health {
           lameduck 5s
        }
        ready
        prometheus :9153
        unbound

        cache

        loop
        reload
    }

And querying for ipleak.net, I get a crash:

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

goroutine 799 [running]:
github.com/coredns/coredns/plugin/cache.key(0xc00003e190, 0xb, 0xc0003a3a70, 0x0, 0x0, 0x0, 0xc0002a4300)
	/src/coredns-1.7.0/plugin/cache/cache.go:78 +0xca
github.com/coredns/coredns/plugin/cache.(*ResponseWriter).WriteMsg(0xc0002aa300, 0xc0003a3a70, 0x1, 0x1)
	/src/coredns-1.7.0/plugin/cache/cache.go:162 +0x165
github.com/coredns/unbound.(*Unbound).ServeDNS(0xc00060e6e0, 0xdf6380, 0xc0002a4330, 0xdfdfe0, 0xc0002aa300, 0xc0002a8d80, 0xc000070bf0, 0x1, 0x1)
	/go/pkg/mod/github.com/coredns/unbound@v0.0.6/unbound.go:140 +0x4ca
github.com/coredns/coredns/plugin.NextOrFailure(0xd00513, 0x4, 0xdebe80, 0xc00060e6e0, 0xdf6380, 0xc0002a4330, 0xdfdfe0, 0xc0002aa300, 0xc0002a8d80, 0x0, ...)
	/src/coredns-1.7.0/plugin/plugin.go:80 +0xfb

If I remove the cache entry from the config, I get no crash but also an empty reply.
If I leave cache but replace unbond with forward, everything works fine

It seems to only happen on some cases, resolving google.com works fine with the above example config

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

Successfully merging a pull request may close this issue.

1 participant