Bug 70257 - PDF file makes pdftoppm leak memory until it crashes or the OS kills it
Summary: PDF file makes pdftoppm leak memory until it crashes or the OS kills it
Status: RESOLVED INVALID
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-07 22:15 UTC by Mel
Modified: 2013-10-09 23:15 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
pdf file that gobbles up RAM (52.67 KB, text/plain)
2013-10-07 22:15 UTC, Mel
Details

Description Mel 2013-10-07 22:15:29 UTC
Created attachment 87259 [details]
pdf file that gobbles up RAM

Hello,

I came across poppler and specifically, pdftoppm through its use in Calibre. Calibre uses pdftoppm to render cover pages of imported PDF files.

I've noticed that sometimes pdftoppm crashes and brings the whole system to a halt when it cannot render some PDF files. It just gobbles up gigs of RAM until it crashes or the OS kills it. Kovid, of Calibre, has told me that the component at fault is pdftoppm and after looking at top stats, I can confirm it.

The PDF file opens fine in all PDF viewers I've tried.

Thanks for looking into this and hope this gets fixed so it can go into Calibre.

Thanks again.

Melanie
Comment 1 Albert Astals Cid 2013-10-07 22:24:21 UTC
Works fine here, which poppler version are you using? Which commands do you pass to pdftoppm?
Comment 2 Mel 2013-10-09 01:19:41 UTC
Hi,

The version is:

$ /Applications/calibre.app/Contents/Frameworks/pdftoppm -v                                                           [21:14:03]
pdftoppm version 0.22.4
Copyright 2005-2013 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2011 Glyph & Cog, LLC

I have no idea what command calibre is using but the command I just tried:


/Applications/calibre.app/Contents/Frameworks/pdftoppm  -png ~/Downloads/sample.pdf 

was using around 2GB+ before I killed it because everything crawled to a halt. Mem usage ramps up quickly too.. within few seconds it's using over 2GB.

Thanks for any insight.

Mel
Comment 3 Albert Astals Cid 2013-10-09 23:15:25 UTC
Not a leak, just a file with a page size of 15001 x 22800 pixels, needs a bit of memory to render, since i guess you don't need such a big image, you can always use the -r param to get a smaller one.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.