Re: 'make check' hangs

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

 



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@xxxxxxxxxx>
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.

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]