Description of problem: Guest aborted when make guest stop on write error Version-Release number of selected component (if applicable): kvm-83-164.el5_5.6 kernel-2.6.18-194.el5 How reproducible: 100% Steps to Reproduce: 1.Create a nfs on host and start the nfs server #mount -o soft,timeo=1,retrans=0,retry=0 localhost:/root/root_nfs/ /opt #service nfs restart 2.create a new 64kb cluster qcow2 image (vdisk) on host nfs server. #cd /root/root_nfs #qemu-img create -f qcow2 test.qcow2 30G 3.boot an pre-installed kvm guest with the vdisk attached. #/usr/libexec/qemu-kvm -m 2048 -smp 2 -drive file=RHEL-Server-5.5-64.qcow2,media=disk,if=ide,cache=off -net nic,vlan=0,macaddr=00:23:AE:00:01:02,model=e1000 -net tap,vlan=0,script=/etc/qemu-ifup -vnc :10 -monitor stdio -boot cd -no-kvm-pit-reinjection -rtc-td-hack -cpu qemu64,+sse2 -uuid 8d1e797b-59cf-4973-9ead-837654a22fe8 -usbdevice tablet -notify all -startdate now -balloon none -drive file=/opt/testing.qcow2,media=disk,if=ide,werror=stop,cache=off -name 195-RHEL 4.create partition and file system on hdb inside kvm guest #fdisk /dev/hdb #mkfs.ext3 /dev/hdb1 5.#mount /dev/hdb1 /mnt 6.copy a large file to /mnt directory #cp /root/RHEL5.4-Server-20090819.0-x86_64-DVD.iso /mnt 7.on the nfs server . stop the service #service nfs stop Actual results: Guest aborted. See Additional info. Expected results: Guest should stop on the write error,cont the vm, should no damage the fs Additional info: [root@localhost home]# gdb /usr/libexec/qemu-kvm GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/libexec/qemu-kvm...Reading symbols from /usr/lib/debug/usr/libexec/qemu-kvm.debug...done. done. (gdb) r -m 2048 -smp 2 -drive file=RHEL-Server-5.5-64.qcow2,media=disk,if=ide,cache=off -net nic,vlan=0,macaddr=00:23:AE:00:01:02,model=e1000 -net tap,vlan=0,script=/etc/qemu-ifup -vnc :10 -monitor stdio -boot cd -no-kvm-pit-reinjection -rtc-td-hack -cpu qemu64,+sse2 -uuid 8d1e797b-59cf-4973-9ead-837654a22fe8 -usbdevice tablet -notify all -startdate now -balloon none -drive file=/opt/testing.qcow2,media=disk,if=ide,werror=stop,cache=off -name 195-RHEL Starting program: /usr/libexec/qemu-kvm -m 2048 -smp 2 -drive file=RHEL-Server-5.5-64.qcow2,media=disk,if=ide,cache=off -net nic,vlan=0,macaddr=00:23:AE:00:01:02,model=e1000 -net tap,vlan=0,script=/etc/qemu-ifup -vnc :10 -monitor stdio -boot cd -no-kvm-pit-reinjection -rtc-td-hack -cpu qemu64,+sse2 -uuid 8d1e797b-59cf-4973-9ead-837654a22fe8 -usbdevice tablet -notify all -startdate now -balloon none -drive file=/opt/testing.qcow2,media=disk,if=ide,werror=stop,cache=off -name 195-RHEL [Thread debugging using libthread_db enabled] Detaching after fork from child process 8865. [New Thread 0x40a00940 (LWP 8871)] [New Thread 0x41401940 (LWP 8872)] [New Thread 0x41e02940 (LWP 8873)] [New Thread 0x42803940 (LWP 8875)] QEMU 0.9.1 monitor - type 'help' for more information (qemu) [New Thread 0x43204940 (LWP 8876)] (qemu) [Thread 0x42803940 (LWP 8875) exited] [New Thread 0x42803940 (LWP 8882)] [Thread 0x42803940 (LWP 8882) exited] [New Thread 0x42803940 (LWP 8889)] bdrv_write ret=-5 bdrv_write ret=-5 [Thread 0x42803940 (LWP 8889) exited] [New Thread 0x42803940 (LWP 8915)] [Thread 0x42803940 (LWP 8915) exited] [New Thread 0x42803940 (LWP 8916)] [Thread 0x42803940 (LWP 8916) exited] [New Thread 0x42803940 (LWP 8917)] [Thread 0x42803940 (LWP 8917) exited] [New Thread 0x42803940 (LWP 8928)] [Thread 0x42803940 (LWP 8928) exited] [New Thread 0x42803940 (LWP 8929)] [Thread 0x42803940 (LWP 8929) exited] [New Thread 0x42803940 (LWP 8930)] [Thread 0x42803940 (LWP 8930) exited] [New Thread 0x42803940 (LWP 8935)] qcow2: free_clusters failed: Input/output error Program received signal SIGABRT, Aborted. 0x00000031d6030265 in raise () from /lib64/libc.so.6 (gdb) (gdb) bt #0 0x00000031d6030265 in raise () from /lib64/libc.so.6 #1 0x00000031d6031d10 in abort () from /lib64/libc.so.6 #2 0x000000000049826b in free_clusters (bs=<value optimized out>, offset=<value optimized out>, size=<value optimized out>) at block-qcow2.c:2673 #3 0x000000000049ac18 in qcow_aio_write_cb (opaque=0xcaeeb0, ret=0) at block-qcow2.c:1548 #4 0x0000000000419707 in posix_aio_read (opaque=<value optimized out>) at block-raw-posix.c:512 #5 0x00000000004094b2 in main_loop_wait (timeout=<value optimized out>) at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/vl.c:3983 #6 0x00000000004ff4ba in kvm_main_loop () at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/qemu-kvm.c:596 #7 0x000000000040e425 in main_loop (argc=35, argv=0x7fffffffe658, envp=<value optimized out>) at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/vl.c:4040 #8 main (argc=35, argv=0x7fffffffe658, envp=<value optimized out>) at /usr/src/debug/kvm-83-maint-snapshot-20090205/qemu/vl.c:6476 (gdb)
Re-test this issue in kvm-83-164.el5_5.3, and this issue does not exist. PS: This problem is found during testing bug #581766. https://bugzilla.redhat.com/show_bug.cgi?id=581766
verified on kvm-83-172.el5 steps: 1.Create a nfs on host and start the nfs server #mount -o soft,timeo=1,retrans=0,retry=0 localhost:/var/lib/libvirt/images/ /test #service nfs restart 2.create a new 64kb cluster qcow2 image (vdisk) on host nfs server. #cd /var/lib/libvirt/images #qemu-img create -f qcow2 test.qcow2 30G 3.boot an pre-installed kvm guest with the vdisk attached. #/usr/libexec/qemu-kvm -m 2048 -smp 2 -drive file=/root/rhel55-64.qcow2,media=disk,if=ide,cache=off -net nic,vlan=0,macaddr=10:23:34:23:34:65,model=e1000 -net tap,vlan=0,script=/etc/qemu-ifup -vnc :10 -monitor stdio -boot cd -no-kvm-pit-reinjection -rtc-td-hack -cpu qemu64,+sse2 -uuid 8d1e797b-59cf-4973-9ead-837654a22fe8 -usbdevice tablet -notify all -startdate now -balloon none -drive file=/test/test.qcow2,media=disk,if=ide,werror=stop,cache=off -name 56 4.create partition and file system on hdb inside kvm guest #fdisk /dev/hdb #mkfs.ext3 /dev/hdb1 5.#mount /dev/hdb1 /mnt 6.copy a large file to /mnt directory #cp /root/RHEL5.4-Server-20090819.0-x86_64-DVD.iso /mnt 7.on the nfs server . stop the service #service nfs stop test result on guest: (qemu) qcow2: free_clusters failed: Input/output error # VM is stopped due to disk write error: ide0-hd1: Input/output error c (qemu) info status VM status: running
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-0028.html