Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
A gossip spy node will OOM if zeros are shoveled at it. #8175
I spent some time debugging this.
At first it looked like the calls to "verify" the incoming gossip messages were causing the recycler to blow up. After further inspection, it became clear that if the channel's consumer take even a few nanoseconds the socket receiver is able to collect items at a much higher rate.
It is not a memory leak, just a resource exhaustion where the channel's consumer isn't fast enough.
While that approach seems simple enough, it needs to be efficient otherwise there will be no improvement. Figuring out the stakes and which ones are "lower" will require 2 passes over the incoming packets or will need cache some of the data possibly increasing memory consumption (by a negligible amount).