[GPL GS WORKS] MASTER gs-esp crashes system when asking for unknown font

Bug #108159 reported by Persio
84
Affects Status Importance Assigned to Milestone
gs-esp (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: gs-esp

The new gs-esp package in Feisty (8.15.4.dfsg.1-0ubuntu1) eats up all system resources when asked to load a missing font. Here is a short example:

$ gs
GS>\SomeBogusFontName findfont
Can't find (or can't open) font file /usr/share/gs-esp/8.15/Resource/Font/SomeBogusFontName.
Can't find (or can't open) font file SomeBogusFontName.
Querying operating system for font files...

After this, the system becomes instable and the swap use goes through the roof. And then it freezes completely.

System information:
Linux xxxxx 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux

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

Can you try whether this works with gs-gpl?

Do

sudo apt-get install gs-gpl

and then start "gs-gpl" instead of "gs" on the command line and do the same test.

Changed in gs-esp:
status: Unconfirmed → Needs Info
Revision history for this message
Persio (persiobarros) wrote :

Here it goes:

$gs-gpl
GPL Ghostscript 8.54 (2006-05-17)
Copyright (C) 2006 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>/AAAA findfont
Can't find (or can't open) font file /usr/share/gs-gpl/8.54/Resource/Font/AAAA.
Can't find (or can't open) font file AAAA.
Querying operating system for font files...
Didn't find this font on the system!
Substituting font Courier for AAAA.
Loading NimbusMonL-Regu font from /var/lib/defoma/gs.d/dirs/fonts/n022003l.pfb... 2606724 1055610 1825016 536135 1 done.
GS<1>

I think this is the correct behavior.

Changed in gs-esp:
status: Needs Info → Confirmed
Revision history for this message
Persio (persiobarros) wrote : Re: [GPL GS WORKS] gs-esp crashes system when asking for unknown font

I think this a pretty serious bug. Simply previewing a malformed postscript file or sending it to a non postscript printer can crash the system. I came into this when trying to load a eps file with a non installed font declaration in gimp.
How can I tell the system to use gs-gpl instead of gs-esp?

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

Hello Persio. Assuming you've done "sudo apt-get install gs-gpl", just follow it up with "sudo update-alternatives --set gs /usr/bin/gs-gpl", and that should do it.

Revision history for this message
Persio (persiobarros) wrote :

Micah, thank you very much for your advise. It seems to be working now.

Changed in gs-esp:
importance: Undecided → High
Changed in gs-esp:
status: Confirmed → In Progress
Revision history for this message
VladBlanton (vblanton) wrote :

Bug:
https://bugs.launchpad.net/ubuntu/+source/gs-esp/+bug/75894
appears to be a duplicate of this one. same old story of gs-esp causing memory leak and gs-gpl working.

Changed in gs-esp:
status: In Progress → Fix Committed
Revision history for this message
Dominik Holler (dominik-holler) wrote :

thumbnails in nautilus are effected, too

Changed in gs-esp:
status: Fix Committed → Fix Released
Revision history for this message
VladBlanton (vblanton) wrote :

Has the fix been pushed to the repos yet? Many people are still posting bug reports on this after the "fix" was "released"

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

The fix is in the repositories for Gutsy, the development of Ubuntu 7.10. A backport for Feisty is planned.

Revision history for this message
Brandon Applegate (vom) wrote :

It seems even after installing gs-gpl and running update-alternatives that CUPS still uses gs-esp. Is there an extra step to get CUPS to full embrace gs-gpl ?

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.