Commit 2ad99f09 authored by Russ Cox's avatar Russ Cox

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
parent 2cd05c34
......@@ -259,6 +259,7 @@ func syncsemrelease(s *syncSema, n uint32) {
}
s.tail = w
goparkunlock(&s.lock, "semarelease")
releaseSudog(w)
} else {
unlock(&s.lock)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment