-
Notifications
You must be signed in to change notification settings - Fork 18k
internal/coverage: runtime.(*wbBuf).putFast SEGV in cover-related cmd/go tests on 386 #56044
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
I was able to narrow this down to just the runtime package, and then eventually with some debugging code (to selectively turn off coverage instrumentation) to the method
but more crucially what seems to be happening here is that the presence of coverage instrumentation was preventing the method from being inlined. This in turn was due to a weakness in the code that I added to the inliner back in CL 401235. The real problem however is that arenaIdx.l1() is not marked as nosplit, even though it is called from other nosplit functions (e.g. |
Change https://go.dev/cl/441858 mentions this issue: |
Change https://go.dev/cl/441859 mentions this issue: |
This patch fixes up a bug in the inliner's special case code for coverage counter updates, which was not properly working for -covermode=atomic compilations. Updates #56044. Change-Id: I9e309312b123121c3df02862623bdbab1f6c6a4b Reviewed-on: https://go-review.googlesource.com/c/go/+/441858 Reviewed-by: David Chase <[email protected]> Run-TryBot: Than McIntosh <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
This patch fixes up a bug in the inliner's special case code for coverage counter updates, which was not properly working for -covermode=atomic compilations. Updates golang#56044. Change-Id: I9e309312b123121c3df02862623bdbab1f6c6a4b Reviewed-on: https://go-review.googlesource.com/c/go/+/441858 Reviewed-by: David Chase <[email protected]> Run-TryBot: Than McIntosh <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
Mark the "l1" and "l2" methods on "arenaIdx" with //go:nosplit, since these methods are called from a nosplit context (for example, from "spanOf"). Fixes golang#56044. Updates golang#21314. Change-Id: I48c7aa756b59a13162c89ef21066f83371ae50f1 Reviewed-on: https://go-review.googlesource.com/c/go/+/441859 Reviewed-by: Cherry Mui <[email protected]> Run-TryBot: Than McIntosh <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Only on tip.
What operating system and processor architecture are you using (
go env
)?This is running with GOARCH=386 on a linux/amd64 machine.
What did you do?
What did you expect to see?
Clean run.
What did you see instead?
Failures of this form (note: the details of interest are elided by watchflakes, click through to the log to see the real failures):
2022-09-30 23:00 linux-386-longtest go@76c1a501 cmd/go.TestScript (log)
2022-09-30 23:03 linux-386-longtest go@aeab76f0 cmd/go.TestScript (log)
These were found by watchflakes and noticed by @bcmills.
By running the test in question in a loop, I've seen a couple of failures out of about 1000 runs, so it is definitely possible to reproduce by hand with some patience.
I am not immediately clear on what's happening here, or how this might related to code coverage, but it needs to be looked at.
The text was updated successfully, but these errors were encountered: