Bug 845893 - Double close of FD when failing to connect to a remote hypervisor
Double close of FD when failing to connect to a remote hypervisor
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.4
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Ján Tomko
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-05 23:00 EDT by yanbing du
Modified: 2013-02-21 02:21 EST (History)
7 users (show)

See Also:
Fixed In Version: libvirt-0.10.0-0rc1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:21:04 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 yanbing du 2012-08-05 23:00:22 EDT
Description of problem:
When 
can't access to remote libvirtd which start by a non-root user

Version-Release number of selected component (if applicable):


How reproducible:
libvirt-0.10.0-0rc0.el6.x86_64

Steps to Reproduce:
1. On one host A, stop libvirtd service and start it by a non-root user
#service libvirtd stop
#su tester
$libvirtd -d

2. On another host B, try to connect that libvirtd
#virsh -c qemu+ssh://tester@${hostA_ip}/session
or
#virsh -c qemu+ssh://tester@${hostA_ip}/system
or 
#virsh -c qemu+ssh://tester@${hostA_ip}/aaaaaa

Actual results:
Step2:
error: End of file while reading data: 2012-08-06 02:41:17.381+0000: 7888: info : libvirt version: 0.10.0, package: 0rc0.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2012-08-02-03:44:27, x86-007.build.bos.redhat.com)
2012-08-06 02:41:17.381+0000: 7888: warning : virFileClose:65 : Tried to close invalid fd 7: Input/output error
error: failed to connect to the hypervisor

Expected results:
No such error message.

Additional info:
BTW, if the host B is rhel6.3(libvirt-0.9.10-21.el6_3.3.x86_64), then the errro message is:
error: End of file while reading data: : Input/output error
error: failed to connect to the hypervisor
Comment 1 Ján Tomko 2012-08-21 05:02:31 EDT
Upstream patch proposed:
https://www.redhat.com/archives/libvir-list/2012-August/msg01422.html
Comment 2 Ján Tomko 2012-08-22 04:37:25 EDT
Fixed by commit 8211c677a36609c8d861f23ef21ec2c2e5645ece
    command: avoid double close in virExecWithHook
Comment 4 Huang Wenlong 2012-08-23 03:05:12 EDT
Verify this bug with : 
libvirt-0.10.0-0rc1.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.303.el6.x86_64

step as comment 0:

# virsh -c qemu+ssh://whuang@10.66.82.251/session
whuang@10.66.82.251's password: 
error: End of file while reading data: : Input/output error
error: failed to connect to the hypervisor


there is not message like :  "warning : virFileClose:65 : Tried to close invalid fd 7: Input/output error"
Comment 5 errata-xmlrpc 2013-02-21 02:21:04 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/RHSA-2013-0276.html

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