Re: [PATCH] Bugfix: Check stdoutWatch before removing the handler.

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

 



Hello,

On Wednesday 10 August 2011 17:25:58 Eric Blake wrote:
> On 08/10/2011 09:09 AM, Dave Allan wrote:
> > On Wed, Aug 10, 2011 at 05:03:23PM +0200, Juerg Haefliger wrote:
> >> ---
> >>   tools/console.c |    2 +-
> >>
> >> -    if (con->stdinWatch != -1)
> >> +    if (con->stdoutWatch != -1)

Excellent, that fixes one anoying crash I also observed when automating my 
snapshot testing.

While testing it I noticed the following behaviour:
1. Start virsh
2. Do "qemu-monitor-command $SOME_VM info\ chardev" to get the path of the pty 
used for the console → /dev/pts/Y
3. Execute "console $SOME_VM" from within the same virsh X≥2 times; terminate 
each console with ^].
4. Run `lsof /dev/pts/Y' or 'lsof -p `pidof libvirtd`, which shows the pty to 
be opened X times.
5. Exit virsh and re-run the lsof-command: The pty is still opened.
6. Start virsh again: "0.8.4+the patch" hangs here and is not killable by 
SIGTERM, only SIGKILL; backtrace is attached. With 0.9.4 this seems to be 
fixed and is working, but:
7. Executing another "console $SOME_VM" delays for some amount of time and 
than opens the console.
8. Rerunning "lsof" again now shows only the pty to be opened once. Good.

Can somebody else reproduce this?
Is this normal?

Sincerely
Philipp Hahn
-- 
Philipp Hahn           Open Source Software Engineer      hahn@xxxxxxxxxxxxx
Univention GmbH        Linux for Your Business        fon: +49 421 22 232- 0
Mary-Somerville-Str.1  D-28359 Bremen                 fax: +49 421 22 232-99
                                                   http://www.univention.de/
[Thread debugging using libthread_db enabled]
[New Thread 0x7f8c4a2ad770 (LWP 20183)]
[New Thread 0x437c4950 (LWP 20189)]
[New Thread 0x42fc3950 (LWP 20188)]
[New Thread 0x427c2950 (LWP 20187)]
[New Thread 0x41fc1950 (LWP 20186)]
[New Thread 0x417c0950 (LWP 20185)]
[New Thread 0x40fbf950 (LWP 20184)]
0x00007f8c47c43715 in pthread_join () from /lib/libpthread.so.0

Thread 7 (Thread 0x40fbf950 (LWP 20184)):
#0  0x000000000042c047 in remoteRemoveClientStream (client=0x1dece40, stream=0x7f8c400919e0) at /root/libvirt-0.8.7/daemon/stream.c:359
#1  0x000000000041ab3d in qemudFreeClient (client=0x1) at /root/libvirt-0.8.7/daemon/libvirtd.c:2291
#2  0x000000000041aee2 in qemudRunLoop (opaque=<value optimized out>) at /root/libvirt-0.8.7/daemon/libvirtd.c:2369
#3  0x00007f8c47c42fc7 in start_thread () from /lib/libpthread.so.0
#4  0x00007f8c479b864d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 6 (Thread 0x417c0950 (LWP 20185)):
#0  0x00007f8c47c46d29 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f8c49ba3216 in virCondWait (c=0x1da415c, m=0x80) at /root/libvirt-0.8.7/src/util/threads-pthread.c:108
#2  0x000000000041c2bd in qemudWorker (data=<value optimized out>) at /root/libvirt-0.8.7/daemon/libvirtd.c:1566
#3  0x00007f8c47c42fc7 in start_thread () from /lib/libpthread.so.0
#4  0x00007f8c479b864d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x41fc1950 (LWP 20186)):
#0  0x00007f8c47c46d29 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f8c49ba3216 in virCondWait (c=0x1da415c, m=0x80) at /root/libvirt-0.8.7/src/util/threads-pthread.c:108
#2  0x000000000041c2bd in qemudWorker (data=<value optimized out>) at /root/libvirt-0.8.7/daemon/libvirtd.c:1566
#3  0x00007f8c47c42fc7 in start_thread () from /lib/libpthread.so.0
#4  0x00007f8c479b864d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x427c2950 (LWP 20187)):
#0  0x00007f8c47c46d29 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f8c49ba3216 in virCondWait (c=0x1da415c, m=0x80) at /root/libvirt-0.8.7/src/util/threads-pthread.c:108
#2  0x000000000041c2bd in qemudWorker (data=<value optimized out>) at /root/libvirt-0.8.7/daemon/libvirtd.c:1566
#3  0x00007f8c47c42fc7 in start_thread () from /lib/libpthread.so.0
#4  0x00007f8c479b864d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x42fc3950 (LWP 20188)):
#0  0x00007f8c47c46d29 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f8c49ba3216 in virCondWait (c=0x1da415c, m=0x80) at /root/libvirt-0.8.7/src/util/threads-pthread.c:108
#2  0x000000000041c2bd in qemudWorker (data=<value optimized out>) at /root/libvirt-0.8.7/daemon/libvirtd.c:1566
#3  0x00007f8c47c42fc7 in start_thread () from /lib/libpthread.so.0
#4  0x00007f8c479b864d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x437c4950 (LWP 20189)):
#0  0x00007f8c47c46d29 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f8c49ba3216 in virCondWait (c=0x1da415c, m=0x80) at /root/libvirt-0.8.7/src/util/threads-pthread.c:108
#2  0x000000000041c2bd in qemudWorker (data=<value optimized out>) at /root/libvirt-0.8.7/daemon/libvirtd.c:1566
#3  0x00007f8c47c42fc7 in start_thread () from /lib/libpthread.so.0
#4  0x00007f8c479b864d in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f8c4a2ad770 (LWP 20183)):
#0  0x00007f8c47c43715 in pthread_join () from /lib/libpthread.so.0
#1  0x000000000041ec1b in main (argc=<value optimized out>, argv=<value optimized out>) at /root/libvirt-0.8.7/daemon/libvirtd.c:3334
#0  0x00007f8c47c43715 in pthread_join () from /lib/libpthread.so.0

Attachment: signature.asc
Description: This is a digitally signed message part.

--
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]