升级到go1.5后,DNS解析超时

After upgrading from go1.3 to go1.5.2, I have been experiencing DNS request timeouts in my connections which go through ResolveTCPAddr() API in net library. I dug a little deeper to see what's going wrong in go1.5 because there's was a mention of DNS resolution implementation change in release notes of go1.5.

https://golang.org/doc/go1.5#net

In go1.5, for DNS resolution of unknown address, there's first a UDP dial and then a TCP dial to make the DNS request.

https://github.com/golang/go/blob/release-branch.go1.5/src/net/dnsclient_unix.go#L134

Sometimes, the read on UDP conn for a dns request is timing out (which could be for whatever reason being UDP) and my connection establishment is terribly slowing down (1ms becomes 5sec sometimes) randomly.

This made me force --netcgo flag at compile time to revert to old behavior mentioned in the release notes. But I want to resolve this without have to force anything that's not default.

Is this a known issue? Did anybody else run into this? I also want to understand why its making a udp connection first and what it did earlier and what changed for this to act differently now.