-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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/race: adding support for the race detector on other platforms #19273
Comments
CC @dvyukov |
No objections, if somebody does the work. |
I've added NetBSD/amd64 support in LLVM TSan. This could be integrated with golang CI infrastructure. https://blog.netbsd.org/tnf/entry/the_llvm_thread_sanitizer_has |
Note that we check in binary blobs to the Go repo:
They are built using: |
I've repeated the steps for building race_netbsd_amd64.syso.
My golang patch:
But I'm getting the following error when attempting to use it:
Investigating. |
@bradfitz other .syso files seem to have similar symbols undefined. Are there suggestions how to address it? |
I have no clue. I've never built these binaries before, nor have I worked on the race detector. Maybe @ianlancetaylor or @dvyukov know. |
Most likely you need to edit the build constraints in the flie runtime/race/race.go so that your system is recognized. |
This has improved the situation. I'm now down to unrecognized __ps_strings.
I'm researching how to fix it. |
http://www.netbsd.org/~kamil/llvm/go-tsan-2017-12-06.txt
|
http://www.netbsd.org/~kamil/llvm/0001-Add-initial-TSan-NetBSD-support.patch @bradfitz feel free to merge this with HEAD. (my CLA is signed for Google projects) My .syso file: http://www.netbsd.org/~kamil/llvm/race_netbsd_amd64.syso Feel free to regenerate it from scratch or take this one as is and commit to the golang repository. I cannot focus on the racy tests soon, as I'm burdened with MSan now. |
@krytarowski, the tree is closed right now for release. Only bug fixes can go in, not features. We can merge fun things in February. Also, we'd need to generate the syso ourselves (not shipping a random binary off the network), so you'd first need to send a change to x/build/cmd/racebuild See https://golang.org/doc/contribute.html for how to submit a git patch to Gerrit. We only do it for people in very rare circumstance. |
OK, thanks. In February hopefully there will be an option to get MSan aboard. |
FYI, I'm working on adding the necessary changes in LLVM TSan so we can get the race detectors on ppc64le. (edit: sorry, little endian only) |
Great to see ppc64le development around. FreeBSD is improving their POWER8 support lately.. I would love to see it with NetBSD as well (but hw price isn't easily reachable for a hobbyist). |
@krytarowski if you need machine access, you may try a POWER8 VM in one of our OpenPOWER Mini Clouds, like this. |
Personally I prefer to use a real hardware when porting the kernel and userland. But thanks! |
Change https://golang.org/cl/112881 mentions this issue: |
Change https://golang.org/cl/112880 mentions this issue: |
Updates golang/go#24354. Updates golang/go#19273. Updates golang/go#24322. Change-Id: Ia67fde51d7698ca94d86c4697fd153a551a8ceee Reviewed-on: https://go-review.googlesource.com/112880 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Updates golang/go#19273. Updates golang/go#24354. Updates golang/go#23731. Change-Id: Iad8870b265e7e3b56b5219d3367ccef70dcc0679 Reviewed-on: https://go-review.googlesource.com/112881 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Change https://golang.org/cl/99835 mentions this issue: |
Recognize NetBSD in: - go/internal/work/init.go - race.bash - runtime/race/race.go Add __ps_strings symbol in runtime/cgo/netbsd.go as this is used internally in the TSan library for NetBSD and used for ReExec(). Tested on NetBSD/amd64 v. 8.99.12. Around 98% tests are passing for the ./race.bash target. Updates #19273 Change-Id: Ic0e48d2fb159a7868aab5e17156eeaca1225e513 GitHub-Last-Rev: d6e0827 GitHub-Pull-Request: #24322 Reviewed-on: https://go-review.googlesource.com/99835 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Hi Everyone,
Following on from this discussion on the golang-nuts list, about supporting the race detector on ARM hardware, I'm opening this issue to track the suggestion.
The ThreadSanitizer that the Go race detector is based on supports x86_64, aarch64 (i.e.Arm8 64-bit), mips64 and powerpc64. Currently Go only supports the race detector on x86_64 hardware.
Would it be possible for a future release of Go to support the race detector on the other platforms - aarch64, mips64 and powerpc64.
Thanks
Owen
The text was updated successfully, but these errors were encountered: