ChainSafe/discv5

External memory leak

Closed this issue · 2 comments

Description
In lodestar if it sets "udp" port in enr, then external memory keeps increasing

Screen Shot 2022-09-20 at 13 57 21

It's likely this issue links to the NODES handlers

Screen Shot 2022-09-20 at 13 58 22

This happens with discv5 0.7.1 (could be with the latest version too)

I've had several tests at discv5:

  • udp send/receive tests
  • encode nodes response test
  • async/await send api tests
  • different improvements in handleFindNode

none of them work (either cannot reproduce the issue with the discv5 test only, or the issue still happens if I try with lodestar)

discv5 may not be the root cause, the issue may happen because a side effect of setting enr to udp that cause lodestar receives so may peers and it switches peers a lot, see ChainSafe/lodestar#4623 (comment)

closing the issue, root cause was ChainSafe/node-snappy-stream#16