-
Notifications
You must be signed in to change notification settings - Fork 139
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
Possible memory leak #50
Comments
We are working with this library in production for few applications, and it works as expected; however, we notice this issue with |
When a workerpool is created, that goroutine ( As part of your testing, it may be useful to call |
I used on of the existing tests and indeed there is a call to |
I have identified the issue, will provide a resolution ASAP. Thank you for reporting this. |
@lidortal The issue appears to be that goleak is not compatible with Please confirm whether or not this fixes the issue you are seeing. If this resolves the issue, then close this issue and I will bump the version number. |
@gammazero I observe a leak on my productive application, w/o using
I wanted to reproduce it using one of the existing tests, please let me know if there is another way to isolate it. |
That is exactly the area I thought might be an issue, but could not reproduce it -- fix ariving shortly. Thank you very much for the investigation. |
This is now fixed in commit 85cc841 The issue what that there was a chance that a worker goroutine could still be starting after The good news is that this was not an actual leak, since the stop signal was guaranteed to reach the worker and the worker would always exit. It was also impossible for a worker to be executing any work when Given the above guarantees, the only value of the fix in commit 85cc841 is to ensure that goleak and similar tests pass, and I am not sure if workerpool should contain any code that is strictly for the purpose of making certain tests pass. Maybe documentation is the better solution. |
I use this package in my application and I observe that the memory consumption is increased over time.
I added goleak to search for leaks in one of the existing tests and found the following:
The text was updated successfully, but these errors were encountered: