Observed in a freebsd-amd64-12_0 TryBot: https://storage.googleapis.com/go-build-log/2e4c3b9c/freebsd-amd64-12_0_d1b5be43.log
--- FAIL: TestDialerLocalAddr (0.00s)
dial_test.go:647: tcp [::]:0->127.0.0.1: got dial tcp [::]:0->127.0.0.1:22464: connect: address already in use; want <nil>
FAIL
FAIL net 54.481s
This test is also flaky on macOS (#22019), but the symptom on FreeBSD is different from the one observed on macOS (connect: address already in use vs. getsockopt: operation timed out).
Note that the freebsd-arm-paulzhol flake reported in #22019 (comment) matches this one.
CC @ianlancetaylor @mikioh