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
We have run into an occasionally problem where we use git clone to fetch a repository but then later on when trying to upload the cloned repository to one of our services, we get a precondition error.
We suspected that we weren't closing our go routines and as part of the debugging we used goleak to verify whether we had any open go routines. This showed us that we did have some leaky go routines. Further investigation led us to testing the PlainClone function for leaks and we discovered that it has a leak.
This being the issue could explain the problem we are having in our services as it suggests that the repository or it's metadata might not completely cloned when we progress in our code.
To reproduce take one of the examples and add the goleak check.
This is not related to #629 and it is also not a leak.
The behaviour observed is related to the Go Transport as TCP Keep Alive is enabled by default (for performance reasons).
If you register a transport with keep alive disabled you will notice that no new go routines will outlive the test:
We have run into an occasionally problem where we use git clone to fetch a repository but then later on when trying to upload the cloned repository to one of our services, we get a precondition error.
We suspected that we weren't closing our go routines and as part of the debugging we used goleak to verify whether we had any open go routines. This showed us that we did have some leaky go routines. Further investigation led us to testing the
PlainClone
function for leaks and we discovered that it has a leak.This being the issue could explain the problem we are having in our services as it suggests that the repository or it's metadata might not completely cloned when we progress in our code.
To reproduce take one of the examples and add the
goleak
check.This resulted in the following error:
The version of golang we are using is
go version go1.19.2 linux/amd64
.I did a brief search of the issues but could not find anything relevant to this problem.
Thanks for any help you can provide.
The text was updated successfully, but these errors were encountered: