-
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
sync: random errors on sync.Once running on MacOS Mojave or High Serra #30453
Comments
Interestingly, we also see a similar bug in another place. That one is not related to macOS. |
I saw a similar error on darwin/arm64. I don't know if it is related. https://build.golang.org/log/cea072d8d5ec55f28dad2e766457dc19e9a19b87
|
@gopherbot, please backport to 1.12: this is an apparent regression in a core synchronization library. |
Backport issue(s) opened: #30470 (for 1.12). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Change https://golang.org/cl/164118 mentions this issue: |
Change https://golang.org/cl/164629 mentions this issue: |
With stack objects, when we scan the stack, it scans defers with tracebackdefers, but it seems to me that tracebackdefers doesn't include the func value itself, which could be a stack allocated closure. Scan it explicitly. Alternatively, we can change tracebackdefers to include the func value, which in turn needs to change the type of stkframe. Updates #30453. Fixes #30470. Change-Id: I55a6e43264d6952ab2fa5c638bebb89fdc410e2b Reviewed-on: https://go-review.googlesource.com/c/164118 Reviewed-by: Keith Randall <khr@golang.org> (cherry picked from commit 4f4c2a7) Reviewed-on: https://go-review.googlesource.com/c/164629 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
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?
Upgraded from go1.11.5 to go1.12, recompile with same flags.
No OS changes between compiler upgrades.
XCode Version 10.1 (10B61) with all tools installed (the step Xcode forces you to take to open it the first time)
No source code changes between compiler upgrades.
What did you expect to see?
No panics.
What did you see instead?
The block of code that triggers the error is:
(I could not produce a synthetic version of the code that triggers this)
Occasionally, it also panics with:
The text was updated successfully, but these errors were encountered: