All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] NBD broken ?
@ 2012-03-04  0:44 Laurent Vivier
  2012-03-05  7:45 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Vivier @ 2012-03-04  0:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini

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...
 
Regards,
Laurent

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] NBD broken ?
  2012-03-04  0:44 [Qemu-devel] NBD broken ? Laurent Vivier
@ 2012-03-05  7:45 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2012-03-05  7:45 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: qemu-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-05  7:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-04  0:44 [Qemu-devel] NBD broken ? Laurent Vivier
2012-03-05  7:45 ` Paolo Bonzini

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.