[Bug 385187] Re: spumux massive memory leak

whitis whitis at freelabs.com
Wed Jun 10 00:37:56 UTC 2009


Found one of the spumux control files:

<?xml version="1.0" encoding="utf-8"?>
<subpictures>
  <stream>
    <textsub movie-height="0" filename="/bigstuff/huntforgollum/subtitles_en.srt" movie-width="0"/>
  </stream>
</subpictures>

Checking with valgrind shows that 99.9% of the memory allocated is not freed.
time valgrind --tool=memcheck --leak-check=full --show-reachable=yes /tmp/src/dvdauthor-0.6.14/src/spumux /tmp/dvd/title4-0-0.vob_spumux.xml <huntforgollum_720p.mpg >/dev/null
==8485== Memcheck, a memory error detector.
==8485== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al.
==8485== Using LibVEX rev 1884, a library for dynamic binary translation.
==8485== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
==8485== Using valgrind-3.4.1-Debian, a dynamic binary instrumentation framework.
==8485== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
==8485== For more details, rerun with: -v
==8485== 
DVDAuthor::spumux, version 0.6.14.
Build options: gnugetopt iconv freetype
Send bugs to <dvdauthor-users at lists.sourceforge.net>

INFO: Locale=en_US.UTF-8
INFO: Converting filenames to UTF-8
INFO: Detected subtitle file format: subviewer
INFO: Opened iconv descriptor. *UTF-8* *ISO8859-1*
INFO: Read 215 subtitles
INFO: Adjusted 11 subtitle(s).
INFO: Unicode font: 1185 glyphs.
WARN: Subtitle word 'At the end of the third age Middle-Earth was a land oppressed by shadow.' too long!
^C^C^C==8485== 
==8485== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 14 from 2)
==8485== malloc/free: in use at exit: 78,970,024 bytes in 2,455,451 blocks.
==8485== malloc/free: 2,457,413 allocs, 1,962 frees, 79,536,894 bytes allocated.
==8485== For counts of detected errors, rerun with: -v
==8485== searching for pointers to 2,455,451 not-freed blocks.
==8485== checked 74,011,400 bytes.
==8485== 
==8485== 0 bytes in 1 blocks are still reachable in loss record 1 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x40A3B8: vo_update_osd (subrender.c:299)
==8485==    by 0x407C0B: read_pic (subgen-image.c:314)
==8485==    by 0x4086BD: process_subtitle (subgen-image.c:896)
==8485==    by 0x402E1D: getnextsub (subgen.c:352)
==8485==    by 0x404424: main (subgen.c:820)
==8485== 
==8485== 
==8485== 0 bytes in 13 blocks are still reachable in loss record 2 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x40A2A7: vo_update_osd (subrender.c:256)
==8485==    by 0x407C0B: read_pic (subgen-image.c:314)
==8485==    by 0x4086BD: process_subtitle (subgen-image.c:896)
==8485==    by 0x402E1D: getnextsub (subgen.c:352)
==8485==    by 0x404424: main (subgen.c:820)
==8485== 
==8485== 
==8485== 0 bytes in 1 blocks are still reachable in loss record 3 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x409C5C: textsub_init (textsub.c:148)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 31 bytes in 1 blocks are still reachable in loss record 4 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x412D14: read_font_desc_ft (subfont.c:124)
==8485==    by 0x4136A4: load_font_ft (subfont.c:1133)
==8485==    by 0x409E2A: vo_update_osd (subrender.c:608)
==8485==    by 0x409CA0: textsub_init (textsub.c:156)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 32 bytes in 1 blocks are still reachable in loss record 5 of 40
==8485==    at 0x4C25684: calloc (vg_replace_malloc.c:397)
==8485==    by 0x40A417: vo_update_osd (subrender.c:309)
==8485==    by 0x407C0B: read_pic (subgen-image.c:314)
==8485==    by 0x4086BD: process_subtitle (subgen-image.c:896)
==8485==    by 0x402E1D: getnextsub (subgen.c:352)
==8485==    by 0x404424: main (subgen.c:820)
==8485== 
==8485== 
==8485== 32 bytes in 1 blocks are still reachable in loss record 6 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x40E229: sub_read_file (subreader.c:1555)
==8485==    by 0x409C8F: textsub_init (textsub.c:155)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 32 bytes in 1 blocks are still reachable in loss record 7 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x585888D: FT_New_Memory (in /usr/lib/libfreetype.so.6.3.20)
==8485==    by 0x5858B9F: FT_Init_FreeType (in /usr/lib/libfreetype.so.6.3.20)
==8485==    by 0x4116CD: init_freetype (subfont.c:1097)
==8485==    by 0x409C0A: textsub_init (textsub.c:137)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 40 bytes in 1 blocks are still reachable in loss record 8 of 40
==8485==    at 0x4C25684: calloc (vg_replace_malloc.c:397)
==8485==    by 0x40A374: vo_update_osd (subrender.c:286)
==8485==    by 0x407C0B: read_pic (subgen-image.c:314)
==8485==    by 0x4086BD: process_subtitle (subgen-image.c:896)
==8485==    by 0x402E1D: getnextsub (subgen.c:352)
==8485==    by 0x404424: main (subgen.c:820)
==8485== 
==8485== 
==8485== 41 bytes in 1 blocks are still reachable in loss record 9 of 40
==8485==    at 0x4C279E1: realloc (vg_replace_malloc.c:429)
==8485==    by 0x4059D2: utf8tolocal (readxml.c:257)
==8485==    by 0x405568: textsub_filename (subgen-parse-xml.c:199)
==8485==    by 0x405F18: readxml (readxml.c:106)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 56 bytes in 1 blocks are still reachable in loss record 10 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x412FE7: read_font_desc_ft (subfont.c:651)
==8485==    by 0x4136A4: load_font_ft (subfont.c:1133)
==8485==    by 0x409E2A: vo_update_osd (subrender.c:608)
==8485==    by 0x409CA0: textsub_init (textsub.c:156)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 56 bytes in 1 blocks are still reachable in loss record 11 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x412F99: read_font_desc_ft (subfont.c:649)
==8485==    by 0x4136A4: load_font_ft (subfont.c:1133)
==8485==    by 0x409E2A: vo_update_osd (subrender.c:608)
==8485==    by 0x409CA0: textsub_init (textsub.c:156)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 62 bytes in 8 blocks are still reachable in loss record 12 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x4EDBA7F: xmlStrndup (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4E5E5A4: xmlNewCharEncodingHandler (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4E5DDE7: xmlInitCharEncodingHandlers (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4E5E3C4: xmlGetCharEncodingHandler (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4E8BC6A: xmlAllocParserInputBuffer (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4E8BD29: xmlParserInputBufferCreateIO (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4F1B136: xmlReaderForIO (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x405C3E: readxml (readxml.c:60)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 104 bytes in 1 blocks are still reachable in loss record 13 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x4ED7DFA: xmlNewRMutex (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4F325F6: xmlDictCreate (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4E61E4F: xmlInitParserCtxt (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4E620AB: xmlNewParserCtxt (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4E66505: xmlCreatePushParserCtxt (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4F1AF04: xmlNewTextReader (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4F1B149: xmlReaderForIO (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x405C3E: readxml (readxml.c:60)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 128 bytes in 1 blocks are still reachable in loss record 14 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x5AF2110: (within /lib/libc-2.9.so)
==8485==    by 0x5AF1BBF: iconv_open (in /lib/libc-2.9.so)
==8485==    by 0x405A6A: utf8tolocal (readxml.c:232)
==8485==    by 0x405568: textsub_filename (subgen-parse-xml.c:199)
==8485==    by 0x405F18: readxml (readxml.c:106)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 160 bytes in 1 blocks are definitely lost in loss record 15 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x40DE3A: sub_read_file (subreader.c:1254)
==8485==    by 0x409C8F: textsub_init (textsub.c:155)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 196 bytes in 1 blocks are still reachable in loss record 16 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x412034: generate_tables (subfont.c:710)
==8485==    by 0x412DB5: read_font_desc_ft (subfont.c:1066)
==8485==    by 0x4136A4: load_font_ft (subfont.c:1133)
==8485==    by 0x409E2A: vo_update_osd (subrender.c:608)
==8485==    by 0x409CA0: textsub_init (textsub.c:156)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 208 bytes in 1 blocks are still reachable in loss record 17 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x5AFBAFE: (within /lib/libc-2.9.so)
==8485==    by 0x5AF3955: (within /lib/libc-2.9.so)
==8485==    by 0x5AF20A4: (within /lib/libc-2.9.so)
==8485==    by 0x5AF1BBF: iconv_open (in /lib/libc-2.9.so)
==8485==    by 0x405A6A: utf8tolocal (readxml.c:232)
==8485==    by 0x405568: textsub_filename (subgen-parse-xml.c:199)
==8485==    by 0x405F18: readxml (readxml.c:106)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 288 bytes in 1 blocks are still reachable in loss record 18 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x409FF7: vo_update_osd (subrender.c:212)
==8485==    by 0x407C0B: read_pic (subgen-image.c:314)
==8485==    by 0x4086BD: process_subtitle (subgen-image.c:896)
==8485==    by 0x402E1D: getnextsub (subgen.c:352)
==8485==    by 0x404424: main (subgen.c:820)
==8485== 
==8485== 
==8485== 320 bytes in 8 blocks are still reachable in loss record 19 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x4E5E5BE: xmlNewCharEncodingHandler (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4E5DDE7: xmlInitCharEncodingHandlers (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4E5E3C4: xmlGetCharEncodingHandler (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4E8BC6A: xmlAllocParserInputBuffer (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4E8BD29: xmlParserInputBufferCreateIO (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4F1B136: xmlReaderForIO (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x405C3E: readxml (readxml.c:60)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 400 bytes in 1 blocks are still reachable in loss record 20 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x4E5DD2F: xmlInitCharEncodingHandlers (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4E5E3C4: xmlGetCharEncodingHandler (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4E8BC6A: xmlAllocParserInputBuffer (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4E8BD29: xmlParserInputBufferCreateIO (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x4F1B136: xmlReaderForIO (in /usr/lib/libxml2.so.2.6.32)
==8485==    by 0x405C3E: readxml (readxml.c:60)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 520 bytes in 13 blocks are still reachable in loss record 21 of 40
==8485==    at 0x4C25684: calloc (vg_replace_malloc.c:397)
==8485==    by 0x40A253: vo_update_osd (subrender.c:242)
==8485==    by 0x407C0B: read_pic (subgen-image.c:314)
==8485==    by 0x4086BD: process_subtitle (subgen-image.c:896)
==8485==    by 0x402E1D: getnextsub (subgen.c:352)
==8485==    by 0x404424: main (subgen.c:820)
==8485== 
==8485== 
==8485== 768 bytes in 1 blocks are still reachable in loss record 22 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x41308F: read_font_desc_ft (subfont.c:663)
==8485==    by 0x4136A4: load_font_ft (subfont.c:1133)
==8485==    by 0x409E2A: vo_update_osd (subrender.c:608)
==8485==    by 0x409CA0: textsub_init (textsub.c:156)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 768 bytes in 1 blocks are still reachable in loss record 23 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x413026: read_font_desc_ft (subfont.c:659)
==8485==    by 0x4136A4: load_font_ft (subfont.c:1133)
==8485==    by 0x409E2A: vo_update_osd (subrender.c:608)
==8485==    by 0x409CA0: textsub_init (textsub.c:156)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 1,720 bytes in 1 blocks are still reachable in loss record 24 of 40
==8485==    at 0x4C279E1: realloc (vg_replace_malloc.c:429)
==8485==    by 0x405157: textsub_complete (subgen-parse-xml.c:280)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 2,048 bytes in 1 blocks are still reachable in loss record 25 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x4043FB: main (subgen.c:815)
==8485== 
==8485== 
==8485== 3,160 bytes in 4 blocks are still reachable in loss record 26 of 40
==8485==    at 0x4C279E1: realloc (vg_replace_malloc.c:429)
==8485==    by 0x585E6F0: ft_mem_qrealloc (in /usr/lib/libfreetype.so.6.3.20)
==8485==    by 0x585EF9A: ft_mem_realloc (in /usr/lib/libfreetype.so.6.3.20)
==8485==    by 0x585F5E1: FT_CMap_New (in /usr/lib/libfreetype.so.6.3.20)
==8485==    by 0x5896835: (within /usr/lib/libfreetype.so.6.3.20)
==8485==    by 0x5896BF8: (within /usr/lib/libfreetype.so.6.3.20)
==8485==    by 0x586EBF6: (within /usr/lib/libfreetype.so.6.3.20)
==8485==    by 0x585EC2F: (within /usr/lib/libfreetype.so.6.3.20)
==8485==    by 0x58613B5: FT_Open_Face (in /usr/lib/libfreetype.so.6.3.20)
==8485==    by 0x586251A: FT_New_Face (in /usr/lib/libfreetype.so.6.3.20)
==8485==    by 0x412D55: read_font_desc_ft (subfont.c:939)
==8485==    by 0x4136A4: load_font_ft (subfont.c:1133)
==8485== 
==8485== 
==8485== 6,304 bytes in 215 blocks are still reachable in loss record 27 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x40D730: subcp_recode (subreader.c:1024)
==8485==    by 0x40E060: sub_read_file (subreader.c:1271)
==8485==    by 0x409C8F: textsub_init (textsub.c:155)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 6,568 bytes in 1 blocks are still reachable in loss record 28 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x40B2FC: new_osd_obj (subrender.c:577)
==8485==    by 0x40B36E: vo_init_osd (subrender.c:649)
==8485==    by 0x409C11: textsub_init (textsub.c:139)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 7,896 bytes in 1 blocks are still reachable in loss record 29 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x412069: generate_tables (subfont.c:714)
==8485==    by 0x412DB5: read_font_desc_ft (subfont.c:1066)
==8485==    by 0x4136A4: load_font_ft (subfont.c:1133)
==8485==    by 0x409E2A: vo_update_osd (subrender.c:608)
==8485==    by 0x409CA0: textsub_init (textsub.c:156)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 12,544 bytes in 1 blocks are still reachable in loss record 30 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x41204C: generate_tables (subfont.c:711)
==8485==    by 0x412DB5: read_font_desc_ft (subfont.c:1066)
==8485==    by 0x4136A4: load_font_ft (subfont.c:1133)
==8485==    by 0x409E2A: vo_update_osd (subrender.c:608)
==8485==    by 0x409CA0: textsub_init (textsub.c:156)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 32,640 bytes in 1 blocks are still reachable in loss record 31 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x5AF22CF: (within /lib/libc-2.9.so)
==8485==    by 0x5AF1BBF: iconv_open (in /lib/libc-2.9.so)
==8485==    by 0x405A6A: utf8tolocal (readxml.c:232)
==8485==    by 0x405568: textsub_filename (subgen-parse-xml.c:199)
==8485==    by 0x405F18: readxml (readxml.c:106)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 35,362 bytes in 61 blocks are still reachable in loss record 32 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x585CBBF: ft_mem_qalloc (in /usr/lib/libfreetype.so.6.3.20)
==8485==    by 0x585E5E2: ft_mem_alloc (in /usr/lib/libfreetype.so.6.3.20)
==8485==    by 0x585E93E: FT_New_Library (in /usr/lib/libfreetype.so.6.3.20)
==8485==    by 0x5858BB2: FT_Init_FreeType (in /usr/lib/libfreetype.so.6.3.20)
==8485==    by 0x4116CD: init_freetype (subfont.c:1097)
==8485==    by 0x409C0A: textsub_init (textsub.c:137)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 35,840 bytes in 1 blocks are still reachable in loss record 33 of 40
==8485==    at 0x4C279E1: realloc (vg_replace_malloc.c:429)
==8485==    by 0x40DF50: sub_read_file (subreader.c:1262)
==8485==    by 0x409C8F: textsub_init (textsub.c:155)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 54,244 bytes in 1 blocks are still reachable in loss record 34 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x404161: main (subgen.c:710)
==8485== 
==8485== 
==8485== 65,536 bytes in 1 blocks are still reachable in loss record 35 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x40417B: main (subgen.c:719)
==8485== 
==8485== 
==8485== 259,072 bytes in 2 blocks are still reachable in loss record 36 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x4C27A37: realloc (vg_replace_malloc.c:429)
==8485==    by 0x412979: render_one_glyph (subfont.c:584)
==8485==    by 0x412DED: read_font_desc_ft (subfont.c:1081)
==8485==    by 0x4136A4: load_font_ft (subfont.c:1133)
==8485==    by 0x409E2A: vo_update_osd (subrender.c:608)
==8485==    by 0x409CA0: textsub_init (textsub.c:156)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 725,840 bytes in 215 blocks are still reachable in loss record 37 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x405072: textsub_complete (subgen-parse-xml.c:263)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 786,936 bytes in 1 blocks are still reachable in loss record 38 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x412ACC: read_font_desc_ft (subfont.c:866)
==8485==    by 0x4136A4: load_font_ft (subfont.c:1133)
==8485==    by 0x409E2A: vo_update_osd (subrender.c:608)
==8485==    by 0x409CA0: textsub_init (textsub.c:156)
==8485==    by 0x404FF4: textsub_complete (subgen-parse-xml.c:251)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 4,878,552 bytes in 203,273 blocks are definitely lost in loss record 39 of 40
==8485==    at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==8485==    by 0x409AC2: textsub_find_sub (textsub.c:172)
==8485==    by 0x40505E: textsub_complete (subgen-parse-xml.c:260)
==8485==    by 0x406041: readxml (readxml.c:123)
==8485==    by 0x404393: main (subgen.c:806)
==8485== 
==8485== 
==8485== 72,051,520 bytes in 2,251,610 blocks are still reachable in loss record 40 of 40
==8485==    at 0x4C25684: calloc (vg_replace_malloc.c:397)
==8485==    by 0x40A462: vo_update_osd (subrender.c:317)
==8485==    by 0x407C0B: read_pic (subgen-image.c:314)
==8485==    by 0x4086BD: process_subtitle (subgen-image.c:896)
==8485==    by 0x402E1D: getnextsub (subgen.c:352)
==8485==    by 0x404424: main (subgen.c:820)
==8485== 
==8485== LEAK SUMMARY:
==8485==    definitely lost: 4,878,712 bytes in 203,274 blocks.
==8485==      possibly lost: 0 bytes in 0 blocks.
==8485==    still reachable: 74,091,312 bytes in 2,252,177 blocks.
==8485==         suppressed: 0 bytes in 0 blocks.


real	0m54.851s
user	0m21.449s
sys	0m1.628s

 ldd spumux 
	linux-vdso.so.1 =>  (0x00007fffe61fe000)
	libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f90ddc6d000)
	libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00007f90dda46000)
	libz.so.1 => /lib/libz.so.1 (0x00007f90dd82e000)
	libm.so.6 => /lib/libm.so.6 (0x00007f90dd5a9000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f90dd323000)
	libc.so.6 => /lib/libc.so.6 (0x00007f90dcfb1000)
	libdl.so.2 => /lib/libdl.so.2 (0x00007f90dcdad000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f90ddfca000)



Note that the memory is still lost if you use /dev/null as the input stream.   This makes it easier to reproduce and suggests some things.   Like that the program is inappropriately building subtitle overlays for each subtitle when it reads the subtitles rather than when they are needed and that it may be misbehaving at end of file and continuing to produce subtitles.
There are 215 subtitles in the subtitle files.   At 32 bits per pixel (RGBA), these would account for 297MB.

Some other reports of massive memory leaks in spumux:
http://bbs.archlinux.org/viewtopic.php?id=51381
http://1010.co.uk/2007.01.20.html

One suggested that the problem wasn't present on older kernel versions or 32 bit systems.   It is a couple years old.
It also reports causing the system to totally freeze after swap is exhausted.    One suggests using mencoder instead of spumux, but this isn't an option with dvdstyler.

This is a critical bug due to the ability to crash the system.

-- 
spumux massive memory leak
https://bugs.launchpad.net/bugs/385187
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list