Skip to content

runtime: threads and their Ms aren't released promptly enough in some case #56668

@mayuehit

Description

@mayuehit

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions