qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [5187] Use signalfd() to work around signal/select race


From: Laurent Vivier
Subject: Re: [Qemu-devel] [5187] Use signalfd() to work around signal/select race
Date: Thu, 11 Sep 2008 22:23:15 +0200

Le jeudi 11 septembre 2008 à 13:10 -0500, Anthony Liguori a écrit :
> Laurent Vivier wrote:
> > Le mercredi 10 septembre 2008 à 15:45 +0000, Anthony Liguori a écrit :
> >   
> >> Revision: 5187
> >>           http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5187
> >> Author:   aliguori
> >> Date:     2008-09-10 15:45:19 +0000 (Wed, 10 Sep 2008)
> >>
> >> Log Message:
> >> -----------
> >> Use signalfd() to work around signal/select race
> >>     
> >
> > This commit breaks qemu-nbd:
> >
> > # ./qemu-nbd --port 1024 --persistent ../disk.qcow2 
> > generates "Bus error" when I connect the client:
> > # ./x86_64-softmmu/qemu-system-x86_64 -hda ../etch64.qcow2 -hdb
> > nbd:localhost:1024
> >
> > * gdb output:
> >
> > Program received signal SIGBUS, Bus error.
> > [Switching to Thread 0x7f3accdf76e0 (LWP 13146)]
> > qemu_aio_wait () at block-raw-posix.c:541
> > 541         FD_SET(aio_sig_fd, &rdfds);
> > (gdb) bt
> > #0  qemu_aio_wait () at block-raw-posix.c:541
> > #1  0x0000000000406245 in bdrv_read_em (bs=0x0,
> > sector_num=140736764918416, 
> >     buf=0x8000000000000000 <Address 0x8000000000000000 out of bounds>, 
> >     nb_sectors=0) at block.c:1289
> > #2  0x000000000040437a in nbd_trip (bs=0x622010, csock=8,
> > size=6442450944, 
> >     dev_offset=0, offset=0x7fffd4e13c78, readonly=false, 
> >     data=0x7f3acccd5200 "�H\220м", data_size=1048576) at nbd.c:573
> > #3  0x0000000000402d11 in main (argc=1, argv=0x1) at qemu-nbd.c:444
> >   
> 
> Should be fixed now.  But the following is broken:

Yes

> qemu-system-x86_64 -hda nbd:localhost:1024
> 
> That was broken before the signalfd stuff.  My guest hangs after loading 
> grub.  You're command line probably suggests you knew that.  Do you know 
> why this is?

It doesn't hang: it's just incredibly slow. Try "-socket /tmp/foo"
instead of "-port 1024" (you can add "--verbose" to see it is alive...)
or move the qemu-nbd to another server (with gigabit it's nice).

Laurent
-- 
----------------- address@hidden  ------------------
  "La perfection est atteinte non quand il ne reste rien à
ajouter mais quand il ne reste rien à enlever." Saint Exupéry





reply via email to

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