In helm.sh/helm/v3 v3.9.4 the method reportToRun is implemented as follow:
func (i *Install) reportToRun(c chan<- resultMessage, rel *release.Release, err error) {
i.Lock.Lock()
if err != nil {
rel, err = i.failRelease(rel, err)
}
c <- resultMessage{r: rel, e: err}
i.Lock.Unlock()
}
I have confirmed that after performing an install action (using RunWithContext) leads to goroutine leak.

The above screenshot shows that goroutines are stuck in reportToRun. Here a sample stack trace of one of those routines:
goroutine 15463 [chan send, 32 minutes]:
helm.sh/helm/v3/pkg/action.(*Install).reportToRun(0xc0026086e0, 0xc0026804c0?, 0x3?, {0x22dd9c0?, 0xc006a7bf20?})
/go/pkg/mod/helm.sh/helm/[email protected]/pkg/action/install.go:435 +0xd6
helm.sh/helm/v3/pkg/action.(*Install).performInstall(0xc0026086e0, 0xc005269f60?, 0xc005216310, {0x0?, 0x0?, 0x0?}, {0xc0026804c0, 0x3, 0x4})
/go/pkg/mod/helm.sh/helm/[email protected]/pkg/action/install.go:389 +0x2ea
created by helm.sh/helm/v3/pkg/action.(*Install).RunWithContext
/go/pkg/mod/helm.sh/helm/[email protected]/pkg/action/install.go:349 +0x128a
The block seems to be in the chan send call.
On another note, I believe if we fall into the error path, the i.Lock will stay locked forever.
In helm.sh/helm/v3 v3.9.4 the method
reportToRunis implemented as follow:I have confirmed that after performing an install action (using
RunWithContext) leads to goroutine leak.The above screenshot shows that goroutines are stuck in
reportToRun. Here a sample stack trace of one of those routines:The block seems to be in the
chan sendcall.On another note, I believe if we fall into the error path, the
i.Lockwill stay locked forever.