You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build and run (do http request(127.0.0.1:9876) for 120 seconds and sleep, pprof listen on 127.0.0.1:11111) ./http-client
What did you expect to see?
1 hour gone, the threadcreate number should decrease to normal
What did you see instead?
threadcreate number is still keep in maxium(70+ for go 1.11.10, 20+ for go 1.14)
image for prrof, since http request has been stop for 1 hour
go 1.11
go 1.14
I wonder why http-client.go still keep those idle threads while most of goroutine has exit for a long time.
Is there a way to stop those idle threads?
The text was updated successfully, but these errors were encountered:
toothrot
changed the title
created thread still not exit while goroutine has exit for a long time
runtime: created thread still not exit while goroutine has exit for a long time
Mar 10, 2020
threadcreate - stack traces that led to the creation of new OS threads
Is this not a cumulative number?
It's not clear to me that this is a bug. See https://golang.org/wiki/Questions for help debugging Go. I will close this issue, but please comment if you feel I am incorrect.
threadcreate - stack traces that led to the creation of new OS threads
Is this not a cumulative number?
It's not clear to me that this is a bug. See https://golang.org/wiki/Questions for help debugging Go. I will close this issue, but please comment if you feel I am incorrect.
I check the thread count of http-client process, it does keep 69 threads alive cat /proc/210686/status | grep Threads Threads: 69
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes, still in version
go version go1.14 linux/amd64
but less threadcreate
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I open 2 goroutines and do http request in loop, last 120 seconds
mock-echo-server.go: https://play.golang.org/p/n8oe5bLP3SS
build and run (listen on 127.0.0.1:9876)
./mock-echo-server
http-client.go: https://play.golang.org/p/99AXCkBZp8q
build and run (do http request(127.0.0.1:9876) for 120 seconds and sleep, pprof listen on 127.0.0.1:11111)
./http-client
What did you expect to see?
1 hour gone, the threadcreate number should decrease to normal
What did you see instead?
threadcreate number is still keep in maxium(70+ for go 1.11.10, 20+ for go 1.14)
image for prrof, since http request has been stop for 1 hour
go 1.11
go 1.14
I wonder why
http-client.go
still keep those idle threads while most of goroutine has exit for a long time.Is there a way to stop those idle threads?
The text was updated successfully, but these errors were encountered: