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

[mgp-users 01336] Re: Memory leaks revisited...



On Tue, 10 Aug 2004 nishida@csl.sony.co.jp wrote:

Date: Tue, 10 Aug 2004 12:21:28 +0900 (JST)
From: nishida@csl.sony.co.jp
To: jjn@sanger.ac.uk
Cc: mgp-users@mew.org
Subject: Re: [mgp-users 01326] Memory leaks revisited...


From: Jonathan Nicholson <jjn@sanger.ac.uk>
Subject: [mgp-users 01326] Memory leaks revisited...
Date: Mon, 9 Aug 2004 16:33:00 +0100 (BST)
Message-ID: <>

> I see from September last year that there was some discussion of memory
> leaks in magicpoint.
>
> Did anyone get anywhere with tracking this down?
>
> I'm going to be using magicpoint to run a display in our reception which
> wants to be constantly online. I've added a '-r' option (repeating demo)
> which cycles endlessly through the provided slides, the memory leak could
> get quite serious (I estimate about 70Mb/day)!
>
> Running with valgrind seems to indicate the majority of the problem is
> with the font handling (xft in this case), unfortunately my C programming
> ability gives up at this point!

Hmm.. when you use -x xft option to tell mgp not to use xft, you still have
the memory leak?

Yes it appears so.

FYI here's the output from valgrind:-

==26260== Memcheck, a memory error detector for x86-linux.
==26260== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==26260== Using valgrind-2.1.2, a program supervision framework for x86-linux.
==26260== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==26260== For more details, rerun with: -v
==26260== ==26260== Syscall param writev(vector[...]) contains uninitialised or unaddressable byte(s)
==26260==    at 0x1BD196DE: (within /lib/libc-2.3.2.so)
==26260==    by 0x1BA5AE8F: (within /usr/X11R6/lib/libX11.so.6.2)
==26260==    by 0x1BA5BA5E: _X11TransWritev (in /usr/X11R6/lib/libX11.so.6.2)
==26260==    by 0x1BA3C176: _XSend (in /usr/X11R6/lib/libX11.so.6.2)
==26260==  Address 0x1BE243E6 is 6 bytes inside a block of size 6144 alloc'd
==26260==    at 0x1B904EDD: malloc (vg_replace_malloc.c:131)
==26260==    by 0x1BA3E734: _XAllocScratch (in /usr/X11R6/lib/libX11.so.6.2)
==26260==    by 0x1BA317A1: (within /usr/X11R6/lib/libX11.so.6.2)
==26260==    by 0x1BA31DBA: XPutImage (in /usr/X11R6/lib/libX11.so.6.2)
==26260== ==26260== Conditional jump or move depends on uninitialised value(s)
==26260==    at 0x805B22E: ctlcmp (in /home/jono/Reception_Display/mgp)
==26260==    by 0x80570F1: set_background_pixmap (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804FBAC: process_direc (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804F260: draw_page (in /home/jono/Reception_Display/mgp)
==26260== ==26260== Use of uninitialised value of size 4
==26260==    at 0x805B22E: ctlcmp (in /home/jono/Reception_Display/mgp)
==26260==    by 0x80570F1: set_background_pixmap (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804FBAC: process_direc (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804F260: draw_page (in /home/jono/Reception_Display/mgp)
==26260== ==26260== Conditional jump or move depends on uninitialised value(s)
==26260==    at 0x805B23D: ctlcmp (in /home/jono/Reception_Display/mgp)
==26260==    by 0x80570F1: set_background_pixmap (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804FBAC: process_direc (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804F260: draw_page (in /home/jono/Reception_Display/mgp)
==26260== ==26260== Conditional jump or move depends on uninitialised value(s)
==26260==    at 0x8050B9A: draw_fragment (in /home/jono/Reception_Display/mgp)
==26260==    by 0x805055C: draw_string (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804F260: draw_page (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804CBD5: main (mgp.c:443)
==26260== ==26260== Conditional jump or move depends on uninitialised value(s)
==26260==    at 0x8050B9A: draw_fragment (in /home/jono/Reception_Display/mgp)
==26260==    by 0x8050489: draw_string (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804F260: draw_page (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804CBD5: main (mgp.c:443)
==26260== ==26260== Conditional jump or move depends on uninitialised value(s)
==26260==    at 0x805B22E: ctlcmp (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804FB89: process_direc (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804F260: draw_page (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804CBD5: main (mgp.c:443)
==26260== ==26260== Use of uninitialised value of size 4
==26260==    at 0x805B22E: ctlcmp (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804FB89: process_direc (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804F260: draw_page (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804CBD5: main (mgp.c:443)
==26260== ==26260== Conditional jump or move depends on uninitialised value(s)
==26260==    at 0x805B23D: ctlcmp (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804FB89: process_direc (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804F260: draw_page (in /home/jono/Reception_Display/mgp)
==26260==    by 0x804CBD5: main (mgp.c:443)
==26260== ==26260== ERROR SUMMARY: 238 errors from 9 contexts (suppressed: 63 from 1)
==26260== malloc/free: in use at exit: 697311 bytes in 858 blocks.
==26260== malloc/free: 1344 allocs, 486 frees, 1795118 bytes allocated.
==26260== For counts of detected errors, rerun with: -v
==26260== searching for pointers to 858 not-freed blocks.
==26260== checked 7682920 bytes.
==26260== ==26260== ==26260== 16 bytes in 1 blocks are definitely lost in loss record 26 of 103
==26260==    at 0x1B904EDD: malloc (vg_replace_malloc.c:131)
==26260==    by 0x1BA3ED72: (within /usr/X11R6/lib/libX11.so.6.2)
==26260==    by 0x1BA40C0B: XrmGetStringDatabase (in /usr/X11R6/lib/libX11.so.6.2)
==26260==    by 0x1BA247B7: (within /usr/X11R6/lib/libX11.so.6.2)
==26260== ==26260== ==26260== 36 bytes in 1 blocks are definitely lost in loss record 38 of 103
==26260==    at 0x1B904EDD: malloc (vg_replace_malloc.c:131)
==26260==    by 0x1BD30538: (within /lib/libc-2.3.2.so)
==26260==    by 0x1BD2FDA8: __nss_database_lookup (in /lib/libc-2.3.2.so)
==26260==    by 0x1BEDC36B: ???
==26260== ==26260== ==26260== 64 bytes in 4 blocks are definitely lost in loss record 46 of 103
==26260==    at 0x1B904EDD: malloc (vg_replace_malloc.c:131)
==26260==    by 0x805D01A: name2gcolor (in /home/jono/Reception_Display/mgp)
==26260==    by 0x805FC1F: gen_bgrad (in /home/jono/Reception_Display/mgp)
==26260==    by 0x8061072: yyparse (in /home/jono/Reception_Display/mgp)
==26260== ==26260== ==26260== 80 bytes in 4 blocks are possibly lost in loss record 51 of 103
==26260==    at 0x1B904EDD: malloc (vg_replace_malloc.c:131)
==26260==    by 0x1BCBE96F: strdup (in /lib/libc-2.3.2.so)
==26260==    by 0x805E7E2: yylex (in /home/jono/Reception_Display/mgp)
==26260==    by 0x8061E22: yyparse (in /home/jono/Reception_Display/mgp)
==26260== ==26260== ==26260== 96 bytes in 2 blocks are possibly lost in loss record 58 of 103
==26260==    at 0x1B904EDD: malloc (vg_replace_malloc.c:131)
==26260==    by 0x1B939545: XcursorCursorsCreate (in /usr/lib/libXcursor.so.1.0.2)
==26260==    by 0x1B93A827: XcursorImagesLoadCursors (in /usr/lib/libXcursor.so.1.0.2)
==26260==    by 0x1B93A8E4: XcursorImagesLoadCursor (in /usr/lib/libXcursor.so.1.0.2)
==26260== ==26260== ==26260== 269 bytes in 32 blocks are definitely lost in loss record 74 of 103
==26260==    at 0x1B904EDD: malloc (vg_replace_malloc.c:131)
==26260==    by 0x1BCBE96F: strdup (in /lib/libc-2.3.2.so)
==26260==    by 0x805E7E2: yylex (in /home/jono/Reception_Display/mgp)
==26260==    by 0x8061E22: yyparse (in /home/jono/Reception_Display/mgp)
==26260== ==26260== ==26260== 968 bytes in 22 blocks are definitely lost in loss record 83 of 103
==26260==    at 0x1B904EDD: malloc (vg_replace_malloc.c:131)
==26260==    by 0x805AEA4: ctlalloc1 (in /home/jono/Reception_Display/mgp)
==26260==    by 0x805F9A0: gen_void (in /home/jono/Reception_Display/mgp)
==26260==    by 0x8060ED9: yyparse (in /home/jono/Reception_Display/mgp)
==26260== ==26260== ==26260== 1984 bytes in 2 blocks are definitely lost in loss record 90 of 103
==26260==    at 0x1B904EDD: malloc (vg_replace_malloc.c:131)
==26260==    by 0x1BB7F25B: Imlib_init (in /usr/lib/libImlib.so.11.0.0)
==26260==    by 0x807EF9D: imLoad (in /home/jono/Reception_Display/mgp)
==26260==    by 0x8075B52: loadImage (in /home/jono/Reception_Display/mgp)
==26260== ==26260== LEAK SUMMARY:
==26260==    definitely lost: 3337 bytes in 62 blocks.
==26260==    possibly lost:   176 bytes in 6 blocks.
==26260==    still reachable: 693798 bytes in 790 blocks.
==26260==         suppressed: 0 bytes in 0 blocks.
==26260== Reachable blocks (those to which a pointer was found) are not shown.
==26260== To see them, rerun with: --show-reachable=yes


!---------------------------------------------------------------------------
= Jonathan Nicholson - Team Leader : System Support "Special Projects"       =
= The Sanger Centre, Wellcome Trust Genome Campus, Hinxton, Cambs, CB10 1SA  =
= Email: jjn@sanger.ac.uk -=- Tel: 01223 834244 x4987  -=- Fax: 01223 494919 =
 ----------------------------------------------------------------------------