Bug 879360 - Libvirt leaks libvirt_lxc processes on container shutdown
Summary: Libvirt leaks libvirt_lxc processes on container shutdown
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 881827
TreeView+ depends on / blocked
 
Reported: 2012-11-22 16:53 UTC by Daniel Berrangé
Modified: 2013-02-21 07:27 UTC (History)
9 users (show)

Fixed In Version: libvirt-0.10.2-10.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:27:35 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description Daniel Berrangé 2012-11-22 16:53:01 UTC
Description of problem:
When the container shuts down gracefully, the libvirt_lxc process does not quit. This wastes system resources

Version-Release number of selected component (if applicable):
0.10.2-1.el6

How reproducible:
Always

Steps to Reproduce:
1. virsh start mycontainer
2. virsh console mycontainer
3. Type 'exit' inside the container shell
4. ps axuwf | grep libvirt_lxc
  
Actual results:
libvirt_lxc process still exists

Expected results:
No libvirt_lxc process exists

Additional info:

Comment 1 Daniel Berrangé 2012-11-22 16:53:46 UTC
Fix available upstream

https://www.redhat.com/archives/libvir-list/2012-November/msg01009.html

Comment 4 Peter Krempa 2012-11-23 11:01:07 UTC
Fixed upstream:
commit 37db3f5dfe713b978732a9b84982892da857813a
Author: Daniel P. Berrange <berrange@redhat.com>
Date:   Thu Nov 22 16:45:39 2012 +0000

    Fix exiting of libvirt_lxc program on container quit
    
    The virLXCControllerClientCloseHook method was mistakenly
    assuming that the private data associated with the network
    client was the virLXCControllerPtr. In fact it was just a
    dummy int, so we were derefencing a bogus struct. The
    frequent result of this was that we would never quit, because
    we tried to arm a non-existant timer.
    
    Fix the code by removing the dummy private data and just
    using the virLXCControllerPtr instance as private data
    
    Signed-off-by: Daniel P. Berrange <berrange@redhat.com>

and backported downstream:
http://post-office.corp.redhat.com/archives/rhvirt-patches/2012-November/msg00254.html

Comment 6 yanbing du 2012-11-27 10:25:56 UTC
Verify this bug with libvirt-0.10.2-10.el6

Steps:
# virsh -c lxc:///

virsh # start toy
Domain toy started

virsh # list 
 Id    Name                           State
----------------------------------------------------
 9842  toy                            running

virsh # console toy
Connected to domain toy
Escape character is ^]
sh-4.1# exit
exit

virsh # quit

#  ps axuwf | grep libvirt_lxc
root      9858  0.0  0.0 103244   816 pts/0    S+   18:19   0:00          \_ grep libvirt_lxc

There's no libvirt_lxc process exists.

Comment 7 errata-xmlrpc 2013-02-21 07:27:35 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/RHSA-2013-0276.html


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