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

Use TCP keepalive to detect broken sockets #681

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 25, 2024

  1. Use TCP keepalive to detect broken sockets

    vsomeip does not enforce a single socket between endpoints; it does not
    actively close an existing socket after a new one is established.
    
    It is possible that:
    - socket is established from nodeA to nodeB
    - ethernet gets unplugged
    - nodeA tries to transmit, times out, closes the socket
    - ethernet is reconnected
    - nodeA establishes a new socket to node B
    
    nodeB never received an RST while the cable was unplugged, still thinks
    the old socket is established, and effectively "leaks" until TCP keepalive
    detects the break. At default values this takes 2 hr 10 min. This can be
    mitigated by reducing the keepalive settings.
    
    The implementation of TCP keepalive is different between OS:
    - Linux can configure all 3 settings on a per-socket basis
    - QNX can configure 1 setting per-socket and 2 settings globally
    
    QNX would need to set the global values using sysctl, perhaps at startup.
    Eugene Kozlov authored and joeyoravec committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    d7c9754 View commit details
    Browse the repository at this point in the history