Description of problem: It seems the screenshot API leaks FDs. Version-Release number of selected component (if applicable): v0.9.6-139-g9bc9999 (current git master) How reproducible: 10/10 Steps to Reproduce: 1. lsof -p `pidof libvirtd` 2. virsh screenshot a-running-vm 3. lsof -p `pidof libvirtd` Actual results: The number of open files grows, and a new pipe fd is leaked. Expected results: The number of open files should remain constant after taking screenshots.
It seems *errfd = pipeerr[0]; in command.c is not closed.
I'll send a patch to libvirt ML.
0.9.7 will include: commit 72851bb9ef0a6aef20141d0a13c36e5a1907a43a Author: Marc-André Lureau <marcandre.lureau> Date: Thu Oct 13 13:47:58 2011 +0200 virFDStream: close also given errfd (fd leak) In virFDStreamOpenFileInternal(), a errfd pipe is opened by virCommandRunAsync() and given to virFDStreamOpenInternal(). It seems virFDStream should close errfd, just like the other fd it is given. This fixes screenshots leaking FDs: http://bugzilla.redhat.com/show_bug.cgi?id=745761