[libvirt] 'make check' hangs
Daniel P. Berrange
berrange at redhat.com
Wed Nov 30 11:40:23 UTC 2011
On Wed, Nov 30, 2011 at 11:48:16AM +0100, Jiri Denemark wrote:
> On Wed, Nov 30, 2011 at 09:01:28 +0000, Daniel P. Berrange wrote:
> > On Wed, Nov 30, 2011 at 11:18:23AM +0800, Wen Congyang wrote:
> > > When I run 'make check', it hangs sometimes.
> > >
> > > I use gdb to attach lt-virsh, and the following is the
> > > backtrace:
> > > (gdb) thread 1
> > > [Switching to thread 1 (Thread 0x7fc6c04d5800 (LWP 24099))]#0 0x0000003bdce0804d in pthread_join () from /lib64/libpthread.so.0
> > > (gdb) bt
> > > #0 0x0000003bdce0804d in pthread_join () from /lib64/libpthread.so.0
> > > #1 0x000000000041c0b3 in vshDeinit (ctl=0x7fff015f4570) at virsh.c:17262
> > > #2 0x00000000004248d1 in main (argc=<value optimized out>, argv=0x7fff015f4728) at virsh.c:17608
> > > (gdb) thread 2
> > > [Switching to thread 2 (Thread 0x7fc6c04d4700 (LWP 24138))]#0 0x0000003bdc2dc053 in poll () from /lib64/libc.so.6
> > > (gdb) bt
> > > #0 0x0000003bdc2dc053 in poll () from /lib64/libc.so.6
> > > #1 0x00007fc6c075359c in virEventPollRunOnce () at util/event_poll.c:619
> > > #2 0x00007fc6c07527d7 in virEventRunDefaultImpl () at util/event.c:247
> > > #3 0x000000000041bea3 in vshEventLoop (opaque=0x7fff015f4570) at virsh.c:16800
> > > #4 0x00007fc6c0764702 in virThreadHelper (data=<value optimized out>) at util/threads-pthread.c:157
> > > #5 0x0000003bdce077f1 in start_thread () from /lib64/libpthread.so.0
> > > #6 0x0000003bdc2e570d in clone () from /lib64/libc.so.6
> > > (gdb)
> >
> >
> > I've seen this once, for the first time yesterday, but I can't
> > see any obvious change in either virsh, or the event code that
> > would have caused this to start happening in the past couple
> > of days.
>
> Hmm, I suspect this may be caused by
>
> commit fd7e85ac6af833845aa0eb2526158c319800a0ae
> Author: Jiri Denemark <jdenemar at redhat.com>
> Date: Tue Oct 11 15:05:52 2011 +0200
>
> virsh: Always run event loop
>
> Since virsh already implements event loop, it has to also run it. So far
> the event loop was only running during virsh console command.
>
> However, the commit added a special hack to prevent this from happening:
>
> @@ -17080,6 +17101,16 @@ vshDeinit(vshControl *ctl)
> }
> virResetLastError();
>
> + if (ctl->eventLoopStarted) {
> + /* HACK: Add a dummy timeout to break event loop */
> + int timer = virEventAddTimeout(-1, NULL, NULL, NULL);
> + if (timer != -1)
> + virEventRemoveTimeout(timer);
> +
> + virThreadJoin(&ctl->eventLoop);
> + ctl->eventLoopStarted = false;
> + }
> +
> return true;
> }
>
> Perhaps it's not working as expected.
Ahhh, I had discounted that because the date was Oct 11, and I figured
we would have seen it by now. But that's just your original commit date,
the merge date was Oct 24th. So yeah, I reckon this must be the culprit
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list