Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1122337

Summary: attach-interface use the same wrong target name twice will report Input/output error
Product: Red Hat Enterprise Linux 7 Reporter: Luyao Huang <lhuang>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, dyuan, jiahu, jtomko, lhuang, mzhan, pkrempa, shyu, zpeng
Target Milestone: rc   
Target Release: 7.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-23 12:25:29 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:
Attachments:
Description Flags
libvirt debug log none

Description Luyao Huang 2014-07-23 02:03:42 UTC
Description of problem:
attach-interface use the same wrong target name twice will report Input/output  error

Version-Release number of selected component (if applicable):
libvirt-1.1.1-29.el7_0.1.x86_64

How reproducible:
100%

Steps to Reproduce:
1.# virsh attach-interface test3 network default "top1"
Interface attached successfully

2.# virsh attach-interface test3 network default "top1"
error: Failed to attach interface
error: Unable to create tap device top1: Device or resource busy

3.# virsh attach-interface test3 network default "top1"
error: Failed to attach interface
error: End of file while reading data: Input/output error
error: One or more references were leaked after disconnect from the hypervisor
error: Reconnected to the hypervisor

3.# virsh attach-interface test3 network default " "
error: Failed to attach interface
error: End of file while reading data: Input/output error
error: One or more references were leaked after disconnect from the hypervisor
error: Reconnected to the hypervisor

Actual results:
The error message can't output normal after Input/output error

Expected results:
Report the same error messages:
error: Failed to attach interface
error: Unable to create tap device top1: Device or resource busy

Additional info:

Comment 2 Luyao Huang 2014-07-23 02:44:08 UTC
Created attachment 920079 [details]
libvirt debug log

The libvirtd debug log of this error

Comment 3 Peter Krempa 2014-07-23 07:47:27 UTC
The line:
error: End of file while reading data: Input/output error

usually hints on a libvirt crash. Could you please verify if that happened and in case it did, please provide a backtrace of all threads of the daemon.

Comment 4 Luyao Huang 2014-07-23 09:02:16 UTC
(In reply to Peter Krempa from comment #3)
> The line:
> error: End of file while reading data: Input/output error
> 
> usually hints on a libvirt crash. Could you please verify if that happened
> and in case it did, please provide a backtrace of all threads of the daemon.

Libvirtd not crash and i can use other virsh command ,and the libvirtd pid was the same as pid which after i did these lot of steps :

[root@localhost lhaung]# ps aux|grep libvirtd
root      6564  2.7  0.3 1082628 24472 ?       Rsl  10:54   9:27 /usr/sbin/libvirtd
lhaung    7542  1.9  0.2 965964 19608 ?        Sl   11:36   5:49 /usr/sbin/libvirtd --timeout=30
root     32051  0.0  0.0 112640   968 pts/5    R+   16:40   0:00 grep --color=auto libvirtd


[root@localhost lhaung]# virsh attach-interface test3 network default "top1"
error: Failed to attach interface
error: End of file while reading data: Input/output error
error: One or more references were leaked after disconnect from the hypervisor
error: Reconnected to the hypervisor

[root@localhost lhaung]# service libvirtd status
Redirecting to /bin/systemctl status  libvirtd.service
libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled)
   Active: active (running) since Wed 2014-07-23 10:54:16 HKT; 5h 49min ago
 Main PID: 6564 (libvirtd)
   CGroup: /system.slice/libvirtd.service
           ├─2818 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf
           └─6564 /usr/sbin/libvirtd

Jul 23 10:57:29 localhost.localdomain libvirtd[6564]: Tried to close invalid fd 0
Jul 23 11:09:29 localhost.localdomain libvirtd[6564]: Unable to create tap device top1: Device or resource busy
Jul 23 11:09:29 localhost.localdomain libvirtd[6564]: Tried to close invalid fd 0
Jul 23 11:09:29 localhost.localdomain libvirtd[6564]: Tried to close invalid fd 0
Jul 23 16:41:02 localhost.localdomain libvirtd[6564]: Unable to create tap device top1: Device or resource busy
Jul 23 16:41:02 localhost.localdomain libvirtd[6564]: Tried to close invalid fd 0
Jul 23 16:41:02 localhost.localdomain libvirtd[6564]: Tried to close invalid fd 0
Jul 23 16:43:41 localhost.localdomain libvirtd[6564]: Unable to create tap device top1: Device or resource busy
Jul 23 16:43:41 localhost.localdomain libvirtd[6564]: Tried to close invalid fd 0
Jul 23 16:43:41 localhost.localdomain libvirtd[6564]: Tried to close invalid fd 0


[root@localhost lhaung]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 2     test3                          running
 -     etsd                           shut off
 -     qcow2                          shut off
 -     r6-qcow2                       shut off
 -     raw                            shut off
 -     rhel6u1-fv-dir-pool            shut off
 -     test34                         shut off
 -     test4                          shut off
 -     test5                          shut off

[root@localhost lhaung]# ps aux|grep libvirtd
root      6564  2.7  0.3 1082628 24500 ?       Ssl  10:54   9:29 /usr/sbin/libvirtd
lhaung    7542  1.9  0.2 965964 19608 ?        Sl   11:36   5:50 /usr/sbin/libvirtd --timeout=30
root     32124  0.0  0.0 112644   968 pts/5    S+   16:41   0:00 grep --color=auto libvirtd

Comment 5 Ján Tomko 2014-07-23 12:25:29 UTC

*** This bug has been marked as a duplicate of bug 1072677 ***