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
goleak: Errors on successful test run: found unexpected goroutines:
[Goroutine 26 in state chan receive, with github.com/microsoft/ApplicationInsights-Go/appinsights.(*throttleManager).Stop on top of the stack:
github.com/microsoft/ApplicationInsights-Go/appinsights.(*throttleManager).Stop(0xc000136768)
/Users/crobert/go/pkg/mod/github.com/microsoft/[email protected]/appinsights/throttle.go:65 +0xdf
github.com/microsoft/ApplicationInsights-Go/appinsights.(*inMemoryChannelState).stop(0xc0003aa050)
/Users/crobert/go/pkg/mod/github.com/microsoft/[email protected]/appinsights/inmemorychannel.go:360 +0xd8
github.com/microsoft/ApplicationInsights-Go/appinsights.(*InMemoryChannel).acceptLoop(0xc0004069c0)
/Users/crobert/go/pkg/mod/github.com/microsoft/[email protected]/appinsights/inmemorychannel.go:149 +0x46
created by github.com/microsoft/ApplicationInsights-Go/appinsights.NewInMemoryChannel in goroutine 24
/Users/crobert/go/pkg/mod/github.com/microsoft/[email protected]/appinsights/inmemorychannel.go:59 +0x2a5
]
From what I can tell, throttleManager.Stop() is blocking while waiting for a message to be sent on the result channel. However, in the problem method waitForThrottle(), the other running goroutine does not send a message to msg.result when the message with stop: true is sent to the msg channel. This means the stop operation is sent successfully, but since there's nothing sent to the result channel, it blocks forever in Stop().
The text was updated successfully, but these errors were encountered:
I'm working on enabling goleak checks in another project (context here: open-telemetry/opentelemetry-collector-contrib#30438), and a leak has been detected in this package.
Goleak output:
From what I can tell,
throttleManager.Stop()
is blocking while waiting for a message to be sent on theresult
channel. However, in the problem methodwaitForThrottle()
, the other running goroutine does not send a message tomsg.result
when the message withstop: true
is sent to themsg
channel. This means the stop operation is sent successfully, but since there's nothing sent to theresult
channel, it blocks forever inStop()
.The text was updated successfully, but these errors were encountered: