From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KdshO-0004fZ-8C for qemu-devel@nongnu.org; Thu, 11 Sep 2008 16:23:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KdshK-0004cY-Kr for qemu-devel@nongnu.org; Thu, 11 Sep 2008 16:23:28 -0400 Received: from [199.232.76.173] (port=45827 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KdshJ-0004cO-FI for qemu-devel@nongnu.org; Thu, 11 Sep 2008 16:23:25 -0400 Received: from ecfrec.frec.bull.fr ([129.183.4.8]:52474) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KdshI-0000F1-M7 for qemu-devel@nongnu.org; Thu, 11 Sep 2008 16:23:25 -0400 Subject: Re: [Qemu-devel] [5187] Use signalfd() to work around signal/select race From: Laurent Vivier In-Reply-To: <48C95F19.10701@codemonkey.ws> References: <1221149035.4145.57.camel@frecb07144> <48C95F19.10701@codemonkey.ws> Content-Type: text/plain; charset=UTF-8 Date: Thu, 11 Sep 2008 22:23:15 +0200 Message-Id: <1221164595.4124.16.camel@frecb07144> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Le jeudi 11 septembre 2008 =C3=A0 13:10 -0500, Anthony Liguori a =C3=A9cr= it : > Laurent Vivier wrote: > > Le mercredi 10 septembre 2008 =C3=A0 15:45 +0000, Anthony Liguori a =C3= =A9crit : > > =20 > >> Revision: 5187 > >> http://svn.sv.gnu.org/viewvc/?view=3Drev&root=3Dqemu&revis= ion=3D5187 > >> Author: aliguori > >> Date: 2008-09-10 15:45:19 +0000 (Wed, 10 Sep 2008) > >> > >> Log Message: > >> ----------- > >> Use signalfd() to work around signal/select race > >> =20 > > > > This commit breaks qemu-nbd: > > > > # ./qemu-nbd --port 1024 --persistent ../disk.qcow2=20 > > 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=3D0x0, > > sector_num=3D140736764918416,=20 > > buf=3D0x8000000000000000
,=20 > > nb_sectors=3D0) at block.c:1289 > > #2 0x000000000040437a in nbd_trip (bs=3D0x622010, csock=3D8, > > size=3D6442450944,=20 > > dev_offset=3D0, offset=3D0x7fffd4e13c78, readonly=3Dfalse,=20 > > data=3D0x7f3acccd5200 "=EF=BF=BDH\220=D0=BC", data_size=3D1048576= ) at nbd.c:573 > > #3 0x0000000000402d11 in main (argc=3D1, argv=3D0x1) at qemu-nbd.c:4= 44 > > =20 >=20 > Should be fixed now. But the following is broken: Yes > qemu-system-x86_64 -hda nbd:localhost:1024 >=20 > That was broken before the signalfd stuff. My guest hangs after loadin= g=20 > grub. You're command line probably suggests you knew that. Do you kno= w=20 > 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 --=20 ----------------- Laurent.Vivier@bull.net ------------------ "La perfection est atteinte non quand il ne reste rien =C3=A0 ajouter mais quand il ne reste rien =C3=A0 enlever." Saint Exup=C3=A9ry