vmm: detect dead connections during live migration

During a live migration, connections may get interrupted silently,
without being reset or closed. Interrupted idle connections may stay
alive indefinitely, for example if a connection dies during prefaulting
on the receiver side.

To detect dead idle connections, we enable
`SO_KEEPALIVE`. With `SO_KEEPALIVE`, the kernel will send keepalive
probes if a connection is idle and close the connection if the probes
remain unacknowledged.

To detect dead connections when actively sending data in a timely
manner, we enable `TCP_USER_TIMEOUT`, to reduce the timeout for closing
a connection where the peer doesn't acknowledge sent data.

On-behalf-of: SAP julian.schindel@sap.com
Signed-off-by: Julian Schindel <julian.schindel@cyberus-technology.de>
This commit is contained in:
Julian Schindel
2026-07-28 16:29:39 +02:00
committed by Rob Bradford
parent 27e8e66e2e
commit fa74e7a843
3 changed files with 60 additions and 5 deletions
+1
View File
@@ -84,6 +84,7 @@ serde_with = { workspace = true, features = ["macros"] }
serial_buffer = { path = "../serial_buffer" }
sha2 = { workspace = true }
signal-hook = { workspace = true }
socket2 = { version = "0.6.5", features = ["all"] }
thiserror = { workspace = true }
tracer = { path = "../tracer" }
uuid = { workspace = true }