FDio / govpp

Go toolset for the VPP.
Apache License 2.0
195 stars 82 forks source link

Memory leaks in govpp core #184

Closed VladoLavor closed 8 months ago

VladoLavor commented 8 months ago

Fixed memory leaks in GoVPP core stream and request handler.

Edit: the second issue was already addressed in https://github.com/FDio/govpp/pull/182

The temporary leak is occurring in the request handler. <-time.After() is not garbage-collected before expiration and shouldn't be used in such a frequently called method.

The second memory leak is permanent, caused by the timer not being closed, causing a slow increase in memory consumption over time.

Performance profile (done on ~1000 API calls using the Stream API): bug-0 bug-1

With the fix: bug-fix