__virExec:362 : cannot create pipe: Too many open files

Bug #567392 reported by Scott Moser
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
High
Jamie Strandboge
Lucid
Fix Released
High
Jamie Strandboge

Bug Description

In extended eucalyptus runs I am seeing the following in nc.log

[Mon Apr 19 20:07:01 2010][008152][EUCAERROR ] libvirt: cannot create pipe: Too many open files (code=38)

and then, in syslog:

Apr 20 13:00:27 kearney libvirtd: 13:00:27.712: error : __virExec:362 : cannot create pipe: Too many open files

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: libvirt-bin 0.7.5-5ubuntu24
ProcVersionSignature: Ubuntu 2.6.32-21.31-server 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-server x86_64
Architecture: amd64
Date: Tue Apr 20 12:54:57 2010
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: libvirt

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

libvirtd is leaking file descriptors on it's log file when destroying/shutting down down a VM. Eg:

$ sudo ls -l /proc/`cat /var/run/libvirtd.pid`/fd > /tmp/before
$ virsh start sec-dapper-i386
$ sudo ls -l /proc/`cat /var/run/libvirtd.pid`/fd > /tmp/during
$ virsh destroy sec-dapper-i386
$ sudo ls -l /proc/`cat /var/run/libvirtd.pid`/fd > /tmp/after
$ diff /tmp/before /tmp/after
38a39
> lrwx------ 1 root root 64 2010-04-20 13:17 43 -> /var/log/libvirt/qemu/sec-dapper-i386.log
[1]

Changed in libvirt (Ubuntu):
status: New → In Progress
assignee: nobody → Jamie Strandboge (jdstrand)
importance: Undecided → High
milestone: none → ubuntu-10.04
Revision history for this message
Jamie Strandboge (jdstrand) wrote :
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

The attached debdiff fixes the issue. It also has an AppArmor profile update that I was going to SRU. In addition to fixing the bug, it passing the in build test suite and qa-regression-testing test-libvirt.py tests.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I propose that this fix be considered for Lucid RC.

Revision history for this message
Steve Langasek (vorlon) wrote :

Discussed this with Scott on IRC; I don't think this warrants a respin and reset of validation on Ubuntu Server images and DVD images for the RC, but please get it uploaded to the queue for immediate post-RC acceptance.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Agreed, thanks for the consideration, Steve.

Re-targeting at lucid-updates.

Changed in libvirt (Ubuntu Lucid):
milestone: ubuntu-10.04 → lucid-updates
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Spoke with slangasek in IRC. He indicated that this should be approved post RC, in time for GA. Re-targeting at 10.04.

Changed in libvirt (Ubuntu Lucid):
milestone: lucid-updates → ubuntu-10.04
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Uploaded per slangasek's comment, with a tweak to the aforementioned AppArmor profile changes. Retested for no leaks, passes in build tests and QRT test-libvirt.py.

Steve Langasek (vorlon)
Changed in libvirt (Ubuntu Lucid):
status: In Progress → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote :

I've tested Jamie's debs that he gave me access to. With the new debs in place, an 'lsof -p $(pidof libvirtd) | wc -l' varies between 79 and 80 for me over the test of running several hundred instances.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 0.7.5-5ubuntu26

---------------
libvirt (0.7.5-5ubuntu26) lucid; urgency=low

  * debian/patches/9022-dont-leak-log-fd.path.patch: Fix FD leak in
    qemudStartVMDaemon (LP: #567392)
  * debian/apparmor/usr.lib.libvirt.virt-aa-helper: update paths for LVM
    volumes and searching /sys/bus/usb/devices/ (LP: #565691)
 -- Jamie Strandboge <email address hidden> Tue, 20 Apr 2010 13:45:12 -0500

Changed in libvirt (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.