[cairo-bugs] [Bug 16481] Memory Leak When Converting Large SVG Files to PNG/PDF
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Oct 16 17:39:22 PDT 2008
http://bugs.freedesktop.org/show_bug.cgi?id=16481
--- Comment #6 from Amit <amit.uttam at gmail.com> 2008-10-16 17:39:15 PST ---
(In reply to comment #5)
> Yikes! I didn't realise inkscape segfaults under valgrind. The traces you've
> attached show a very early crash in inkscape before it even started to read the
> SVG. Can you try a stand-alone converter like librsvg (rsvg-convert input.svg
> -o output.png) and see if the memory leak occurs there as well. (As
> rsvg-convert is a short-lived process you'll need to run it under valgrind
> again with --leak-check=full, but only the "definitely lost" blocks will be
> relevant.)
>
Ok I ran the following:
valgrind --leak-check=full rsvg-convert p1a.svg -f pdf -o p1a.pdf
It ran for about 2 mins or longer...it did not stop. I had htop running to
monitor how much it was eating and it was eating all of ram and about
500MB/1024MB of swap before I had to manually kill it. Valgrind output is:
==7602== Memcheck, a memory error detector.
==7602== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==7602== Using LibVEX rev 1854, a library for dynamic binary translation.
==7602== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==7602== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation
framework.
==7602== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==7602== For more details, rerun with: -v
==7602==
==7602== Warning: set address range perms: large range 252338944 (undefined)
==7602== Warning: set address range perms: large range 252338944 (undefined)
==7602== Warning: set address range perms: large range 252338944 (defined)
==7602== Warning: set address range perms: large range 252338976 (noaccess)
==7602== Warning: set address range perms: large range 189254208 (undefined)
^C==7602==
==7602== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 124 from 2)
==7602== malloc/free: in use at exit: 697,723,462 bytes in 48,206 blocks.
==7602== malloc/free: 353,349 allocs, 305,143 frees, 1,073,694,841 bytes
allocated.
==7602== For counts of detected errors, rerun with: -v
==7602== searching for pointers to 48,206 not-freed blocks.
Killed.
However, using inkscape the conversion takes less than 20 secs (although still
eats meamory).
Then I ran,
valgrind --leak-check=full rsvg-convert p1a.svg -f png -o p1a.png
And I get similar outputs as above:
==9558== Memcheck, a memory error detector.
==9558== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==9558== Using LibVEX rev 1854, a library for dynamic binary translation.
==9558== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==9558== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation
framework.
==9558== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==9558== For more details, rerun with: -v
==9558==
==9558== Warning: set address range perms: large range 252338944 (undefined)
Killed
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the cairo-bugs
mailing list