Bug 239549 - firefox goes mad opening fonts
firefox goes mad opening fonts
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: firefox (Show other bugs)
4.5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Gecko Maintainer
:
Depends On: 150354
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-09 07:48 EDT by Matěj Cepl
Modified: 2008-05-13 10:43 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-13 10:43:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matěj Cepl 2007-05-09 07:48:37 EDT
+++ This bug was initially created as a clone of Bug #150354 +++

Description of problem:

Opening a mis-typed attachment in bugzilla makes firefox spin its
wheels for multiple minutes trying to open fonts

Version-Release number of selected component (if applicable):

1.0.1-2

How reproducible:

Every time.
Steps to Reproduce:
1. Open 
https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=109916&action=view
  
Actual results:

Churns for multiple minutes, with stuff like:

open("/usr/X11R6/lib/X11/fonts/Type1/l048016t.pfa", O_RDONLY) = 37
open("/usr/X11R6/lib/X11/fonts/Type1/l048013t.pfa", O_RDONLY) = 37
open("/usr/X11R6/lib/X11/fonts/Type1/l048016t.pfa", O_RDONLY) = 37
open("/usr/lib/firefox-1.0.1/components/caps.xpt",
O_RDONLY|O_LARGEFILE) = 37
open("/usr/share/fonts/bitmap-fonts/6x13.pcf", O_RDONLY) = 38
open("/usr/share/fonts/monotype/Cumbwr__.ttf", O_RDONLY) = 38
open("/usr/share/fonts/zh_TW/TrueType/bsmi00lp.ttf", O_RDONLY) = 38
open("/usr/share/fonts/hebrew/MiriamMonoCLM-Book.pfa", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/10x20.pcf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/lutRS12.pcf", O_RDONLY) = 38
open("/usr/X11R6/lib/X11/fonts/OTF/SyrCOMAdiabene.otf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/lutRS12.pcf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/6x12.pcf", O_RDONLY) = 38
open("/usr/share/fonts/default/ghostscript/n022003l.pfb", O_RDONLY) = 38
open("/usr/share/fonts/monotype/Cumbwr__.ttf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/9x15.pcf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/lutRS12.pcf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/10x20.pcf", O_RDONLY) = 38
open("/usr/X11R6/lib/X11/fonts/OTF/SyrCOMAdiabene.otf", O_RDONLY) = 38
open("/usr/share/fonts/monotype/Cumbwr__.ttf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/10x20.pcf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/6x13.pcf", O_RDONLY) = 38
open("/usr/share/fonts/default/ghostscript/n022003l.pfb", O_RDONLY) = 38
open("/usr/X11R6/lib/X11/fonts/OTF/SyrCOMAdiabene.otf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/6x13.pcf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/10x20.pcf", O_RDONLY) = 38
open("/usr/X11R6/lib/X11/fonts/OTF/SyrCOMAdiabene.otf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/lutRS12.pcf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/6x12.pcf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/lutRS12.pcf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/6x12.pcf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/10x20.pcf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/6x12.pcf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/10x20.pcf", O_RDONLY) = 38
open("/usr/share/fonts/hebrew/MiriamMonoCLM-Book.pfa", O_RDONLY) = 38
open("/usr/share/fonts/default/ghostscript/n022003l.pfb", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/6x12.pcf", O_RDONLY) = 38
open("/usr/share/fonts/zh_TW/TrueType/bsmi00lp.ttf", O_RDONLY) = 38
open("/usr/share/fonts/arabic/KacstQura.ttf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/6x12.pcf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/lutRS12.pcf", O_RDONLY) = 38
open("/usr/share/fonts/monotype/Cumbwr__.ttf", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/6x13.pcf", O_RDONLY) = 38
open("/usr/share/fonts/hebrew/MiriamMonoCLM-Book.pfa", O_RDONLY) = 38
open("/usr/share/fonts/bitmap-fonts/10x20.pcf", O_RDONLY) = 38
open("/usr/share/fonts/arabic/KacstQura.ttf", O_RDONLY) = 38
open("/usr/share/fonts/japanese/TrueType/kochi-gothic-subst.ttf",
O_RDONLY) = 38

Expected results:

Not that.

Additional info:

Running with MOZ_DISABLE_PANGO=1 fixes it.

-- Additional comment from notting@redhat.com on 2005-03-04 16:00 EST --
Of note, after opening that attachment a couple of times, firefox's
memory usage is now at:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
13367 notting   16   0  416m 344m  18m S  0.0 22.7   8:15.73 firefox-bin

even after closing the open tabs.

-- Additional comment from otaylor@redhat.com on 2005-03-07 15:29 EST --
As far as I can tell, the Pango/Xft part of it is behaving as
expected ... FireFox is asking Pango to render characters
switching between more fonts than the size of the Xft cache
(5 files)

-- Additional comment from otaylor@redhat.com on 2005-03-07 15:34 EST --
Indeed, if you attach to the running firefox process and do

 (gdb) set XftMaxFreeTypeFiles = 128

Then it will finish rendering a page after a minute or so.

I really don't think FireFox should try to display a page
as UTF-8 when it doesn't come remotely close to validating
as UTF-8


-- Additional comment from blizzard@redhat.com on 2005-03-23 17:30 EST --
So what's happening here?  Is it just wandering all over all fonts on the system
looking for a matching glyph?

-- Additional comment from notting@redhat.com on 2005-03-23 17:54 EST --
Yes, AFAICT (and if I'm understanding Owen right.)

-- Additional comment from blizzard@redhat.com on 2005-03-23 17:57 EST --
I wonder if it's looking for the same character or many different characters. 
i.e. should pango be caching the miss cases.

-- Additional comment from otaylor@redhat.com on 2005-03-23 18:34 EST --
It's not Pango it's Xft ... Xft is being asked to deal with more fonts than
it caches. There's nothing Pango can do (except for caching all metrics
*again* on top of Xft doing it, which would be a waste)

-- Additional comment from mcepl@redhat.com on 2007-05-09 07:34 EST --
Cannot reproduce on Fedora Core 6 (package firefox-1.5.0.10-5.fc6.x86_64), but I
am afraid it is fully reproducable on RHEL4 (running in Xen guest, package
firefox-1.5.0.10-0.1.el4.i386).

When running firefox to the above mentioned attachemnt (hopefully no-one will
fix that MIME identification on that attachment) through strace on FC6, this is
what I get:

[matej@hubmaier ~]$ strace -f -o firefox-strace.txt firefox
[matej@hubmaier ~]$ grep font firefox-strace.txt | wc -l
136
[matej@hubmaier ~]$ 

However, when I run the same on RHEL4, I get this:

[matej@localhost ~]$ strace -f -o firefox-strace.txt firefox
[matej@localhost ~]$ grep font firefox-strace.txt | wc -l
21568
[matej@localhost ~]$ 

I am not sure to which component/distro I should assign this -- obviously it
isn't Rawhide anymore. Should I make it into RHEL4 bug?

-- Additional comment from mcepl@redhat.com on 2007-05-09 07:40 EST --
With MOZ_DISABLE_PANGO=1 I get 394 on RHEL4.
Comment 1 Matěj Cepl 2008-03-19 16:05:38 EDT
No idea, what was asked from me.
Comment 2 Martin Stransky 2008-05-13 10:41:41 EDT
Seems to be fixed in the upcoming FF3 package for RHEL-4.7.
Comment 3 Martin Stransky 2008-05-13 10:43:12 EDT
Closing as NEXTRELEASE.

Note You need to log in before you can comment on or make changes to this bug.