-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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: gccheckmark does nothing? #69074
Comments
cc @golang/runtime @aclements @mknyszek |
I don't think this part is surprising. Note that useCheckmark is typically only enabled temporarily during each GC: https://cs.opensource.google/go/go/+/master:src/runtime/mgc.go;l=999-1005;drc=96d8ff00c2d6a88384863a656fb5e53716b614d3;bpv=1;bpt=1 |
+1 to what @prattmic said, setting As for:
What did you use to check to see if
I think you misunderstand what that code is doing. That is not a narrow window, it's effectively running an entire second single-threaded GC cycle while the world is stopped. |
Thanks for reporting, there does seem to be an issue. In particular, what I'm finding is that Also, this code really should have at least a trivial test... |
Change https://go.dev/cl/608915 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
2 things: First I ran a program with
GODEBUG=gccheckmark=1.
WhensetCheckmark
wasn't called, I tried to build the go source code after manually settingvar useCheckmark = true
What did you expect to see?
It depends on whether I had simply run a program with
GODEBUG=gccheckmark=1
or altered the source code as described above.setCheckmark to be called at some point
The source code to build after I set
useCheckmark = true
What did you see instead?
gcMarkTermination
, so this line of code in mgcmark.go never runsThe text was updated successfully, but these errors were encountered: