Message ID | 20250206175824.22664-1-farosas@suse.de (mailing list archive) |
---|---|
Headers | show |
Series | crypto,io,migration: Add support to gnutls_bye() | expand |
On 6.02.2025 18:58, Fabiano Rosas wrote: > Hi, > > We've been discussing a way to stop multifd recv threads from getting > an error at the end of migration when the source threads close the > iochannel without ending the TLS session. > > The original issue was introduced by commit 1d457daf86 > ("migration/multifd: Further remove the SYNC on complete") which > altered the synchronization of the source and destination in a manner > that causes the destination to already be waiting at recv() when the > source closes the connection. > > One approach would be to issue gnutls_bye() at the source after all > the data has been sent. The destination would then gracefully exit > when it gets EOF. > > Aside from stopping the recv thread from seeing an error, this also > creates a contract that all connections should be closed only after > the TLS session is ended. This helps to avoid masking a legitimate > issue where the connection is closed prematurely. > Thanks for quickly posting this RFC. I've applied these patches on top of the current QEMU git master, ported my patch set on top of it, dropped my premature_ok patches and can confirm that the tests still pass. Thanks, Maciej