RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 970525 - qemu-kvm didnt raise block I/O error when NFS down (img on NFS)
Summary: qemu-kvm didnt raise block I/O error when NFS down (img on NFS)
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-04 09:08 UTC by Xiaoqing Wei
Modified: 2015-09-03 15:37 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-05 12:06:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xiaoqing Wei 2013-06-04 09:08:25 UTC
Description of problem:

qemu-kvm didnt raise block I/O error when NFS down (img on NFS)

Version-Release number of selected component (if applicable):
qemu-kvm-1.5.0-2.el7.x86_64
kernel-3.9.0-0.55.el7.x86_64
other components from 20130522.0

How reproducible:
4/4

Steps to Reproduce:
1.boot a vm w/ 2 img, one on local fs, and one on NFS mount
qemu-kvm -monitor stdio    -S \
    -name 'vm1' \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20130530-191349-ZMSDl1gm,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control \
    -chardev socket,id=serial_id_serial1,path=/tmp/serial-serial1-20130530-191349-ZMSDl1gm,server,nowait \
    -device isa-serial,chardev=serial_id_serial1 \
    -chardev socket,id=seabioslog_id_20130530-191349-ZMSDl1gm,path=/tmp/seabios-20130530-191349-ZMSDl1gm,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20130530-191349-ZMSDl1gm,iobase=0x402 \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=0x4 \
    -drive file='/home/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-7.0-64.qcow2',if=none,id=drive-ide0-0-0,media=disk,cache=none,snapshot=off,format=qcow2,aio=native \
    -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0 \
    -device rtl8139,netdev=idIg594w,mac=9a:3b:3c:3d:3e:3f,bus=pci.0,addr=0x3,id='idCSLDpm' \
    -netdev tap,id=idIg594w \
    -m 4096 \
    -smp 4,maxcpus=4,cores=2,threads=1,sockets=2 \
    -cpu 'SandyBridge' \
    -M pc \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
    -vnc :0 \
    -vga cirrus \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off   \
    -no-kvm-pit-reinjection \
    -enable-kvm  \
    -drive file='/media/qcow3-over-nfs.qcow2',if=none,id=drive-ide0-0-1,media=disk,cache=none,werror=stop,snapshot=off,format=qcow2,aio=native \
    -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1 \

 mount -l | grep media
10.66.9.255:/home on /media type nfs4 (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.66.106.40,local_lock=none,addr=10.66.9.255)
2. on NFS server:
either 1) iptables -t filter -A INPUT -s ip_of_kvm_host -m state --state NEW -p tcp --dport 2049 -j REJECT
or     2) ifconfig eth0 down

3. wait for qemu-kvm to freeze

Actual results:

qemu-kvm would freeze after a while
but not any error msg from monitor

Expected results:
on rhel6 host, do same test,
error would raised from monitor, 
and btw, the freeze of qemu comes much more quick then on rhel7 host.

block I/O error in device 'drive-ide0-0-1': Input/output error (5)

Additional info:

Comment 3 Sibiao Luo 2013-06-04 09:28:45 UTC
(In reply to Xiaoqing Wei from comment #0)
>     -drive
> file='/media/qcow3-over-nfs.qcow2',if=none,id=drive-ide0-0-1,media=disk,
> cache=none,werror=stop,snapshot=off,format=qcow2,aio=native \
>     -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1 \
> 
IIRC, IDE donot support 'rerror=stop and werror=stop'.

Comment 4 Kevin Wolf 2013-06-05 12:06:43 UTC
(In reply to Xiaoqing Wei from comment #0)
>  mount -l | grep media
> 10.66.9.255:/home on /media type nfs4
> (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,
> port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.66.106.40,local_lock=none,
> addr=10.66.9.255)

With the 'hard' mount option, I/O requests will never fail. See the man page:

"soft / hard: Determines the recovery behavior of the NFS client after an NFS
request times out. If neither option is specified (or if the hard option is
specified), NFS requests are retried indefinitely."

This is expected behaviour.

Comment 5 Xu Tian 2013-07-31 09:32:13 UTC
(In reply to Kevin Wolf from comment #4)
> (In reply to Xiaoqing Wei from comment #0)
> >  mount -l | grep media
> > 10.66.9.255:/home on /media type nfs4
> > (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,
> > port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.66.106.40,local_lock=none,
> > addr=10.66.9.255)
> 
> With the 'hard' mount option, I/O requests will never fail. See the man page:
> 
> "soft / hard: Determines the recovery behavior of the NFS client after an NFS
> request times out. If neither option is specified (or if the hard option is
> specified), NFS requests are retried indefinitely."
> 
> This is expected behaviour.

So if we mount nfs with "-o soft" werror action should work in qemu IDE block device, I'm a right?

Thanks,
Xu


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