From ee6cafdcdd44f93410d849326b33a622f5ace890 Mon Sep 17 00:00:00 2001 From: Julian Schindel Date: Wed, 29 Jul 2026 11:22:20 +0200 Subject: [PATCH] vmm: clean up migration threads on failure Migration threads may be left orphaned and keep the socket bound after a migration has failed. Prevent this by signaling termination via the `kill_evt` in `ReceiveAdditionalConnections`'s `Drop` impl. On-behalf-of: SAP julian.schindel@sap.com Signed-off-by: Julian Schindel --- vmm/src/migration/transport.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vmm/src/migration/transport.rs b/vmm/src/migration/transport.rs index eac1b9d75..2e07e82c3 100644 --- a/vmm/src/migration/transport.rs +++ b/vmm/src/migration/transport.rs @@ -589,6 +589,9 @@ impl ReceiveAdditionalConnections { impl Drop for ReceiveAdditionalConnections { fn drop(&mut self) { + if let Err(error) = self.kill_evt.write(1) { + warn!("Failed to write to kill eventfd: {error}"); + } if self.accept_thread.is_some() { warn!( "ReceiveAdditionalConnections was not cleaned up! Either cleanup() was never called (programming error) or it failed before completing."