-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: -race data race map traceback report incorrect functions #73191
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
Comments
@gopherbot Please backport to 1.24. This is a minor issue. DATA RACE reports for races in fast-variant maps (int or string keys) will report the wrong map function (e.g., mapassign vs mapassign_fast32). This is a reporting issue only that may cause confusion for readers, as it seems to be an "impossible" call that doesn't appear in the assembly. The most confusing one is map delete, which will report as map assign. This only affects |
Backport issue(s) opened: #73192 (for 1.24). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Change https://go.dev/cl/663175 mentions this issue: |
Change https://go.dev/cl/663777 mentions this issue: |
… race.WritePC/race.ReadPC Fixes #73192 For #73191 Change-Id: I0f8a5a19faa745943a98476c7caf4c97ccdce184 Reviewed-on: https://go-review.googlesource.com/c/go/+/663175 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Pratt <[email protected]> Auto-Submit: Michael Pratt <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> (cherry picked from commit 14b15a2) Reviewed-on: https://go-review.googlesource.com/c/go/+/663777 Reviewed-by: Carlos Amedee <[email protected]> Auto-Submit: Junyang Shao <[email protected]> Reviewed-by: Junyang Shao <[email protected]>
The fast variant swissmap functions report the wrong PC to TSAN in their custom instrumentation, which results in incorrect stack traces when races are found and
GOTRACEBACK=system
or higher (by default the runtime frame is hidden).In the DATA RACE report, the read should say
runtime.mapaccess1_fast64
, notruntime.mapaccess1
and the write should sayruntime.mapassign_fast64
, notruntime.mapassign
.Note that the always-enabled concurrent map read/write throw got the stack correct because it is just a normal throw, but that isn't guaranteed to catch a race when TSAN does.
Thanks @mateusz834 for finding this.
The text was updated successfully, but these errors were encountered: