[libvirt] error: server response too large

Daniel P. Berrange berrange at redhat.com
Mon Oct 7 11:51:35 UTC 2013


On Mon, Oct 07, 2013 at 01:35:56PM +0200, Claudio Bley wrote:
> At Mon, 7 Oct 2013 11:31:48 +0100,
> Daniel P. Berrange wrote:
> > 
> > > I've also tested your patch, and it seems 256 KB of data is still a
> > > bit too large:
> > > 
> > > virsh # screenshot 2 /tmp/test
> > > error: could not receive data from domain 2
> > > error: packet 262168 bytes received from server too large, want 262144
> > > 
> > > The max payload size is computed as:
> > > 
> > > VIR_NET_MESSAGE_MAX = 16777216
> > > VIR_NET_MESSAGE_HEADER_MAX = 24
> > > VIR_NET_MESSAGE_PAYLOAD_MAX = (VIR_NET_MESSAGE_MAX - VIR_NET_MESSAGE_HEADER_MAX) = 16777192
> > > 
> > > So, it seems the legacy max payload size is actually 262120; I tested
> > > it and it works.
> > > 
> > > ------------------- 8< ------ >8 ---------------------------
> > > Subject: [PATCH] Adjust legacy max payload size to account for header
> > >  information
> > > Organization: AV-Test GmbH, Germany
> > > 
> > > Commit 27e81517a87 set the payload size to 256 KB, which is
> > > actually the max packet size, including the size of the header.
> > > 
> > > Reduce this by VIR_NET_MESSAGE_HEADER_MAX (24) and set
> > > VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX to 262120.
> > > 
> > > Signed-off-by: Claudio Bley <cbley at av-test.de>
> > > ---
> > >  src/rpc/virnetprotocol.x |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/src/rpc/virnetprotocol.x b/src/rpc/virnetprotocol.x
> > > index 1eae7cb..7b6f753 100644
> > > --- a/src/rpc/virnetprotocol.x
> > > +++ b/src/rpc/virnetprotocol.x
> > > @@ -55,7 +55,7 @@ const VIR_NET_MESSAGE_INITIAL = 65536;
> > >   * payload size. We need to remember this for compat with
> > >   * old clients.
> > >   */
> > > -const VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX = 262144;
> > > +const VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX = 262120;
> > > 
> > >  /* Maximum total message size (serialised). */
> > >  const VIR_NET_MESSAGE_MAX = 16777216;
> > 
> > Damn, yes, you are correct. The original value was 262120, I
> > copied the wrong value.
> > 
> > THe commit which changed it first was
> > 
> >   commit eb635de1fed3257c5c62b552d1ec981c9545c1d7
> >   Author: Michal Privoznik <mprivozn at redhat.com>
> >   Date:   Fri Apr 27 14:49:48 2012 +0200
> > 
> >     rpc: Size up RPC limits
> > 
> >    /* Size of message payload */
> >   -const VIR_NET_MESSAGE_PAYLOAD_MAX = 262120;
> >   +const VIR_NET_MESSAGE_PAYLOAD_MAX = 4194280;
> 
> I amended my commit message referring to Michal's commit
> and pushed.
> 
> Are you pushing to the maintenance branches, then?

Yep, I'll update them.

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