Bug 689532 - PDF file uses large amount of memory (2 gigs)
Summary: PDF file uses large amount of memory (2 gigs)
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: master
Hardware: Macintosh MacOS X
: P2 normal
Assignee: Default assignee
URL:
Keywords:
Depends on: 689492
Blocks:
  Show dependency tree
 
Reported: 2007-10-24 21:37 UTC by Marcos H. Woehrmann
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer: 190
Word Size: ---


Attachments
leak_fix.patch (11.67 KB, patch)
2008-05-06 11:56 UTC, Ray Johnston
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2007-10-24 21:37:40 UTC
The customer reports and I've confirmed that the attached PDF file causes Ghostscript to use a large 
amount of memory when rendered at 300 DPI.  This happens with gs8.60 and gshead (r8317).  The 
customer reported 2 gigs of memory usage; my PowerBook core dumps after allocating 1.8 gigs.

The command line I used:

  bin/gs -sDEVICE=tiff24nc -sOutputFile=test.tif -r300 ./47540xtesthela.pdf
Comment 1 Marcos H. Woehrmann 2007-10-24 21:40:41 UTC
Created attachment 3498 [details]
47540xtesthela.pdf.gz
Comment 2 Ray Johnston 2007-10-25 08:40:56 UTC
This is probably a duplicate of bug 689492. Both trip over logic that results
in transparency buffers being leaked. Running non-banded mode, the GC will
locate and free these chunks, but when banding is used, the GC never runs during
the 'print_page' so the leaks accumulate.
Comment 3 Ralph Giles 2008-02-14 18:56:21 UTC
I now get "/undefined in G" with HEAD. Assigning back to support; maybe Alex
should take a look?
Comment 4 Ralph Giles 2008-02-14 19:10:14 UTC
Never mind, I missed that the attachment was compressed.
Comment 5 Henry Stiles 2008-04-01 08:51:54 UTC
reassigning to Leo to see if this bug should have been closed with 689492.
Comment 6 Ray Johnston 2008-04-17 10:52:45 UTC
Marcos will re-test
Comment 7 Marcos H. Woehrmann 2008-05-02 13:04:18 UTC
Memory usage for this file with gshead (r8693) is down to 743 megs.  
Comment 8 Ray Johnston 2008-05-06 11:55:12 UTC
With HEAD (rev 8700) this file completes in about 80Mb (adding
-dBufferSpace=32000000 to the options for speed). Note there is a brief spike of
memory usage up to about 160Mb (probably a duplicate of the SMask issue), but
the primary large leak is fixed.

Comment 9 Ray Johnston 2008-05-06 11:56:18 UTC
Created attachment 3987 [details]
leak_fix.patch


Attaching a patch for gs8.60 that fixes 8.60 to use the same amount of memory
as head. This patch also fixes the 'leak' issue with bug 689492 on 8.60