-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
runtime: segfault during test using -coverpkg and -race #28109
Comments
Do you have a shortened reproducer or perhaps a sample repo for us to test this out and reproduce it ourselves ? |
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:
|
@agnivade Anyway I can narrow down the PC address to help point in a right direction? |
/cc @ianlancetaylor for further comments. |
The signal report is giving you a PC address. Can you tell us what is at that address? |
go 1.10.3
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 test
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. |
What version of Go are you using (
go version
)?go1.11.1
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?Linux amd64
What did you do?
go test -c -o aTestBinary -coverpkg package1,package2,package3 -covermode atomic -race -ldflags '-w -s -extldflags "-static -Wl,--no-export-dynamic"'
./aTestBinary -test.v -test.run . -test.coverprofile coverout
What did you expect to see?
Success
What did you see instead?
Probably related #23882?
The text was updated successfully, but these errors were encountered: