[libvirt] [PATCH] Ensure stream is aborted when exiting console

Daniel P. Berrange berrange at redhat.com
Tue Aug 16 18:15:04 UTC 2011


On Mon, Aug 15, 2011 at 02:19:27PM -0400, Dave Allan wrote:
> On Mon, Aug 15, 2011 at 10:12:54AM -0700, Daniel P. Berrange wrote:
> > From: "Daniel P. Berrange" <berrange at redhat.com>
> > 
> > After running 'virsh console' in interactive mode, there was a
> > missing call to virStreamAbort, which meant the server kept the
> > stream resources open
> 
> The combination of this patch and the other stream related patch makes
> the problem I was seeing of garbled console following multiple console
> connect/disconnects go away, but another problem remains in this area.
> After connecting to the console in interactive virsh and
> disconnecting, I often see all subsequent commands fail:
> 
> virsh # dominfo foo
> error: failed to get domain 'foo'
> error: An error occurred, but the cause is unknown
> 
> virsh # dominfo foo
> error: failed to get domain 'foo'
> error: no call waiting for reply with prog 536903814 vers 1 serial 300
> 
> virsh # define bar.xml
> error: Failed to define domain from bar.xml
> error: no call waiting for reply with prog 536903814 vers 1 serial 301
> 
> Closing and reopening the interactive virsh session makes the problem
> go away.
> 
> Powering down the guest while the console is connected has made the
> problem 100% reproducible in the 4 or 5 tries I've given it.

Yeah this is a regression. We were accidentally sending back two
stream abort RPC packets in some scenarios (with race condition).

I've posted a patch to fix it

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list