From: Russ Cox Date: Mon, 10 Nov 2014 01:21:03 +0000 (-0500) Subject: runtime: fix sudog leak in syncsemrelease X-Git-Tag: go1.4rc1~21 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2ad99f09609de1e709aeacaeb277d637729e8081;p=gostls13.git 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 --- diff --git a/src/runtime/sema.go b/src/runtime/sema.go index a42a29988a..d2a028c01b 100644 --- a/src/runtime/sema.go +++ b/src/runtime/sema.go @@ -259,6 +259,7 @@ func syncsemrelease(s *syncSema, n uint32) { } s.tail = w goparkunlock(&s.lock, "semarelease") + releaseSudog(w) } else { unlock(&s.lock) }