probe-lab / zikade

A Go implementation of the libp2p Kademlia DHT specification
Other
8 stars 3 forks source link

Tests leak goroutines because of go-libp2p and leveldb #34

Open iand opened 9 months ago

iand commented 9 months ago

Migrated from https://github.com/libp2p/go-libp2p-kad-dht/issues/906

We observed that the 32-bit test runner runs out of memory if we increase the test count to 100.

There are two areas where we leak goroutines after the test has stopped:

  1. leveldb has a one-second delay before properly releasing all resources. There is nothing immediate we can do about that. If we added a delay of 1s + δ, all resources are released.
  2. go-libp2p does not clean up fx resources properly. This is a known issue and will be fixed soon: https://github.com/libp2p/go-libp2p/issues/2514

Revisit after https://github.com/libp2p/go-libp2p/issues/2514 has been resolved.