From: redcap97 <redcap97@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Bug 1586756] Re: "-serial unix:" option of qemu-system-arm is broken in qemu 2.6.0
Date: Fri, 29 Jul 2016 14:57:05 -0000 [thread overview]
Message-ID: <20160729145705.20764.81409.launchpad@wampee.canonical.com> (raw)
In-Reply-To: 20160529110018.18315.70473.malonedeb@soybean.canonical.com
** Summary changed:
- "-serial unix:" option of qemu-system-* is broken in qemu 2.6.0
+ "-serial unix:" option of qemu-system-arm is broken in qemu 2.6.0
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1586756
Title:
"-serial unix:" option of qemu-system-arm is broken in qemu 2.6.0
Status in QEMU:
Incomplete
Bug description:
I found a bug of "-serial unix:PATH_TO_SOCKET" in qemu 2.6.0 (qemu 2.5.1 works fine).
Occasionally, a part of the output of qemu disappears in the bug.
It looks like following commit is the cause:
char: ensure all clients are in non-blocking mode (Author: Daniel P. Berrange <berrange@redhat.com>)
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=64c800f808748522727847b9cdc73412f22dffb9
In this commit, UNIX socket is set to non-blocking mode, but qemu_chr_fe_write function doesn't handle EAGAIN.
You should fix code like that:
---
diff --git a/qemu-char.c b/qemu-char.c
index b597ee1..0361d78 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -270,6 +270,7 @@ static int qemu_chr_fe_write_buffer(CharDriverState *s, const uint8_t *buf, int
int qemu_chr_fe_write(CharDriverState *s, const uint8_t *buf, int len)
{
int ret;
+ int offset = 0;
if (s->replay && replay_mode == REPLAY_MODE_PLAY) {
int offset;
@@ -280,7 +281,21 @@ int qemu_chr_fe_write(CharDriverState *s, const uint8_t *buf, int len)
}
qemu_mutex_lock(&s->chr_write_lock);
- ret = s->chr_write(s, buf, len);
+
+ while (offset < len) {
+ retry:
+ ret = s->chr_write(s, buf, len);
+ if (ret < 0 && errno == EAGAIN) {
+ g_usleep(100);
+ goto retry;
+ }
+
+ if (ret <= 0) {
+ break;
+ }
+
+ offset += ret;
+ }
if (ret > 0) {
qemu_chr_fe_write_log(s, buf, ret);
---
Or please do "git revert 64c800f808748522727847b9cdc73412f22dffb9".
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1586756/+subscriptions
next prev parent reply other threads:[~2016-07-29 15:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-29 11:00 [Qemu-devel] [Bug 1586756] [NEW] "-serial unix:" option of qemu-system-* is broken in qemu 2.6.0 redcap97
2016-06-01 10:19 ` [Qemu-devel] [Bug 1586756] " Daniel Berrange
2016-07-26 15:39 ` Daniel Berrange
2016-07-26 15:51 ` Daniel Berrange
2016-07-29 14:41 ` redcap97
2016-07-29 14:43 ` redcap97
2016-07-29 14:44 ` redcap97
2016-07-29 14:57 ` redcap97 [this message]
2016-07-29 15:00 ` [Qemu-devel] [Bug 1586756] Re: "-serial unix:" option of qemu-system-arm " Daniel Berrange
2016-08-05 8:31 ` Daniel Berrange
2017-01-11 6:43 ` Thomas Huth
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=20160729145705.20764.81409.launchpad@wampee.canonical.com \
--to=redcap97@gmail.com \
--cc=1586756@bugs.launchpad.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).