Bug 890297

Summary: libvirtd.log will get an I/O error when close a virt-viewer guest terminal
Product: Red Hat Enterprise Linux 6 Reporter: EricLee <bili>
Component: virt-viewerAssignee: Daniel Berrangé <berrange>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: acathrow, cfergeau, cwei, dallan, dblechte, dyuan, jtomko, lnovich, marcandre.lureau, mjenner, mzhan, tzheng
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-viewer-0.5.6-6.el6 Doc Type: Bug Fix
Doc Text:
Cause: Close a virt-viewer guest terminal Consequence: libvirtd.log will get an I/O error Fix: Unregister libvirt events and callbacks on dispose Result: There is no longer I/O error in the libvirtd log when closing virt-viewer.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 08:06:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description EricLee 2012-12-26 08:59:18 UTC
Description of problem:
libvirtd.log will get an I/O error when close a virt-viewer guest terminal

Version-Release number of selected component (if applicable):
spice-server-0.12.0-8.el6.x86_64
libvirt-0.10.2-13.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.344.el6.x86_64
virt-viewer-0.5.2-18.el6.x86_64
virt-manager-0.9.0-18.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. # cat nfs.xml 
<domain type='kvm'>
  <name>nfs</name>
  <uuid>b067f6aa-2122-3eb8-bcd0-c83cf55ae8d4</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <os>
    <type arch='x86_64' machine='rhel6.4.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu>
    <topology sockets='2' cores='1' threads='2'/>
  </cpu>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/var/lib/libvirt/images/r63.img'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </controller>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='fdc' index='0'/>
    <interface type='network'>
      <mac address='52:54:00:30:7a:ac'/>
      <source network='default'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='mouse' bus='ps2'/>
    <graphics type='spice' autoport='yes'/>
    <sound model='ich6'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <video>
      <model type='qxl' vram='8192' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
</domain>

2.# virsh define nfs.xml

3.# virt-viewer nfs

4.Close the terminal of virt-viewer and check libvirtd.log
will get:
2012-12-26 07:49:10.483+0000: 9556: error : virNetSocketReadWire:1184 : End of file while reading data: Input/output error
  
Actual results:
As steps

Expected results:
Should not get that error

Additional info:

Comment 1 Jiri Denemark 2013-03-07 19:44:41 UTC
Libvirtd is just saying it got EOF on a socket. The only thing that
could perhaps be considered to be a bug is that libvirtd is a bit too
laud (warning could be enough) and reporting the EOF as EIO is a bit
confusing too.

Comment 2 Dave Allan 2013-06-03 14:22:04 UTC
IMO this is a supportability issue as I think these errors might be confusing to users.

Comment 7 Ján Tomko 2013-07-25 15:36:01 UTC
This error is caused by virt-viewer not cleaning up the callbacks and events when disconnecting.

Upstream patch:
https://www.redhat.com/archives/virt-tools-list/2013-July/msg00136.html

Comment 10 tingting zheng 2013-07-30 06:08:24 UTC
I can reproduce this issue with:
virt-viewer-0.5.6-2.el6.x86_64

Tested with:
virt-viewer-0.5.6-6.el6.x86_64

After close virt-viewer,there is no such Input/output error info in libvirtd.log.So move the bug to VERIFIED.

Comment 11 errata-xmlrpc 2013-11-21 08:06:09 UTC
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-1578.html