qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] glib mainloop breaks virtfs


From: Aneesh Kumar K.V
Subject: Re: [Qemu-devel] glib mainloop breaks virtfs
Date: Tue, 06 Sep 2011 23:11:16 +0530
User-agent: Notmuch/0.5-318-g52e4ded (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu)

On Tue, 06 Sep 2011 22:55:17 +0530, "Aneesh Kumar K.V" <address@hidden> wrote:
> On Tue, 06 Sep 2011 09:31:32 -0500, Anthony Liguori <address@hidden> 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 <address@hidden>
> > > 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;
 }



reply via email to

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