ChainSafe / discv5

A Typescript implementation of the Discv5 protocol
Apache License 2.0
28 stars 15 forks source link

External memory leak #201

Closed twoeths closed 1 year ago

twoeths commented 2 years ago

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)

twoeths commented 1 year ago

I've had several tests at discv5:

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 https://github.com/ChainSafe/lodestar/issues/4623#issuecomment-1374418235

twoeths commented 1 year ago

closing the issue, root cause was https://github.com/ChainSafe/node-snappy-stream/issues/16