[libvirt] Are they reasonable FD leaks?

Peter Krempa pkrempa at redhat.com
Mon Feb 6 12:57:51 UTC 2012

On 02/03/2012 06:25 PM, Daniel P. Berrange wrote:
> On Fri, Feb 03, 2012 at 03:04:41AM -0500, Alex Jia wrote:
>> If you're using libvirt upstream to check it, you need to revoke
>> commit 6152c74, which fixed memory leak issue on cmdUndefine(),
>> it's okay without FD leaks if memory leak is fixed, in other
>> words, you will met FD leaks if you saw the following similar
>> error information:

The memory leak fixed in 6152c74 is a leak of a virStorageVolPtr 
reference/pointer that also caused the FD leak. While referenced, the 
storage driver holds a FD to the image identified with the virStorageVolPtr.

>> error: Failed to disconnect from the hypervisor, 1 leaked reference(s)
> This is a sign of some code failing to unref the virStoragePoolPtr
> or virStorageVolPtr or virConnectPtr object.
>> It seems libvirt deliberately leaks these FDs, right?
> I don't think that is delibrate.

The leak is not deliberate. It's caused by not freeing the reference. (Bug).


> Daniel

More information about the libvir-list mailing list