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
Go test fails with signal: bus error on MacOS Catalina #35478
Comments
A I recommend opening an issue against |
@bcmills thanks for your response. I'm curious why this error only occurs on darwin and not in Linux. The Cgo code is the same for both OS. |
The macOS and Linux C toolchains are markedly different. macOS tends to default to Most likely the program is triggering some sort of undefined behavior that happens to crash hard on macOS and not on Linux. You might be able to figure out more by running under various sanitizers ( |
(I should add, though — sanitizers will catch errors that occur only on the C side. They will not, in general, diagnose errors that arise from interactions across language boundaries.) |
Thanks, I'll keep debugging and try the sanitizer. |
I've compiled the project C dependencies with most recent clang version from brew and not the one which comes with the official xcode command line tools and it worked. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Executing a single test in my project:
go test -timeout 30s github.com/bbva/qed/consensus -run \^\(TestApplyAdd\)\$
This seams to happen only in projects when you use CGO.
What did you expect to see?
Pass the tests.
What did you see instead?
Full system log > https://gist.github.com/suizman/3907c15e818807604ffe4a11095c7020#file-consensus-test
The text was updated successfully, but these errors were encountered: