List Info

Thread: Leak in info2




Leak in info2
user name
2007-06-23 13:07:55
I am using svn checkout 865. The following code:

[stephenbutton ~]$ less leak.py
import pysvn

def get_login(realm, username, may_save):
    return True, "user", "", False

REPO = " http://studentrobotics.org/isvn/"

while 1:
    c = pysvn.Client()
   ; c.callback_get_login = get_login
  ;  try:
 ;       c.info2(REPO + "filethatisntthere")
    except pysvn.ClientError:
      ;  pass
 ;   del c


Causes memory to slowly leak. Any idea what could cause this?

Thanks,

Stephen English
Re: Leak in info2
user name
2007-06-23 13:09:54
I should also mention that only creating one instance of pysvn.Client and reusing it also causes the same leak, but that below is closer to what I'm trying to do.

Thanks,

Stephen

On 6/23/07, Stephen English < stevesecomputing.co.uk">stevesecomputing.co.uk>; wrote:
I am using svn checkout 865. The following code:

[stephenbutton ~]$ less leak.py
import pysvn

def get_login(realm, username, may_save):
 &nbsp;  return True, "user", "&quot;, False

REPO = " http://studentrobotics.org/isvn/"

while 1:
 &nbsp;  c = pysvn.Client()
   ; c.callback_get_login = get_login
  ;  try:
 ; &nbsp; &nbsp; &nbsp; c.info2(REPO + "filethatisntthere")
 &nbsp;  except pysvn.ClientError:
&nbsp; &nbsp;   ;  pass
 ; &nbsp; del c


Causes memory to slowly leak. Any idea what could cause this?

Thanks,

Stephen English

Re: Leak in info2
user name
2007-07-01 16:21:39

On Jun 23, 2007, at 19:09, Stephen English wrote:

I should also mention that only creating one instance of pysvn.Client and reusing it also causes the same leak, but that below is closer to what I'm trying to do.

Thanks,

Stephen

On 6/23/07, Stephen English < stevesecomputing.co.uk">stevesecomputing.co.uk>; wrote:
I am using svn checkout 865. The following code:

[stephenbutton ~]$ less leak.py
import pysvn

def get_login(realm, username, may_save):
    return True, "user", "", False

REPO = " http://studentrobotics.org/isvn/"

while 1:
    c = pysvn.Client()
    c.callback_get_login = get_login
    try:
        c.info2(REPO + "filethatisntthere")
    except pysvn.ClientError:
        pass
    del c


Causes memory to slowly leak. Any idea what could cause this?


I see the size of the python process increase when your script is run.

I'll work on the problem.

Barry



Re: Leak in info2
user name
2007-07-09 16:47:10

On Jul 1, 2007, at 22:21, Barry Scott wrote:


On Jun 23, 2007, at 19:09, Stephen English wrote:

I should also mention that only creating one instance of pysvn.Client and reusing it also causes the same leak, but that below is closer to what I'm trying to do.

Thanks,

Stephen

On 6/23/07, Stephen English < stevesecomputing.co.uk">stevesecomputing.co.uk>; wrote:
I am using svn checkout 865. The following code:

[stephenbutton ~]$ less leak.py
import pysvn

def get_login(realm, username, may_save):
    return True, "user", "", False

REPO = " http://studentrobotics.org/isvn/"

while 1:
    c = pysvn.Client()
    c.callback_get_login = get_login
    try:
        c.info2(REPO + "filethatisntthere")
    except pysvn.ClientError:
        pass
    del c


Causes memory to slowly leak. Any idea what could cause this?


I see the size of the python process increase when your script is run.

I'll work on the problem.

Barry


I've committed a fix for the memory leak. r872.
I was not freeing the memory of error objects.

Barry

Re: Leak in info2
user name
2007-08-19 14:29:51
Barry,
I just installed 1.5.2 and I'm getting a leak with the same code. Is this supposed to me fixed in the release?

Cheers,

Steve

On 7/9/07, Barry Scott < barrybarrys-emacs.org">barrybarrys-emacs.org> wrote:

On Jul 1, 2007, at 22:21, Barry Scott wrote:


On Jun 23, 2007, at 19:09, Stephen English wrote:

I should also mention that only creating one instance of pysvn.Client and reusing it also causes the same leak, but that below is closer to what I'm trying to do.

Thanks,

Stephen

On 6/23/07, Stephen English < stevesecomputing.co.uk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">stevesecomputing.co.uk &gt; wrote:
I am using svn checkout 865. The following code:

[stephenbutton ~]$ less leak.py
import pysvn

def get_login(realm, username, may_save):
 &nbsp;  return True, "user", "&quot;, False

REPO = " http://studentrobotics.org/isvn/"

while 1:
 &nbsp;  c = pysvn.Client()
   ; c.callback_get_login = get_login
  ;  try:
 ; &nbsp; &nbsp; &nbsp; c.info2(REPO + "filethatisntthere")
 &nbsp;  except pysvn.ClientError :
  ; &nbsp; &nbsp;  pass
 ; &nbsp; del c


Causes memory to slowly leak. Any idea what could cause this?


I see the size of the python process increase when your script is run.

I'll work on the problem.

Barry


I';ve committed a fix for the memory leak. r872.
I was not freeing the memory of error objects.

Barry


Re: Leak in info2
user name
2007-08-20 03:06:58
On Aug 19, 2007, at 20:29, Stephen English wrote:

> Barry,
> I just installed 1.5.2 and I'm getting a leak with the
same code.  
> Is this supposed to me fixed in the release?
>

Well I fixed the leak that was reported the first time with
errors  
not being released.
And your test did not leak for me.

Can you double check that you really have 1.5.2 and this
problem is  
still present.

If you are building for source check that you have this
patch which  
is the fix and in 1.5.2:

Index: pysvn_svnenv.cpp
============================================================
=======
--- pysvn_svnenv.cpp	(revision 868)
+++ pysvn_svnenv.cpp	(revision 872)
 -60,6
+60,8 
      arg_list[1] = error_list;
      m_exception_arg = arg_list;
+
+    svn_error_clear( error );
}
SvnException::SvnException( const SvnException &other )

Barry

------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribepysvn.tigris.org
For additional commands, e-mail: users-helppysvn.tigris.org


[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )