<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body style="font-family:Arial;font-size:14px"><br>
Hello<br><br>
I answer to myself partially, it seems that the problem occurs when the VMs have timeout to access to their hardware,in<br>
my case the VM are on an NFS shared storage. I know that sometime the NFS server has timeout and after come back.<br><br>
In the previous version of libvirt,qemu, system centos 6 the result was the VM fell with a file system in read only.<br><br>
I tried to repeat  the error in switching on/off the NFS on the servers . I got some errors messages like<br><br>
INFO: task kjournald:360 blocked for more than 120 seconds.<br>
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message=..<br> ....<br>
[<fffffffff8000a08bd>] wake_bit_funtion +0w0/0x23<br> ......<br>
   [<fffffffff8800a0ead>] :jbd:journal_get_write_access+0x22/0x33<br>
;;;;<br>
   [<fffffffff800013ccd>] :ext3:ext3_dirty_inode+0x63/0x7b<br><br>
If I try action on VM ( suspend shutdown , destroy )<br>
the process becomes defunct and I can't do anything else<br><br>
qemu      8142     1 17 10:35 ?        00:48:51 [qemu-system-x86] <defunct><br>
root      8151     2  0 10:35 ?        00:00:40 [vhost-8142]w<br>
root      8153     2  0 10:35 ?        00:00:00 [kvm-pit/8142]<br><br>
The major problem isn't that we see an defunct process with the ps command. It 's that we see<br>
a domain with libvirt in an anormal state and we can't stop it, restart it =.....<br><br>
So my question ;<br>
Is there a way to hide, to don't list process in this state across the libvirt, to have the possibility<br>
to reuse the VM without rebooting the hypervisor.<br>
Can libvirt just list active process ?<br>
Or an elegant to remove pending process ?<br><br><br>
Is the choice for the disk performance can have an inpact to qemu ( none, writethrough, writeback ...)<br>
Actually I 'm using Fedora 23 , libvirt 1.3.3 I will try with an older version in centos 7.2 to see what happen and<br>
if I got the same errors.<br><br>
Thanks<br><br><br><br><br><p>
        Michel Villeneuve <<a href="mailto:Michel.Villeneuve@univ-brest.fr">Michel.Villeneuve@univ-brest.fr</a>> a écrit :</p>
<blockquote style="border-left:2px solid blue;margin-left:2px;padding-left:12px;" type="cite">
        <p>
                Hello<br><br>
                since I changed my hypervisor from centos 6.3 to Fedora-23<br>
                I had many problems with differents VMs.<br><br>
                Very often once by day ( I have about 150 VM ),<br>
                some VMs crash or  freeze indifferently and I got<br>
                messages like this on console.<br><br>
                   [<fffffffff8000a08bd>] wake_bit_funtion +0w0/0x23<br>
                .....<br>
                   [<fffffffff8800a0ead>] :jbd:journal_get_write_access+0x22/0x33<br>
                ;;;;<br>
                   [<fffffffff800013ccd>] :ext3:ext3_dirty_inode+0x63/0x7b<br><br>
                And so the VM is crashed and can't be accessed but often the ping command can respond<br><br>
                Before my migration I never meet these problems, It 's strictly the same VMs between the  6.3 and<br>
                fedora23 release. I just changed the parameter :<br><br>
                  <type arch='x86_64' machine='rhel-6.0.0'>hvm</type><br>
                to<br>
                  <type arch='x86_64' machine='pc-i440fx-2.4'>hvm</type><br>
                and do a virsh define<br><br>
                I tried some other version of the parameters without success.<br><br>
                and I also added a lockd manager in fedora23.<br><br>
                Before and I used libvirt.0.9.5 or 1.0.2 on centos 6.03 without lockd<br><br>
                A major problem with these crashs is that  the VMs couldn't be destroyed<br>
                by the virsh command, the qemu process is notified as defunct by the ps command<br>
                If I try a virsh destroy<br>
                I get in log file<br><br>
                2016-04-20 20:32:47.318+0000: 5541: info : virEventPollRunOnce:641 : EVENT_POLL_RUN: nhandles=11 timeout=-1<br>
                2016-04-20 20:32:55.028+0000: 5567: debug : virProcessKillPainfully:368 : Timed out waiting after SIGTERM to process 8720, sending SIGKILL<br>
                2016-04-20 20:33:00.032+0000: 5567: error : virProcessKillPainfully:398 : Failed to terminate process 8720 with SIGKILL: Périphérique ou ressource occupé<br><br>
                or on console<br><br>
                Failed to terminate process xxx with SIGTERM: Device or resource busy<br>
                and the VM is still in the list in a "Stopping" state<br><br>
                Result of ps ps on the the qemu process attached to the VM<br><br>
                qemu      8720     1  0 avril20 ?      00:07:16 [qemu-system-x86] <defunct><br>
                root      8733     2  0 avril20 ?      00:00:01 [vhost-8720]<br>
                root      8735     2  0 avril20 ?      00:00:00 [kvm-pit/8720]<br><br>
                libvirtd seems to be in an anormal state. If I restart the libvirtd<br>
                the virsh command just hang and never remove the VM from the list.<br><br>
                The only seems to reboot the hypervisor but all the VMs in production too=..<br><br>
                Is there a way to remove the process qemu in defunct state without reboot the hypervisor.<br>
                Perhaps the probleme come from the VM parameters which have been created on 6.3 Centos and libvirt <1.0 version. Do I need to convert some other parameters ?<br><br>
                I 'am trying to put a new hypervisor in aFailed to terminate process X with SIGKILL: Device or resource busy version level less than fedora23 perhaps a Centos 7.2 to<br>
                see what 's happen and if there is a problem like mine.<br><br>
                Thanks<br><br>
                PS:<br>
                I put the log_level to 1<br>
                ----------------------information in logfile<br>
                [root@kvmserver6 ~]# ls -al /var/lib/libvirt/qemu/domain-1-TEST-VM-A<br>
                total 8<br>
                drwxr-x---   2 qemu qemu 4096 20 avril 22:01 .<br>
                drwxr-x--x. 18 qemu qemu 4096 20 avril 22:01 ..<br>
                srwxrwxr-x   1 qemu qemu    0 20 avril 22:01 monitor.sock<br>
                /var/lib/libvirt/qemu/channel/target/domain-1-TEST-VM-A/<br><br><br>
                [root@kvmserver6 ~]# cat /var/log/libvirt/qemu/TEST-VM-A.log<br>
                2016-04-20 20:01:36.714+0000: starting up libvirt version: 1.3.3, package: 1.fc23 (Unknown, 2016-04-06-15:17:39, thinkpad2), qemu version: 2.4.1 (qemu-2.4.1-8.fc23), hostname: kvmserver6.univ-brest.fr<br>
                LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -name TEST-VM-A,debug-threads=on -S -machine pc-i440fx-2.4,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 1e4c27e4-123e-719a-9fdf-f783d34cbb40 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-1-TEST-VM-A/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/images/POOL_PROD4/TEST-VM-A.img,format=raw,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive if=none,id=drive-ide0-1-0,readonly=on -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=26,id=hostnet0,vhost=on,vhostfd=28 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:77:11:11,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 0.0.0.0:0,password -k fr -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device ES1370,id=sound0,bus=pci.0,addr=0x4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -msg timestamp=on<br>
                char device redirected to /dev/pts/1 (label charserial0)<br>
                qemu: terminating on signal 15 from pid 5541</p>
        <div>
                Michel Villeneuve<br>
                Tel 02 98 01 71 61</div>
</blockquote>
<br><br><div>Michel Villeneuve<br>
Tel 02 98 01 71 61</div></body></html>