memory leak?

Discussion in 'Python' started by Gabriel Rossetti, Dec 9, 2008.

  1. I have been debugging a distributed application for about 2 days that
    has a memory leak. My app is a Twisted app, so I thought that maybe it
    was on the twisted side, I finally isolated it to no being a Twisted
    problem but a Python problem. The problem comes from the code that uses
    wxPython and pySerial, these each run in a different process. I wrote
    test programs, one "pure" wxPython, one "pure" pySerial and let them
    run. The number of objects in the wxPython code doubles in about an
    hour, the pySerial code doubles about every 10 minutes. I think there is
    something wrong with the GC/memory management or C lib. The wxPython lib
    is big, so it may have bugs, but pySerial is small and pure python (no
    C/C++ directly, event thought it uses os.open/close & termios that
    themselves use C (unless I mistaking)) and I reviewed it's code and I
    see nothing that could cause this.

    I ran these tests on linux 2.6 (ubuntu 8.04) using python 2.5.2. I used
    the "ps" command to see the memory usage and also a recipe that I found
    that counts the number of objects. I attached the pyserial, wxPython
    code & the recipe. To test them just run each example and run "ps waux |
    grep python" once in a while, or send the process a SIGUSR1 and it will
    print in the terminal the object count. The wxCode has a refresh
    problem, if you use the SIGUSR1/object count method you have to right
    click on the taskbar icon to have it show up in the terminal.

    I hope I wrong and the problem is elsewhere though.

    Thank you very much,
    Gabriel
     
    Gabriel Rossetti, Dec 9, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Y3liZXJzdHJpa2U=?=

    datagrid memory leak?

    =?Utf-8?B?Y3liZXJzdHJpa2U=?=, Jan 3, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    466
    =?Utf-8?B?Y3liZXJzdHJpa2U=?=
    Jan 3, 2005
  2. s.subbarayan

    Dynamic memory allocation and memory leak...

    s.subbarayan, Mar 18, 2005, in forum: C Programming
    Replies:
    10
    Views:
    707
    Eric Sosman
    Mar 22, 2005
  3. Richard Heathfield

    Leak or no leak ??

    Richard Heathfield, Jul 10, 2006, in forum: C Programming
    Replies:
    4
    Views:
    356
    Richard Heathfield
    Jul 10, 2006
  4. cham
    Replies:
    5
    Views:
    772
  5. Mark Probert
    Replies:
    4
    Views:
    332
    Mark Probert
    Feb 9, 2005
Loading...

Share This Page