ccache
ccache copied to clipboard
memory leak
github.com/karlseguin/ccache
I don't immediately know. Any context? Was Stop called on the cache? What type of objects are being stored in it? Anything else?
@karlseguin thanks for you
Using multi-instance and multi-threading using nuclei in encapsulation https://github.com/projectdiscovery/nuclei/issues/2357 when, through
- 1 Export the profile of the heap at time point 1: curl -s http://192.168.10.31:6060/debug/pprof/heap > base.heap
- 2 Export the heap profile at time point 2: curl -s http://192.168.10.31:6060/debug/pprof/heap > current.heap
- 3 Compare the difference of the stacks at two time points: go tool pprof --http :8080 --base base.heap current.heap
found when comparing
Thanks, that helps, but I'm not sure it's a bug.
ccache.New
starts a goroutine. To stop it, Stop()
needs to be called. If caches are created and fall out of scope without calling Stop()
the goroutine will leak.