Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth-monitor latency calc #54

Merged
merged 5 commits into from
May 5, 2018

Conversation

SimonSK
Copy link

@SimonSK SimonSK commented Apr 29, 2018

  • log messages now include mss (max segment size), payload size, encoded payload size (actual tcp payload length)
  • changed sql query to filter out any address with tcp port 0
  • Replaced the whole tcpinfo package with https://github.com/mikioh/tcpinfo/
    • Issue: previously, the monitor stopped accepting incoming connections after hours.
    • Cause: Still not 100% sure, but it seems to be caused by attempting to read tcp info from connections.
      1. Previous implementation used functions that put file descriptors in blocking mode (os: add a function to construct *File with non-blocking file descriptor golang/go#22939). According to comments, this causes the SetDeadline methods to stop working, meaning every disconnecting connections could potentially hang waiting for Disconnect message to be sent indefinitely.
      2. While both mss and rtt values are obtained through the same method, the issue only surfaced after including mss because mss was obtained during SetupConn and rtt was not.
      3. Failed incoming connections probably never got out of SetupConn, held on to handshake tokens, and eventually got the listenLoop hanging.
    • Solution: Simply removing mss portion wouldn't root out the cause as rtt relies on the same approach. To get rid of the problematic functions, tcpinfo is replaced with https://github.com/mikioh/tcpinfo. Both rtt and mss are kept for now.
    • If this really was the issue with connections, then both node-finder and tx-sniper are affected. The fix will be applied to tx-sniper.

@SimonSK SimonSK requested a review from a team April 29, 2018 18:42
@SimonSK SimonSK force-pushed the simonsk/eth-monitor-latency-calc branch from cfde169 to b730370 Compare April 30, 2018 17:32
@SimonSK SimonSK merged commit 2335f67 into eth-monitor-master May 5, 2018
@SimonSK SimonSK deleted the simonsk/eth-monitor-latency-calc branch May 5, 2018 22:00
This was referenced May 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant