question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trinity logs lots of "socket.send() raised exception" warnings

See original GitHub issue

on current master @ 32cc41d5315003289b1c86b31680f2501894da06

What is wrong?

When running trinity a lot of these warnings happen.

 WARNING  07-14 03:48:12  selector_events  socket.send() raised exception.
 WARNING  07-14 03:48:12  selector_events  socket.send() raised exception.
 WARNING  07-14 03:48:12  selector_events  socket.send() raised exception.
 WARNING  07-14 03:48:12  selector_events  socket.send() raised exception.
 WARNING  07-14 03:48:12  selector_events  socket.send() raised exception.
 WARNING  07-14 03:48:12  selector_events  socket.send() raised exception.
 WARNING  07-14 03:48:12  selector_events  socket.send() raised exception.
 WARNING  07-14 03:48:12  selector_events  socket.send() raised exception.
 WARNING  07-14 03:48:12  selector_events  socket.send() raised exception.

How can it be fixed

It looks like it may related to this issue found here on stack overflow:

https://stackoverflow.com/questions/32175217/how-to-detect-write-failure-in-asyncio

However, brief experimentation with adding a await asyncio.sleep(0) to the only place in our code that calls writer.drain() didn’t fix anything…

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
pipermerriamcommented, Jul 14, 2018

@carver

The transaction pool could use the new pool subscriber API from #1009 then: https://github.com/ethereum/py-evm/pull/1009/files#diff-0c5a90ea9349bdb0b8d152d6c4b24583R694 (after it’s merged)

I think this is part of the solution, however, I believe what we’re seeing is a race condition where the peer is connected at the start of the tx pool send loop, but by the time that it comes time to send to that peer they have disconnected.

0reactions
gsalgadocommented, Jul 17, 2018

However, I’m curious if your tests show that the disconnected peer is stuck in the pool, or if it is just in the process of disconnecting?

I couldn’t reproduce the socket.send() errors yesterday; those logs are from last week but they show a Peer instance is kept in the pool’s connected_nodes forever after the remote disconnects. I’ve opened #1023 for it but can’t seem to reproduce it. Can you grep your logs for running=False to see if that’s the cause of your socket.send() errors as well?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - Trinity logs lots of "socket.send() raised exception ...
What is wrong? When running trinity a lot of these warnings happen. WARNING 07-14 03:48:12 selector_events socket.send() raised exception. WARNING 07- ...
Read more >
Erros in supervisor logs - Home Assistant Community
I keep having some errors on my supervisor logs I might be wrong but this ... WARNING (MainThread) [asyncio] socket.send() raised exception.
Read more >
python - I am trying more advanced Discord bot status update ...
socket.send() raised exception. And now running the bot makes all async commands unusable. Despite the commands are all correctly sent, nothing ...
Read more >
Release Notes — Web3.py 5.31.3 documentation
Fixed issues with parsing tuples and nested tuples in event logs (#2211) ... when BadFunctionCallOutput is raised for call_contract_function() (#2069) ...
Read more >
Bug listing with status RESOLVED with resolution TEST ...
UTF-8 uxterm Warning: locale not supported by Xlib, locale set to C" ... floating point exception" status:RESOLVED resolution:TEST-REQUEST severity:normal ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found