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

Sockets linger in FIN-WAIT-2 indefinitely #79

Open
tklinchik opened this issue Aug 10, 2023 · 0 comments
Open

Sockets linger in FIN-WAIT-2 indefinitely #79

tklinchik opened this issue Aug 10, 2023 · 0 comments

Comments

@tklinchik
Copy link

tklinchik commented Aug 10, 2023

It appears that exasock won't terminate nor time out sockets in FIN-WAIT-2 state exasock process is terminated in middle of receiving data from a peer leaving those sockets lingering until system is rebooted.

Here is a simple reproducible scenario using netcat:

  • Server side: generate large ascii file to transmit to a client
    base64 /dev/urandom | head -c 10000000 > file.txt
  • Server side: start TCP server to publish generated file to the first connected client (use of exasock is not necessary)
    cat file.txt - | nc -l 10.248.194.179 12345
  • Client side: initiate TCP connection using exasock
    exasock nc 10.248.194.179 12345
  • Client side: as soon as connection is established and some data is received kill the process using Ctrl+C
  • Confirm sockets stuck in FIN-WAIT-2 state
    exasock-stat

Example:

exasock-stat
Active ExaNIC Sockets accelerated connections (servers and established):
 Proto | Recv-Q   | Send-Q   | Local Address            | Foreign Address          | State
 TCP   | 1048396  | 0        | 10.248.194.178:49765     | 10.248.194.179:12345     | FIN-WAIT-2
 TCP   | 1048556  | 0        | 10.248.194.178:35827     | 10.248.194.179:12345     | FIN-WAIT-2

In addition to ports allocated and resources leaking after reviewing the code I also discovered that kernel module will keep re-evaluating those sockets indefinitely as well.

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

No branches or pull requests

1 participant