google / gvisor

Application Kernel for Containers
https://gvisor.dev
Apache License 2.0
15.74k stars 1.29k forks source link

endpoints created during a passive connect not saved #1688

Open hbhasker opened 4 years ago

hbhasker commented 4 years ago

The S/R framework discovers endpoints by following the fd table in gvisor or from the endpoints in danglingEndpoints map. But endpoints which are in a passive handshake and not yet delivered to accept queue of a listening socket are not tracked anywhere. Which means that across a S/R such endpoints are not saved.

Further on Resume we assume that any connection in synRecv state was an active connect which is incorrect and it also proceeds to bind() which can fail as the listening socket may already have bound the endpoint. We need a different way to restore such endpoints.

github-actions[bot] commented 1 year ago

A friendly reminder that this issue had no activity for 120 days.

github-actions[bot] commented 10 months ago

This issue has been closed due to lack of activity.

github-actions[bot] commented 10 months ago

There are TODOs still referencing this issue:

  1. test/syscalls/linux/socket_inet_loopback.cc:1434: Partially completed passive endpoints are not
  2. test/syscalls/linux/socket_inet_loopback.cc:1437: Partially completed passive endpoints are not
  3. test/syscalls/linux/socket_inet_loopback.cc:1514: Partially completed passive endpoints are not
  4. test/syscalls/linux/socket_inet_loopback.cc:1517: Partially completed passive endpoints are not

Search TODO

github-actions[bot] commented 6 months ago

A friendly reminder that this issue had no activity for 120 days.