Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Trinity raises AlreadyWaiting error semi-regularly #737

@pipermerriam

Description

@pipermerriam

What is wrong?

Encountered when running in full/fast sync mode.

   ERROR  05-20 15:16:13  base_events  Task exception was never retrieved
future: <Task finished coro=<PeerPool.lookup_random_node() done, defined at /Users/piper/sites/py-evm/p2p/peer.py:719> exception=AlreadyWaiting("There's another coroutine waiting for a ping packet from <Node(0x47ca@165.227.61.121)>",)>
Traceback (most recent call last):
  File "/Users/piper/sites/py-evm/p2p/peer.py", line 723, in lookup_random_node
    await self.discovery.lookup_random(self.cancel_token)
  File "/Users/piper/sites/py-evm/p2p/discovery.py", line 90, in lookup_random
    return await self.kademlia.lookup_random(self.cancel_token.chain(cancel_token))
  File "/Users/piper/sites/py-evm/p2p/kademlia.py", line 575, in lookup_random
    return await self.lookup(random.randint(0, k_max_node_id), cancel_token)
  File "/Users/piper/sites/py-evm/p2p/kademlia.py", line 565, in lookup
    *[_find_node(node_id, n) for n in nodes_to_ask])
  File "/Users/piper/sites/py-evm/p2p/kademlia.py", line 550, in _find_node
    bonded = await asyncio.gather(*[self.bond(c, cancel_token) for c in candidates])
  File "/Users/piper/sites/py-evm/p2p/kademlia.py", line 514, in bond
    await self.wait_ping(node, cancel_token)
  File "/Users/piper/sites/py-evm/p2p/kademlia.py", line 413, in wait_ping
    "There's another coroutine waiting for a ping packet from {}".format(remote))
p2p.kademlia.AlreadyWaiting: There's another coroutine waiting for a ping packet from <Node(0x47ca@165.227.61.121)>

This exception happens semi-regularly when syncing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions