-
Notifications
You must be signed in to change notification settings - Fork 65
Description
When running tests on nwaku and activating dumpPendingFutures from nim-chronos, we noticed that the pending futures grow indefinitely in yamux.
Most of them come from the following line
nim-libp2p/libp2p/muxers/yamux/yamux.nim
Lines 282 to 283 in a60f0c5
| try: # https://github.com/status-im/nim-chronos/issues/516 | |
| discard await race(channel.closedRemotely.wait(), channel.receivedData.wait()) |
For example
Future[4433822480] with name "AsyncEvent.wait" created at <asyncsync.nim:171> and state = Pending
I see these Futures get created at a really fast pace, and not seeing them getting completed. Even if they do eventually get completed, if we create futures at a faster rate than what it takes to complete them, the pending futures would grow indefinitely.
When using mplex instead, the amount of pending Futures is stable and doesn't grow indefinitely
Version: nim-libp2p 94d93cb
Attaching logs with prints of the pending Futures for both yamux and mplex
Metadata
Metadata
Assignees
Labels
Type
Projects
Status