In debugging this issue, I also came to the conclusion that the VIR_STREAM_NONBLOCK handling is completely broken when the background thread is in use. It was always partially broken even when we used a pipe between the foreground and backgroud threads, likely leading to busy looping AFAICT. With the switch to virFDSteamMsg queues, it looks like we hard block on reads and have unlimited memory usage on writes. I filed: https://gitlab.com/libvirt/libvirt/-/issues/855 since I can't see an immediate easy fix for this :-( On Tue, Feb 24, 2026 at 06:26:02PM +0000, Daniel P. Berrangé wrote:
Daniel P. Berrangé (2): fdstream: don't set return value if looping to read more data fdstream: fix EOF handling when reading data
src/util/virfdstream.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-)
-- 2.53.0
With regards, Daniel -- |: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|