Re: [PATCH] qemud: fix memory leak in io error events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 01, 2010 at 09:29:31AM -0600, Anthony Liguori wrote:
> The extra data isn't being free()'d for IO error events that have a reason.
> 
> Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>
> ---
> I wasn't able to test this because the build is broken for me.  I won't be able
> to test it in the field for a couple days.
> 
> The problem we're seeing is a rather fast memory leak that exhausts all system
> memory.  I believe the source of the leak is that our underlying storage is
> throwing an I/O error and libvirt is not properly freeing the resulting IO
> error event object.
> 
> Because the storage is constantly generating errors and the guest is constantly
> reading, memory is just consumed until the system is exhausted.
> 
> diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c
> index e88aafe..5f086bd 100644
> --- a/src/conf/domain_event.c
> +++ b/src/conf/domain_event.c
> @@ -472,6 +472,7 @@ void virDomainEventFree(virDomainEventPtr event)
>          return;
>  
>      switch (event->eventID) {
> +    case VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON:
>      case VIR_DOMAIN_EVENT_ID_IO_ERROR:
>          VIR_FREE(event->data.ioError.srcPath);
>          VIR_FREE(event->data.ioError.devAlias);

ACK

Daniel

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]