This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 510430 - nodedev-destroy can hang libvirtd
nodedev-destroy can hang libvirtd
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt (Show other bugs)
5.4
All Linux
low Severity low
: rc
: ---
Assigned To: Cole Robinson
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-09 05:00 EDT by zhanghaiyan
Modified: 2010-03-30 04:10 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-03-30 04:10:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Backport of upstream changeset (622 bytes, text/plain)
2009-12-09 13:02 EST, Cole Robinson
no flags Details
rebased patch - 0 fuzz (434 bytes, application/octet-stream)
2009-12-11 00:04 EST, Laine Stump
no flags Details

  None (edit)
Description zhanghaiyan 2009-07-09 05:00:03 EDT
Description of problem:
After # virsh nodedev-destroy pci_****_***, 
then # virsh nodedev-list --tree, no output.
It seems libvirtd is hanged


Version-Release number of selected component (if applicable):
libvirt-0.6.3-14.el5
RHEL5.4-Server-x86_64-xen
kernel-xen-2.6.18-156.el5

How reproducible:
100%

Steps to Reproduce:
1.# virsh nodedev-list --tree
  computer
  |
  +-pci_8086_10bd
  |   |
  |   +-net_00_1e_4f_a8_ee_27
  |     
  +-pci_8086_244e
  +-pci_8086_2914
   ................

2. # virsh nodedev-destroy pci_8086_10bd
   Destroyed node device 'pci_8086_10bd'

3. # virsh nodedev-list --tree
   <no output>
 
Actual results:
After step3, output the same result with step1

Expected results:
no output

Additional info:
After restart libvirtd, can list node device info
4. # service libvirtd restart
   Stopping libvirtd daemon:                                  [  OK  ]
   Starting libvirtd daemon:                                  [  OK  ]
5. # virsh nodedev-list --tree
  computer
  |
  +-pci_8086_10bd
  |   |
  |   +-net_00_1e_4f_a8_ee_27
  |     
  +-pci_8086_244e
  +-pci_8086_2914
   ................
Comment 1 Daniel Berrange 2009-10-30 11:59:20 EDT
The scenario described shows an attempt to destroy a NIC interface. The Nodedev destroy functionality only covers NPIV  HBAs. So this hang is probably a flaw in our error detection path for non-NPIV devices.
Comment 2 Cole Robinson 2009-12-09 12:34:41 EST
My guess is this is solved by the following upstream commit:

http://libvirt.org/git/?p=libvirt.git;a=commit;h=d686056f624474c61f901762604034fb88301783

However there is still an issue with virsh nodedev-destroy reporting success for devices that it doesn't actually destroy, though that is a separate issue.
Comment 3 Cole Robinson 2009-12-09 13:02:39 EST
Created attachment 377258 [details]
Backport of upstream changeset

Upstream change applied cleanly and builds fine.
Comment 4 Laine Stump 2009-12-11 00:04:19 EST
Created attachment 377667 [details]
rebased patch - 0 fuzz

I've verified that the patch eliminates the libvirtd crash.

The original patch had some fuzz, so I regenerated a patch with 0 fuzz.
Comment 5 Daniel Veillard 2009-12-11 04:42:41 EST
Posted and ACK'ed on virtualist,

Daniel
Comment 6 Daniel Veillard 2009-12-15 10:48:24 EST
libvirt-0.6.3-25.el5 has been built in dist-5E-qu-candidate with the fix,

Daniel
Comment 8 Alex Jia 2009-12-29 04:14:33 EST
This bug has been verified with libvirt 0.6.3-25.el5 on RHEL-5.5. Already
fixed,set status to VERIFIED.

Version-Release number of selected component (if applicable):
[root@dhcp-66-70-62 libvirt]# uname -a
Linux dhcp-66-70-62.nay.redhat.com 2.6.18-183.el5xen #1 SMP Mon Dec 21 18:46:14 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
[root@dhcp-66-70-62 libvirt]# rpm -qa|grep libvirt
libvirt-0.6.3-25.el5
libvirt-python-0.6.3-25.el5
libvirt-debuginfo-0.6.3-25.el5
[root@dhcp-66-70-62 libvirt]# rpm -qa|grep xen
xen-libs-3.0.3-102.el5
xen-devel-3.0.3-102.el5
kmod-gnbd-xen-0.1.5-2.el5
kmod-gfs-xen-0.1.34-9.el5
xen-3.0.3-102.el5
xen-libs-3.0.3-102.el5
kernel-xen-2.6.18-183.el5
kmod-cmirror-xen-0.1.22-3.el5

Steps to Reproduce:
[root@dhcp-66-70-62 libvirt]# virsh nodedev-list --tree
computer
  |
  +-pci_8086_10bd
  |   |
  |   +-net_00_23_ae_6f_f1_d7
  |     
  +-pci_8086_244e
  +-pci_8086_2914
......

[root@dhcp-66-70-62 libvirt]# virsh nodedev-destroy pci_8086_10bd
Destroyed node device 'pci_8086_10bd'

[root@dhcp-66-70-62 libvirt]# virsh nodedev-list --tree
computer
  |
  +-pci_8086_10bd
  |   |
  |   +-net_00_23_ae_6f_f1_d7
  |     
  +-pci_8086_244e
  +-pci_8086_2914
......
Comment 13 errata-xmlrpc 2010-03-30 04:10:41 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0205.html

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