[GPL GS WORKS] gs-esp eats all memory... and fails

Bug #97718 reported by Cyril Adrian
10
Affects Status Importance Assigned to Milestone
gs-esp (Ubuntu)
Confirmed
High
Unassigned

Bug Description

Binary package hint: gs-esp

I try to print a simple PDF file (using the document viewer). Using "top", I clearly see a binary named "gs-esp" eating all the memory. The computer becomes quite sluggish until Linux's OOM killer at last kills the process when all the swap is exhausted. The entry stays in CUPS in "stopped" state, I only can remove it.

I updated my Feisty box this morning (7:30 French time).

BTW I only had similar problems in edgy, but only when thying to print a photo with gthumb. The workaround was to use Gimp but it's not a long-term solution. But if I cannot even print a simple PDF sheet it gets quite serious.

Revision history for this message
Cyril Adrian (cadrian) wrote :

Forgot to say (it may be important), my printer is an Epson Stylus Photo R220.

Cyril

Revision history for this message
Cyril Adrian (cadrian) wrote :

Good news: I found a workaround- but it's not pretty.

If one uses the ijs driver instead of the *recommended* default gutenprint, then I can print my documents. But AFAICT that option is only available via an application that is not installed by default (system-config-printer).

HIH!

Cyril

Revision history for this message
Alex (gsasha) wrote :

I can confirm the problem. I have attached a file that gets this behavior every time (just try kghostview on that file)...
Note that if I switch the machine to gs-afpl, everything just works in a snap.

Revision history for this message
Alex (gsasha) wrote :
Revision history for this message
Alex (gsasha) wrote :

Is there a reason why the gs interpreter is only version 8.15? On the website, the latest GPL version is 8.56.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

In former times, the newest GhostScript version was only available under the AFPL license which does not allow commercial redistribution (What distros are doing). With every new major version the previous version was released under GPL as GPL GHostScript. ESP GhostScript is a fork of GPL GhostScript with all GhostScript built-in drivers listed on OpenPrinting, with the CUPS raster backend, and the X display driver modularized.

Due to the license distributions have used GPL or ESP GhostScript.

Currently, the newest GhostScript versions are directly published under the GPL and the ESP GhostScript project is discontinued. After moving the add-on drivers and the CUPS raster backend to ghostscript.com the distros will most probably switch to GPL GhostScript (for Ubuntu in Gutsy Gibbon).

Revision history for this message
Alex (gsasha) wrote : Re: [Bug 97718] Re: gs-esp eats all memory... and fails

I'm sorry, I didn't understand what does the answer means? In particular, is
there any hope for the bug at this point?

So far, I have switched manually to AFPL, so I'm covered, but the problem
still stays...

Revision history for this message
Richard G. Clegg (richard-richardclegg) wrote : Re: gs-esp eats all memory... and fails

I think the problem may be to do with searching for missing fonts. In any case, I can confirm the problem and attach a small eps file which exhibits the issue

richard@sepulchrave:~/masts/documents$ gs-esp layer3.eps
ESP Ghostscript 815.04 (2007-03-14)
Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Can't find (or can't open) font file /usr/share/gs-esp/8.15/Resource/Font/TimesNewRomanPSMT.
Can't find (or can't open) font file TimesNewRomanPSMT.
Querying operating system for font files...

The process then proceeds to grind the operating system to a halt by using all available memory. This is a change in behaviour from edgy.

I am not sure if the problem would occur on a fresh install of feisty -- I did an apt-get dist-upgrade.

Revision history for this message
Micah Cowan (micahcowan) wrote :

Strange, I couldn't reproduce this. Perhaps there is something unique in your font configuration/installed fonts? Have either of you installed some fonts since installing, or done anything that might make your situation a little more unique, font-or-postscript-wise? FWIW, I also moved to Feisty via upgrade (update-manager -d)

$ gs-esp -dBATCH -dEPSCrop layer3.eps
ESP Ghostscript 815.04 (2007-03-14)
Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Can't find (or can't open) font file /usr/share/gs-esp/8.15/Resource/Font/TimesNewRomanPSMT.
Can't find (or can't open) font file TimesNewRomanPSMT.
Querying operating system for font files...
Can't find (or can't open) font file /usr/share/gs-esp/8.15/Resource/Font/TimesNewRomanPSMT.
Can't find (or can't open) font file TimesNewRomanPSMT.
Didn't find this font on the system!
Substituting font Times-Roman for TimesNewRomanPSMT.
Loading NimbusRomNo9L-Regu font from /var/lib/defoma/gs.d/dirs/fonts/n021003l.pfb... 2681756 1372008 3176688 923737 2 done.
>>showpage, press <return> to continue<<

$ gs-esp -dBATCH -dEPSFitPage micro.700.all.eps
ESP Ghostscript 815.04 (2007-03-14)
Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading StandardSymL font from /var/lib/defoma/gs.d/dirs/fonts/s050000l.pfb... 2434516 1089901 2079460 753202 2 done.
Loading NimbusSanL-Regu font from /var/lib/defoma/gs.d/dirs/fonts/n019003l.pfb... 2531564 1217915 2079460 417532 2 done.
Can't find (or can't open) font file /usr/share/gs-esp/8.15/Resource/Font/Arial.
Can't find (or can't open) font file Arial.
Querying operating system for font files...
Can't find (or can't open) font file /usr/share/gs-esp/8.15/Resource/Font/Arial.
Can't find (or can't open) font file Arial.
Didn't find this font on the system!
Substituting font Helvetica for Arial.
>>showpage, press <return> to continue<<

Revision history for this message
Micah Cowan (micahcowan) wrote :

Confirming due to number of reporters reporting reproducibility.

Changed in gs-esp:
status: Unconfirmed → Confirmed
Revision history for this message
Richard G. Clegg (richard-richardclegg) wrote :

I try to keep apt-sources pretty clean apart from those extra repositories added by automatix (but many people do that). The only other thing I can think of that I do that not many other people do is to use texlive rather than tetex since I have a job which involves technical editing of documents to precise formats. That was done using the apt-get system though. I'm not sure if/how the tex system interacts with the ghostscript system if, indeed, it does at all. I'm afraid I'm very much out of my area of technical expertise on this one.

The laptop I am running it on is pretty chunky though -- 1Gb memory and Dual core processor so if that grinds to a halt then it's fair to say that most people would.

If there are any traces or reports I can run to help you nail it down I will gladly do so.

I'm going to do a fresh "feisty" install on my desktop next week so I can try to reproduce things there if it is not fixed by then.

Revision history for this message
Richard G. Clegg (richard-richardclegg) wrote :

Oh -- for people who want a workaround while this is patched

sudo apt-get install gs-gpl
sudo update-alternatives --install /usr/bin/gs gs /usr/bin/gs-gpl

gets things working again.

Revision history for this message
Micah Cowan (micahcowan) wrote :

The only direct interaction I could think of a TeX distro having with postscript, would be the provision of PostScript Type1 fonts, especially scalable versions of the Metafont fonts like Computer Modern, etc. That might be worth checking into...

Changed in gs-esp:
importance: Undecided → High
Revision history for this message
Blue Dragon (peterachilds) wrote :

I have a very similar problem using ps2pdf. (which calls gs)

Perhaps I have 4 identially installed ubuntu fiesty machines and the bug only happerns in the ones with 1Gb or more memory not the ones with only 512Mb or 256Mb

Oh it actually works if you can leave it for 50 seconds swapping heavily.

gs-gpl also cuts of the first inch of the page but I'm using gs-afpl and thats fine.

Peter.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.