davecheney / mdns

Multicast DNS library for Go
http://www.multicastdns.org/
BSD 2-Clause "Simplified" License
194 stars 30 forks source link

dns: buffer size too small #8

Open srid opened 11 years ago

srid commented 11 years ago

a coworker is sporadically seeing this on his VM (upon Publish):

2013/01/10 16:20:40 Cound not read from &{%!s(*net.netFD=&{{0 0} 0 false 8 10 2 false 0xf840080280 0xf84008a240 0xf84008a2a0 udp6 0xf84006cce0 <nil> 0 {0 0} 0 {0 0} 0 0})}: dns: buffer size too small
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x28 pc=0x429d2e]

goroutine 9 [running]:
github.com/davecheney/mdns.(*connector).readloop(0xf84006cd40, 0xf8400ce000, 0x0, 0x0)
    /s/go/src/github.com/davecheney/mdns/mdns.go:190 +0x12f
created by github.com/davecheney/mdns.(*connector).mainloop
    /s/go/src/github.com/davecheney/mdns/mdns.go:199 +0x5f

this was against an older version of mikeg/dns ... but we're now testing against latest revision of that repo (will report on that later).

davecheney commented 11 years ago

Hello,

This package is in dire need of attention which I don't have time to give at the moment. I'm happy to accept patches, but given this was one of the first bits of code I wrote 2 years ago. It might be more reasonable to use it as an example for writing your own library.

On Fri, Jan 11, 2013 at 12:02 PM, Sridhar Ratnakumar < notifications@github.com> wrote:

a coworker is sporadically seeing this on his VM (upon Publish):

2013/01/10 16:20:40 Cound not read from &{%!s(*net.netFD=&{{0 0} 0 false 8 10 2 false 0xf840080280 0xf84008a240 0xf84008a2a0 udp6 0xf84006cce0 0 {0 0} 0 {0 0} 0 0})}: dns: buffer size too small panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x28 pc=0x429d2e]

goroutine 9 [running]:github.com/davecheney/mdns.(_connector).readloop(0xf84006cd40, 0xf8400ce000, 0x0, 0x0) /s/go/src/github.com/davecheney/mdns/mdns.go:190 +0x12f created by github.com/davecheney/mdns.(_connector).mainloop /s/go/src/github.com/davecheney/mdns/mdns.go:199 +0x5f

this was against an older version of mikeg/dns ... but we're testing against latest revision of that repo.

— Reply to this email directly or view it on GitHubhttps://github.com/davecheney/mdns/issues/8.

srid commented 11 years ago

I don't have time to give at the moment

that's ok; i filed a bug anyway for reference. not sure if i have time and expertise to look into this myself though ... (so may go back to using avahi-daemon).

fwiw, this was only happening when run from a virtualbox vm under ubuntu (eg: not seeing it on vmware fusion on mac).