Closed richard-ramos closed 1 year ago
Just saw this issue, but its most likely fixed here https://github.com/libp2p/go-libp2p-pubsub/pull/528
There has been a new release with the change, so you could give that a shot and see if it fixes your issue.
yes, that's probably it. Sorry guys!
Thank you! this fixes the issue
Hello! I'm trying to debug a memory leak I see in my project. After executing pprof --inuse_objects (to see objects allocated but not yet released), I end up with the following stats:
So far I havent been able to successfully identify the reason for this custom messageID function to be present in the top10, but in the meantime I was looking at the code that calls the message Id function and saw this code: https://github.com/libp2p/go-libp2p-pubsub/blob/829f9026a3dcf12b268efad6a140dd99446cf17b/mcache.go#L97-L98
Since maps do not shrink when elements are deleted as described here https://github.com/golang/go/issues/20135, isn't it possible that a memory leak exists for
mc.msgs
andmc.peertx
depending on the volume of messages that is received in a node?