-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: pageAlloc.allocToCache updates pageAlloc.searchAddr in an invalid way #38605
Comments
Change https://golang.org/cl/229577 mentions this issue: |
@gopherbot Please open a backport issue for 1.14. |
Backport issue(s) opened: #38606 (for 1.14). 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/230377 mentions this issue: |
This and the CL mentioned in the issue aren't a factor in 1.13? |
@networkimprov That's correct. |
…dr in a valid way Currently allocToCache assumes it can move the search address past the block it allocated the cache from, which violates the property that searchAddr should always point to mapped memory (i.e. memory represented by pageAlloc.inUse). This bug was already fixed once for pageAlloc.alloc in the Go 1.14 release via CL 216697, but that changed failed to take into account allocToCache. For #38605. Fixes #38606. Change-Id: Id08180aa10d19dc0f9f551a1d9e327a295560dff Reviewed-on: https://go-review.googlesource.com/c/go/+/229577 Run-TryBot: Michael Knyszek <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: David Chase <[email protected]> (cherry picked from commit 287d1ec) Reviewed-on: https://go-review.googlesource.com/c/go/+/230377 Reviewed-by: Austin Clements <[email protected]> Reviewed-by: Michael Pratt <[email protected]>
Currently allocToCache assumes it can move the search address past the block it allocated the cache from, which violates the property that searchAddr should always point to mapped memory (i.e. memory represented by pageAlloc.inUse). This bug was already fixed once for pageAlloc.alloc in the Go 1.14 release via CL 216697, but that changed failed to take into account allocToCache. Fixes golang#38605. Change-Id: Id08180aa10d19dc0f9f551a1d9e327a295560dff Reviewed-on: https://go-review.googlesource.com/c/go/+/229577 Run-TryBot: Michael Knyszek <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: David Chase <[email protected]>
Currently the page allocator's
allocToCache
method can update the search address in such a way that it doesn't point into memory contained inpageAlloc.inUse
, which violates a documented property.The result of this is an occasional crash. A similar bug was fixed prior to the Go 1.14 release with https://golang.org/cl/216697, but that failed to take into account
allocToCache
. This is causing real failures and we should fix it ASAP. We should also backport it as there is no workaround available when you do run into it.The text was updated successfully, but these errors were encountered: