Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: segfault during test using -coverpkg and -race. #28109
What version of Go are you using (
changed the title from
Segfault during test using -coverpkg and -race.
cmd/go: segfault during test using -coverpkg and -race.
Oct 10, 2018
I don't have a repro as it happens in the middle of a larger suite with a number of parallel tests running. However it appears to be related mainly to the race detector. I have not seen the faults without the race detector and without the coverpkg option. For example here is another one, with race detector but without any coverage:
It seems to be a problem that my Init function which spawns a go thread takes a *tor.Tor argument, which for these tests is never used (just testing paths where we don't make connections, so it's never invoked) so I pass in a
PeerWithOnion should never be called, and the test passes, but as you can see from the segfault trace, it has tracked into PeerWithOnion which calls ManagePeerConections which starts a goroutine
What is really weird is since we've supplied
when the tor.Tor (our nil) object tries to access a field it finally explodes and fails
hope this is helpful.