Skip to content
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: incorrect forced information in gctrace #52515

Open
WangLeonard opened this issue Apr 24, 2022 · 1 comment
Open

runtime: incorrect forced information in gctrace #52515

WangLeonard opened this issue Apr 24, 2022 · 1 comment
Labels
NeedsInvestigation
Milestone

Comments

@WangLeonard
Copy link
Contributor

@WangLeonard WangLeonard commented Apr 24, 2022

What version of Go are you using (go version)?

$ go version
go version devel go1.19-b55a2fb3b0 Wed Apr 13 01:15:22 2022 +0000 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

package main

import (
	"runtime"
	"time"
)

var global interface{}

func init() {
	global = make([]interface{}, 100000000) // first gc
}

func main() {
	runtime.GC() // second gc
	time.Sleep(time.Second)
}

go build
GODEBUG=gctrace=1 ./XXX

What did you expect to see?

gc 1 @0.128s 16%: 0.025+251+0.002 ms clock, 0.20+0.13/502/1506+0.019 ms cpu, 1526->1526->1525 MB, 1526 MB goal, 0 MB stacks, 0 MB globals, 8 P
gc 2 @0.380s 18%: 0.040+111+0.004 ms clock, 0.32+0/221/663+0.034 ms cpu, 1525->1525->1525 MB, 3052 MB goal, 0 MB stacks, 0 MB globals, 8 P (forced)

What did you see instead?

gc 1 @0.124s 16%: 0.040+242+0.002 ms clock, 0.32+0.11/484/1447+0.020 ms cpu, 1526->1526->1525 MB, 1526 MB goal, 0 MB stacks, 0 MB globals, 8 P (forced)
gc 2 @0.367s 18%: 0.037+111+0.002 ms clock, 0.29+0/223/658+0.018 ms cpu, 1525->1525->1525 MB, 3052 MB goal, 0 MB stacks, 0 MB globals, 8 P (forced)

@gopherbot
Copy link

@gopherbot gopherbot commented Apr 24, 2022

Change https://go.dev/cl/401776 mentions this issue: runtime: fix incorrect forced information in gctrace

@cagedmantis cagedmantis added the NeedsInvestigation label Apr 27, 2022
@cagedmantis cagedmantis added this to the Backlog milestone Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation
Projects
None yet
Development

No branches or pull requests

3 participants