All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix memory leak in xend
@ 2008-07-10 22:28 Jim Fehlig
  2008-08-28 21:52 ` Stefan de Konink
  0 siblings, 1 reply; 9+ messages in thread
From: Jim Fehlig @ 2008-07-10 22:28 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 252 bytes --]

We observed OOM kills of xend after ~20 days in openSUSE build service
workers.  xend reached around 2.5 G virt, 1.5G res, and 1.8G shared
memory usage. Attached patch provides a plug.

Cheers,
Jim


    Signed-off-by: Jim Fehlig <jfehlig@novell.com>


[-- Attachment #2: xend-memleak.patch --]
[-- Type: text/x-patch, Size: 433 bytes --]

diff -r bd97e45e073a tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py	Tue Jul 08 09:28:50 2008 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py	Thu Jul 10 15:16:57 2008 -0600
@@ -2607,6 +2607,7 @@ class XendDomainInfo:
     def _cleanupVm(self):
         """Cleanup VM resources.  Idempotent.  Nothrow guarantee."""
 
+        self.metrics.destroy()
         self._unwatchVm()
 
         try:

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH] Fix memory leak in xend
@ 2007-09-13  4:55 Kouya Shimura
  0 siblings, 0 replies; 9+ messages in thread
From: Kouya Shimura @ 2007-09-13  4:55 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 79 bytes --]

Fix memory leak in xend.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>


[-- Attachment #2: leak.patch --]
[-- Type: text/plain, Size: 355 bytes --]

diff -r a00cc97b392a tools/python/xen/lowlevel/xs/xs.c
--- a/tools/python/xen/lowlevel/xs/xs.c	Wed Sep 12 09:43:33 2007 +0100
+++ b/tools/python/xen/lowlevel/xs/xs.c	Thu Sep 13 13:43:04 2007 +0900
@@ -365,6 +365,7 @@ static PyObject *xspy_set_permissions(Xs
         goto exit;
     }
 
+    free(xsperms);
     Py_INCREF(Py_None);
     return Py_None;
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH] Fix 'memory leak' in xend
@ 2007-09-10 20:52 Jim Fehlig
  0 siblings, 0 replies; 9+ messages in thread
From: Jim Fehlig @ 2007-09-10 20:52 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

I found that xend's memory usage grows considerably when running a
script such as

while true; do xm new foo ; sleep 2s; xm delete foo ; sleep 2s; done

XendAPIStore maintains a list of class instances and in the case of
new/create operation, an associated VMMetrics object is stashed in the
list but never removed on delete/shutdown.  This patch removes the
instance by invoking XendBase.destroy() method.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>


[-- Attachment #2: xend_mem_leak.diff --]
[-- Type: text/x-patch, Size: 546 bytes --]

diff -r 9071521d4864 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py	Fri Sep 07 11:39:10 2007 +0100
+++ b/tools/python/xen/xend/XendDomain.py	Mon Sep 10 11:35:59 2007 -0600
@@ -1088,6 +1088,7 @@ class XendDomain:
         log.info("Domain %s (%s) deleted." %
                  (dominfo.getName(), dominfo.info.get('uuid')))
                 
+        dominfo.metrics.destroy()
         self._managed_domain_unregister(dominfo)
         self._remove_domain(dominfo)
         XendDevices.destroy_device_state(dominfo)

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-08-29  5:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-10 22:28 [PATCH] Fix memory leak in xend Jim Fehlig
2008-08-28 21:52 ` Stefan de Konink
2008-08-29  1:14   ` Zhigang Wang
2008-08-29  1:42     ` Stefan de Konink
2008-08-29  1:54       ` Zhigang Wang
2008-08-29  1:58         ` Stefan de Konink
2008-08-29  5:28   ` Jim Fehlig
  -- strict thread matches above, loose matches on Subject: below --
2007-09-13  4:55 Kouya Shimura
2007-09-10 20:52 [PATCH] Fix 'memory leak' " Jim Fehlig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.