From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0zeW-0000hs-5m for qemu-devel@nongnu.org; Tue, 06 Sep 2011 13:41:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0zeQ-0005EH-Dr for qemu-devel@nongnu.org; Tue, 06 Sep 2011 13:41:40 -0400 Received: from e5.ny.us.ibm.com ([32.97.182.145]:58594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0zeQ-0005E7-BN for qemu-devel@nongnu.org; Tue, 06 Sep 2011 13:41:34 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e5.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p86HBAvG013877 for ; Tue, 6 Sep 2011 13:11:10 -0400 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p86HfUCh193986 for ; Tue, 6 Sep 2011 13:41:30 -0400 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p86BfQAn018281 for ; Tue, 6 Sep 2011 05:41:27 -0600 From: "Aneesh Kumar K.V" In-Reply-To: <87hb4pd1mq.fsf@skywalker.in.ibm.com> References: <4E66027C.3090909@redhat.com> <4E662EC4.4050705@codemonkey.ws> <87hb4pd1mq.fsf@skywalker.in.ibm.com> Date: Tue, 06 Sep 2011 23:11:16 +0530 Message-ID: <87bouxd0w3.fsf@skywalker.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] glib mainloop breaks virtfs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , Gerd Hoffmann Cc: "qemu-devel@nongnu.org" On Tue, 06 Sep 2011 22:55:17 +0530, "Aneesh Kumar K.V" wrote: > On Tue, 06 Sep 2011 09:31:32 -0500, Anthony Liguori wrote: > > On 09/06/2011 06:22 AM, Gerd Hoffmann wrote: > > > Hi, > > > > > > virtfs stopped working for me in master, the guest (fedora 15) just > > > hangs at boot when mounting the virtfs filesystems. Bisecting points to > > > this commit: > > > > > > rincewind kraxel ~/projects/qemu ((69e5bb6...)|BISECTING)# git bisect good > > > 4d88a2ac8643265108ef1fb47ceee5d7b28e19f2 is the first bad commit > > > commit 4d88a2ac8643265108ef1fb47ceee5d7b28e19f2 > > > Author: Anthony Liguori > > > Date: Mon Aug 22 08:12:53 2011 -0500 > > > > > > main: switch qemu_set_fd_handler to g_io_add_watch > > > > The v9fs code uses qemu_set_fd_handler to trigger coroutines. I suspect > > this is not going to be a fun one to debug. > > > > This changeset changes the ordering of when callbacks are fired so it > > may be triggering a latent bug in the coroutine usage in virtio-9p. > > Aneesh, can you take a look at it? > > > > With master 344eecf6995f4a0ad1d887cec922f6806f91a3f8 I am getting SIGABRT > With the below change i can reproduce the hang. I will take a look at virtfs co-routine use of qemu_set_fd_handler. Any reason why we check for opaque in qemu_set_fd_handler ? diff --git a/iohandler.c b/iohandler.c index 5ef66fb..aaeb20d 100644 --- a/iohandler.c +++ b/iohandler.c @@ -121,7 +121,7 @@ int qemu_set_fd_handler(int fd, g_source_remove(tramp->tag); } - if (opaque) { + GIOCondition cond = 0; tramp->fd_read = fd_read; @@ -138,7 +138,6 @@ int qemu_set_fd_handler(int fd, tramp->chan = g_io_channel_unix_new(fd); tramp->tag = g_io_add_watch(tramp->chan, cond, fd_trampoline, tramp); - } return 0; }