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: threads and their Ms aren't released promptly enough in some case #56668

Open
mayuehit opened this issue Nov 9, 2022 · 3 comments
Open
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@mayuehit
Copy link

mayuehit commented Nov 9, 2022

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

$ 1.17

Does this issue reproduce with the latest release?

i don't know

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

go env Output
$ go env
GOOS="linux"
GOPATH="/root/go"
GOVERSION="go1.17"
GOHOSTARCH="amd64"
GOARCH="amd64"

What did you do?

Use pprof find thread is more than goroutine
image
confirm the thread is 35 in os
image

It result in the memory increase caused by runtime.allocm and it is not released
image

What did you expect to see?

1、The number of threads decreases.
2、Memory growth caused by runtime.allocm no longer occurs

What did you see instead?

1、The number of threads is more than goroutine and not destroy.
2、Memory growth caused by runtime.allocm occurs

@mknyszek mknyszek changed the title Threadcreate is Even More Than goroutine and Memory Is Not Released Made by runtime.allocm runtime: threads and their Ms aren't released promptly enough in some case Nov 9, 2022
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Nov 9, 2022
@mknyszek mknyszek added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed compiler/runtime Issues related to the Go compiler and/or runtime. labels Nov 9, 2022
@mknyszek mknyszek added this to the Backlog milestone Nov 9, 2022
@mknyszek
Copy link
Contributor

mknyszek commented Nov 9, 2022

Does this reproduce with Go 1.18, Go 1.19, or at tip? For the record, Go 1.17 is no longer supported (https://go.dev/doc/devel/release#policy).

CC @golang/runtime

@mayuehit
Copy link
Author

mayuehit commented Nov 9, 2022

Does this reproduce with Go 1.18, Go 1.19, or at tip? For the record, Go 1.17 is no longer supported (https://go.dev/doc/devel/release#policy).

CC @golang/runtime

I dont know, maybe I could try use go 1.8 tomorrow to see if it still happen. I will report the result in 24 hours.

@mayuehit
Copy link
Author

Does this reproduce with Go 1.18, Go 1.19, or at tip? For the record, Go 1.17 is no longer supported (https://go.dev/doc/devel/release#policy).

CC @golang/runtime

It reproduce with Go 1.18 @mknyszek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants