Bug 854474 - floppy I/O error after do live migration with floppy in used
floppy I/O error after do live migration with floppy in used
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.4
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Pavel Hrdina
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-05 02:49 EDT by Sibiao Luo
Modified: 2013-02-21 02:39 EST (History)
15 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.327.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:39:32 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sibiao Luo 2012-09-05 02:49:53 EDT
Description of problem:
do live migration with keeping write date to the floppy, after migration completed,floppy returns Input/output error.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-303.el6.x86_64
qemu-kvm-0.12.1.2-2.307.el6.x86_64
guest info:
# uname -r
2.6.32-303.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot VM with floppy disk.
eg:# /usr/libexec/qemu-kvm -M rhel6.3.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -usb -device usb-tablet,id=input0 -name virtual_blk_device_test -uuid `uuidgen` -drive file=/mnt/RHEL-Server-6.3-64-sluo.qcow2,format=qcow2,if=none,id=drive-disk,cache=none,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-disk,id=virtio_image,bootindex=1 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=98:3B:CB:2E:90:A8,bus=pci.0,addr=0x4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -serial unix:/tmp/ttyS0,server,nowait -vnc :1 -bios /usr/share/seabios/bios-pm.bin -boot menu=on -monitor stdio -drive file=/mnt/floppy.vfd,if=none,id=drive-fdc0-0-0,format=raw,cache=none -global isa-fdc.driveA=drive-fdc0-0-0
2.modprobe floppy and format the floppy disk with ext4 filesystem type.
3.mount it and write data to the floppy with script.
# mkdir /home/floppy
# cat script.sh 
mount /dev/fd0 -t ext4 /home/floppy
for((;;))
do
  echo hello > /home/floppy/file
  echo "========================"
  rm -fr /home/floppy/file
done
4.do live migration
(qemu) migrate -d tcp:$ip_addr:$port

Actual results:
1.after the step 4, migration finish successfully, but the floppy returns I/O error in loop, can not write date to floppy any more.
...
script.sh: line 4: echo: write error: Input/output error
========================
script.sh: line 4: echo: write error: Input/output error
========================
script.sh: line 4: echo: write error: Input/output error
========================
...

2.the logs from dmesg as following:
...
This should not happen!!  Data will be lost
floppy0: disk absent or changed during operation
end_request: I/O error, dev fd0, sector 18
EXT4-fs error (device fd0): ext4_find_entry: reading directory #2 offset 0
EXT4-fs (fd0): previous I/O error to superblock detected
floppy0: disk absent or changed during operation
end_request: I/O error, dev fd0, sector 2
floppy0: disk absent or changed during operation
end_request: I/O error, dev fd0, sector 44
floppy0: disk absent or changed during operation
end_request: I/O error, dev fd0, sector 16
EXT4-fs error (device fd0): ext4_read_block_bitmap: Cannot read block bitmap - block_group = 0, block_bitmap = 8
EXT4-fs (fd0): previous I/O error to superblock detected
floppy0: disk absent or changed during operation
end_request: I/O error, dev fd0, sector 2
EXT4-fs (fd0): delayed block allocation failed for inode 12 at logical offset 0 with max blocks 1 with error -5
...

Expected results:
after the migration, the floppy can be used and can continue write data to it without any error.

Additional info:
Comment 6 Sibiao Luo 2012-10-19 04:04:31 EDT
Hi all,

   Verify this bug on the qemu-kvm-0.12.1.2-2.327.el6 host with the same steps as comment 0.

host info:
# uname -r && rpm -q qemu-kvm
2.6.32-331.el6.x86_64
qemu-kvm-0.12.1.2-2.327.el6.x86_64
guest info:
# uname -r
2.6.32-331.el6.x86_64

Actual results:
after the step 4, migration finish successfully, it will not return I/O error in loop, and the I/O error disappear in guest kernel log.
src:
(qemu) info migrate 
Migration status: completed
dest:
(qemu) info status 
VM status: running

BTW, but it will meet anther issue. the script stop run in the guest and guest will reboot autoinatic and Call Trace after migration. 

Base on above, this bug has been fixed, and I will file anther bug for the new issue.
Comment 8 xu 2013-01-23 04:41:46 EST
Hi Pavel Hrdina,

re-verify this bug with qemu-kvm-0.12.1.2-2.352.el6.x86_64 on rhel6.4 host with rhel6.3 64bit guest found that this defeat still exist(floppy can be access) when create guest with "-M 6.3.0", then do migrate and, if create guest with "-M rhel6.4.0" after migrate, floppy works well;

kernel version on host: kernel-2.6.32-354.el6.x86_64
kernel version in guest:kernel-2.6.32-279.el6.x86_64


Thanks,
Xu
Comment 9 juzhang 2013-01-23 04:45:26 EST
Hi, Pavel

Would you please have a look comment8?

Guest works well by using -M rhel6.4.0
Hit the original problem by using -M rhel6.3.0
Comment 10 xu 2013-01-23 04:47:05 EST
(In reply to comment #8)
> Hi Pavel Hrdina,
> 
> re-verify this bug with qemu-kvm-0.12.1.2-2.352.el6.x86_64 on rhel6.4 host
> with rhel6.3 64bit guest found that this defeat still exist(floppy can't be
> access) when create guest with "-M 6.3.0", then do migrate and, if create
> guest with "-M rhel6.4.0" after migrate, floppy works well;
> 
> kernel version on host: kernel-2.6.32-354.el6.x86_64
> kernel version in guest:kernel-2.6.32-279.el6.x86_64
> 
> 
> Thanks,
> Xu

sorry, typo error; 
in a world, when guest create with "-M rhel6.3.0" bug still exist,  if -M 6.4.0 this bug can't reproduce;

thanks,
Xu
Comment 11 juzhang 2013-01-25 00:50:20 EST
Hi, Areis

Would you please have a look comment9 and comment10? It's expected result?

Best Regards & Thanks,
Junyi
Comment 12 errata-xmlrpc 2013-02-21 02:39:32 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0527.html

Note You need to log in before you can comment on or make changes to this bug.