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
net: TestDialFailPDLeak failure #6553
Labels
Comments
Owner changed to @ianlancetaylor. Status changed to Started. |
This issue was closed by revision 649fc25. Status changed to Fixed. |
This test still seems flaky, as reported here: https://golang.org/cl/14526048#msg6 |
CL https://golang.org/cl/14742043 references this issue. |
Applying https://golang.org/cl/90370043 and running with -test.cpu=2 makes the test fail reliably on my system, instead of intermittently. I don't see how to make the test as written work. Consider the following (after applying CL 90370043): $ go test -c net $ GODEBUG=allocfreetrace=1 ./net.test -test.cpu=2 -test.run=TestDialFailPDLeak -test.v 2> aft.log $ grep "single object" aft.log | awk -F "," '{print $3}' | sort | uniq -c | sort -n -r | head 2523 single object of net.TCPAddr) 2503 single object of net.OpError) 2500 single object of syscall.SockaddrInet4) 2500 single object of struct { F uintptr; A0 *sync.WaitGroup; A1 **net.Dialer; A2 **testing.T }) 2500 single object of net.netFD) 689 single object) 43 single object of errors.errorString) 26 single object of net.Interface) 22 single object of syscall.SockaddrDatalink) 22 single object of syscall.InterfaceMessage) Every pass through the loop allocates a net.TCPAddr, a net.OpError, a syscall.SockaddrInet4, a closure, and a net.netFD. The test as written assumes that nothing in the loop allocates, and thus any allocs must be due to allocPollDesc. I'm not sure how to alter the test to fix this, aside perhaps from instrumenting allocPollDesc directly. Suggestions? |
Naively switching to runtime.MemStats.OtherSys didn't do the trick. Surprisingly, there were no OtherSys allocs at all during the first few loops, which makes me wonder whether runtime.MemStats.OtherSys is working correctly. I'd be curious to see CL 14742043, if it is still floating around somewhere on your machine. (I'm just tired of ignoring this test failure when running other net tests.) |
CL https://golang.org/cl/98080043 mentions this issue. |
This issue was closed by revision f40f0b2. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: