From: Gerd Hoffmann <kraxel@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: "Anthony Liguori" <aliguori@us.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>,
"KONRAD Frédéric" <fred.konrad@greensocs.com>
Subject: Re: [Qemu-devel] Abort in monitor_puts.
Date: Mon, 25 Mar 2013 21:11:58 +0100 [thread overview]
Message-ID: <5150AF8E.5050809@redhat.com> (raw)
In-Reply-To: <20130325075638.26586594@redhat.com>
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
prev parent reply other threads:[~2013-03-25 20:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 9:17 [Qemu-devel] Abort in monitor_puts KONRAD Frédéric
2013-03-22 20:50 ` Luiz Capitulino
2013-03-22 21:39 ` Luiz Capitulino
2013-03-25 7:42 ` Gerd Hoffmann
2013-03-25 11:56 ` Luiz Capitulino
2013-03-25 20:11 ` Gerd Hoffmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5150AF8E.5050809@redhat.com \
--to=kraxel@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=fred.konrad@greensocs.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.