qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Abort in monitor_puts.


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] Abort in monitor_puts.
Date: Mon, 25 Mar 2013 21:11:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130307 Thunderbird/17.0.3

  Hi,

>>> The previous version of monitor_flush() ignores errors, and everything
>>> works, so doing the same thing here fixes the problem :)
>>
>> No, ignoring errors breaks qmp because the output isn't valid json any
>> more when you cut off something ...
> 
> What you mean "when you cut off"? When the other side disconnects? Do we care?

errno = EAGAIN means "kernel buffers full, can't accept your data atm,
try again later".  Simply ignoring this will throw away the data which
didn't fit, which will for the receiver look like someone cut off some
data from the response ...

>> Just go for a larger buffer?
> 
> That's simple, but it's not a real fix. We hit that problem because
> the help output is a large one. I'd guess that this is easily reproduced
> with something like QIDL, which (iirc) generates long json output on QMP.
> 
> Looks like we need a dynamic buffer there.

Yes.

Or generate the data piecewise (i.e. in monitor_unblocked which is
called back when the kernel has room again).  Which is probably only
worth the trouble if we have _really_ big responses (megabytes).

cheers,
  Gerd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]