Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Peer failed when disconnected by another peer #1358

Closed
ChihChengLiang opened this issue Dec 5, 2019 · 1 comment
Closed

Peer failed when disconnected by another peer #1358

ChihChengLiang opened this issue Dec 5, 2019 · 1 comment
Labels

Comments

@ChihChengLiang
Copy link
Contributor

What is wrong?

PYTHONWARNINGS=ignore::DeprecationWarning trinity-beacon -l DEBUG --trinity-root-dir /home/ubuntu/data_dir interop --validators 0,1,2,3,4,5,6,7 --start-time 1575531000
   DEBUG  2019-12-05 07:35:14,071             Validator  broadcasting attestation aggregation_bits=0b01, data=(slot=52, index=0, beacon_block_root=0250..1319, source=(4, f0a0..56a0), target=(6, 3dde..0456),), signature=b916..b363
   DEBUG  2019-12-05 07:35:14,120             Validator  <coroutine object Validator.handle_slot_tick at 0x7fcb76147cb0> finished while <trinity.components.eth2.beacon.validator.Validator object at 0x7fcb7612e390> is still running, terminating as well
   DEBUG  2019-12-05 07:35:14,120             Validator  Cancelling service: <trinity.components.eth2.beacon.validator.Validator object at 0x7fcb7612e390>
 WARNING  2019-12-05 07:35:14,120             Validator  Task <coroutine object Validator.handle_slot_tick at 0x7fcb76147dd0> finished unexpectedly: RuntimeError('unable to perform operation on <TCPTransport closed=True reading=False 0x556610a10780>; the handler is closed')
   DEBUG  2019-12-05 07:35:14,120             Validator  Task failure traceback
Traceback (most recent call last):
  File "/home/ubuntu/trinity/p2p/service.py", line 158, in _run_task_wrapper
    await awaitable
  File "/home/ubuntu/trinity/p2p/service.py", line 179, in _run_daemon_task_wrapper
    await awaitable
  File "/home/ubuntu/trinity/trinity/components/eth2/beacon/validator.py", line 139, in handle_slot_tick
    await self.handle_second_tick(event.slot)
  File "/home/ubuntu/trinity/trinity/components/eth2/beacon/validator.py", line 239, in handle_second_tick
    await self.attest(slot)
  File "/home/ubuntu/trinity/trinity/components/eth2/beacon/validator.py", line 396, in attest
    await self.p2p_node.broadcast_attestation(attestation)
  File "/home/ubuntu/trinity/trinity/protocol/bcc_libp2p/node.py", line 421, in broadcast_attestation
    await self._broadcast_data(PUBSUB_TOPIC_BEACON_ATTESTATION, ssz.encode(attestation))
  File "/home/ubuntu/trinity/trinity/protocol/bcc_libp2p/node.py", line 424, in _broadcast_data
    await self.pubsub.publish(topic, data)
  File "/home/ubuntu/.pyenv/versions/3.7.4/envs/trinity/lib/python3.7/site-packages/libp2p/pubsub/pubsub.py", line 367, in publish
    await self.push_msg(self.host.get_id(), msg)
  File "/home/ubuntu/.pyenv/versions/3.7.4/envs/trinity/lib/python3.7/site-packages/libp2p/pubsub/pubsub.py", line 435, in push_msg
    await self.router.publish(msg_forwarder, msg)
  File "/home/ubuntu/.pyenv/versions/3.7.4/envs/trinity/lib/python3.7/site-packages/libp2p/pubsub/gossipsub.py", line 177, in publish
    await stream.write(encode_varint_prefixed(rpc_msg.SerializeToString()))
  File "/home/ubuntu/.pyenv/versions/3.7.4/envs/trinity/lib/python3.7/site-packages/libp2p/network/stream/net_stream.py", line 60, in write
    return await self.muxed_stream.write(data)
  File "/home/ubuntu/.pyenv/versions/3.7.4/envs/trinity/lib/python3.7/site-packages/libp2p/stream_muxer/mplex/mplex_stream.py", line 150, in write
    return await self.mplex_conn.send_message(flag, data, self.stream_id)
  File "/home/ubuntu/.pyenv/versions/3.7.4/envs/trinity/lib/python3.7/site-packages/libp2p/stream_muxer/mplex/mplex.py", line 147, in send_message
    return await self.write_to_stream(_bytes)
  File "/home/ubuntu/.pyenv/versions/3.7.4/envs/trinity/lib/python3.7/site-packages/libp2p/stream_muxer/mplex/mplex.py", line 155, in write_to_stream
    await self.secured_conn.write(_bytes)
  File "/home/ubuntu/.pyenv/versions/3.7.4/envs/trinity/lib/python3.7/site-packages/libp2p/security/secio/transport.py", line 127, in write
    await self.write_msg(data)
  File "/home/ubuntu/.pyenv/versions/3.7.4/envs/trinity/lib/python3.7/site-packages/libp2p/security/secio/transport.py", line 133, in write_msg
    await self.conn.write_msg(encrypted_data + tag)
  File "/home/ubuntu/.pyenv/versions/3.7.4/envs/trinity/lib/python3.7/site-packages/libp2p/io/msgio.py", line 40, in write_msg
    await self.write_closer.write(data)
  File "/home/ubuntu/.pyenv/versions/3.7.4/envs/trinity/lib/python3.7/site-packages/libp2p/network/connection/raw_connection.py", line 26, in write
    self.writer.write(data)
  File "/home/ubuntu/.pyenv/versions/3.7.4/lib/python3.7/asyncio/streams.py", line 305, in write
    self._transport.write(data)
  File "uvloop/handles/stream.pyx", line 673, in uvloop.loop.UVStream.write
  File "uvloop/handles/handle.pyx", line 159, in uvloop.loop.UVHandle._ensure_alive
RuntimeError: unable to perform operation on <TCPTransport closed=True reading=False 0x556610a10780>; the handler is closed
   DEBUG  2019-12-05 07:35:14,124             Validator  <trinity.components.eth2.beacon.validator.Validator object at 0x7fcb7612e390> finished: Cancellation requested by Validator:Node token
   DEBUG  2019-12-05 07:35:14,124             Validator  <trinity.components.eth2.beacon.validator.Validator object at 0x7fcb7612e390> halted cleanly
   DEBUG  2019-12-05 07:35:16,000            SlotTicker  [TickType.SLOT_TWO_THIRD] tick at 4s of slot #52, total elapsed 316s
   DEBUG  2019-12-05 07:35:18,000            SlotTicker  [TickType.SLOT_START] tick at 0s of slot #53, total elapsed 318s
   DEBUG  2019-12-05 07:35:20,000            SlotTicker  [TickType.SLOT_ONE_THIRD] tick at 2s of slot #53, total elapsed 320s
   DEBUG  2019-12-05 07:35:22,000            SlotTicker  [TickType.SLOT_TWO_THIRD] tick at 4s of slot #53, total elapsed 322s
   DEBUG  2019-12-05 07:35:24,000            SlotTicker  [TickType.SLOT_START] tick at 0s of slot #54, total elapsed 324s

How can it be fixed

Fill this in if you know how to fix it.

@ChihChengLiang
Copy link
Contributor Author

duplicated #1113

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant