-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Goroutine leaks in TestClientHandshakeBasedOnClusterName #5091
Comments
We do have our own leakcheck implementation in https://github.com/grpc/grpc-go/blob/master/internal/leakcheck/leakcheck.go. I've sent #5098 to use our leakchecker. If you feel there is a bug in the test or in the code that is being tested, please let us know. |
After running into this myself, I think I have an explanation to why I saw this leak, though it may not explain the original reporter's usage. I was able to narrow the leak down to only occurring for the Google default credential cases of the test in question. If you are running the tests on a GCE instance this shows up, unless you explicitly override the credentials, e.g. (where
I think the goroutines being leaked are the ones from here (the check to see if the process is running on a GCE instance): https://github.com/googleapis/google-cloud-go/blob/a531b65383652a2905d5d0a9f3d156b342bc31c1/compute/metadata/metadata.go#L108-L182 |
This issue is labeled as requiring an update from the reporter, and no update has been received after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed. |
cc @easwars ^ |
Thanks @sunjayBhatia for the pointers. I'm able to reproduce a goroutine leak on GCE even without overriding the default creds.
|
What version of gRPC are you using?
master
344b93a285883f2da713622d5064ad4b4512e63e
What version of Go are you using (
go version
)?go version go1.17.2 linux/amd64
What operating system (Linux, Windows, …) and version?
What did you do?
I introduce goleak to
TestClientHandshakeBasedOnClusterName
and runWhat did you expect to see?
The test passes
What did you see instead?
Goroutine leaks:
The text was updated successfully, but these errors were encountered: