mirror of
https://github.com/golang/go
synced 2024-11-19 11:34:49 -07:00
runtime: fix sudog leak in syncsemrelease
Manifested as increased memory usage in a Google production system. Not an unbounded leak, but can significantly increase the number of sudogs allocated between garbage collections. I checked all the other calls to acquireSudog. This is the only one that was missing a releaseSudog. LGTM=r, dneil R=dneil, r CC=golang-codereviews https://golang.org/cl/169260043
This commit is contained in:
parent
2cd05c3404
commit
2ad99f0960
@ -259,6 +259,7 @@ func syncsemrelease(s *syncSema, n uint32) {
|
||||
}
|
||||
s.tail = w
|
||||
goparkunlock(&s.lock, "semarelease")
|
||||
releaseSudog(w)
|
||||
} else {
|
||||
unlock(&s.lock)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user