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: update syso files with tsan atomics for And/Or #62624
Comments
@gopherbot add NeedsFix, RaceDetector |
It's worth noting that previous updates to the syso files have caused issues, for example #37485. Since the race runtimes haven't been recompiled for almost a year we need to be careful when doing so. |
Change https://go.dev/cl/528315 mentions this issue: |
The upstream llvm support for the and/or tsan operators was cherry picked as llvm/llvm-project@51bfeff, I'll try to move forward with this as soon as I get gomote access. |
cc @cherrymui |
Working on it. Apparently there are a few things needed to be changed in |
Thanks @cherrymui. Additionally, I remember reading somewhere (I can't seem to find the source now) that some platforms still rely on tsan v2 that don't have these new operators. Can you confirm that? And if so how to proceed? Thanks Here is what I have on my notes (no source, sorry!)
|
@mauri870 good point! windows/amd64 is already updated to v3 (https://go.dev/cl/420197). It is probably true that openbsd will remain v2. On openbsd, is it possible to write the new operations as a CAS loop and just use the CAS operation from TSAN? Thanks |
Well it seems like we will have some additional work on openbsd, but it should be possible to have a race_openbsd_amd64.s that uses a tsan CAS, afaik race only works on openbsd/amd64. |
Change https://go.dev/cl/543035 mentions this issue: |
TSAN recently got support for Go's new atomic And and Or operations (#61395). This CL updates the race syso files to include the change. Also regenerate cgo dynamic imports on darwin. OpenBSD/AMD64 is not updated, as TSAN no longer supports OpenBSD (#52090). Linux/PPC64 is not updated, as I'm running into some builder issues. Still working on it. For #61395. For #62624. Change-Id: Ifc90ea79284f29a356f9e8a5f144f6c690881395 Reviewed-on: https://go-review.googlesource.com/c/go/+/543035 Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Change https://go.dev/cl/543397 mentions this issue: |
In order to implement the race variants for the new sync/atomic And/Or operators proposed in #61395 we need to build new syso files as well as implementing these atomic operations for the llvm thread sanitizer.
I already have a patch under review llvm/llvm-project#65695 that adds support for the new functions, but that is still hanging, awaiting to be merged. I would appreciate it if someone with closer ties to llvm could draw the maintainers attention to it.
Once the patch is merged we need to use x/build/cmd/racebuild with llvm HEAD to build the new syso files in runtime/race and commit them.
The text was updated successfully, but these errors were encountered: