From: Paolo Bonzini <pbonzini@redhat.com>
To: Laurent Vivier <Laurent@vivier.eu>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] NBD broken ?
Date: Mon, 05 Mar 2012 08:45:19 +0100 [thread overview]
Message-ID: <4F546F0F.5050401@redhat.com> (raw)
In-Reply-To: <1330821863.17535.10.camel@Quad>
Il 04/03/2012 01:44, Laurent Vivier ha scritto:
> Hi,
>
> since commit ae255e523, qemu with NBD hangs at startup (when it tries to
> access the disk):
>
> commit ae255e523c256cf0708f1c16cb946ff96340a800
> Author: Paolo Bonzini <pbonzini@redhat.com>
> Date: Thu Sep 8 14:28:59 2011 +0200
>
> nbd: switch to asynchronous operation
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>
>
> Reverting this patch corrects the problem.
>
> My system is an Ubuntu 11.04 x86_64 (But the bug is also seen on RHEL6).
>
> qemu is configured only with "--target-list=x86_64-softmmu".
>
> My test case is:
>
> ./qemu-nbd -k /tmp/nbd-socket -t /ISO/ubuntu-11.04-desktop-i386.iso
>
> ./x86_64-softmmu/qemu-system-x86_64 -cdrom nbd:unix:/tmp/nbd-socket
>
> Same problem with a TCP socket, with/without KVM, with an x86_64 guest, with -hda...
I can reproduce it. I'm pretty sure it worked when I posted the patch,
though of course I may be wrong. Perhaps I just didn't test IDE: virtio works.
It's a race:
[pid 17045] select(13, [0 3 4 6 8 12], [], [], {1, 0} <unfinished ...>
[pid 17046] sendmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"...", 28}], ...}, 0) = 28
[pid 17046] select(7, [0 6], [], NULL, NULL) = 1 (in [6])
[pid 17045] <... select resumed> ) = 1 (in [6], left {0, 986176})
[pid 17046] recvfrom(6, <unfinished ...>
[pid 17046] <... recvfrom resumed> "...", 16, 0, NULL, NULL) = 16
[pid 17046] recvmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"..." 512}], ...}, 0) = 512
[pid 17045] recvfrom(6, 0x7fff5fee29d0, 16, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 17045] recvfrom(6, 0x7fff5fee29d0, 16, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
[pid 17045] recvfrom(6, 0x7fff5fee29d0, 16, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
Two selects return a readable state at the same time, and when the second
handler is called it fails to retrieve the NBD header.
Paolo
prev parent reply other threads:[~2012-03-05 7:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-04 0:44 [Qemu-devel] NBD broken ? Laurent Vivier
2012-03-05 7:45 ` Paolo Bonzini [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=4F546F0F.5050401@redhat.com \
--to=pbonzini@redhat.com \
--cc=Laurent@vivier.eu \
--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).