Bug 150354 - firefox goes mad opening fonts
Summary: firefox goes mad opening fonts
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Christopher Aillon
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 239549
TreeView+ depends on / blocked
 
Reported: 2005-03-04 20:51 UTC by Bill Nottingham
Modified: 2018-04-11 17:04 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-09 11:50:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bill Nottingham 2005-03-04 20:51:25 UTC
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.

Comment 1 Bill Nottingham 2005-03-04 21:00:29 UTC
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.

Comment 2 Owen Taylor 2005-03-07 20:29:28 UTC
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)

Comment 3 Owen Taylor 2005-03-07 20:34:04 UTC
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


Comment 4 Christopher Blizzard 2005-03-23 22:30:12 UTC
So what's happening here?  Is it just wandering all over all fonts on the system
looking for a matching glyph?

Comment 5 Bill Nottingham 2005-03-23 22:54:13 UTC
Yes, AFAICT (and if I'm understanding Owen right.)

Comment 6 Christopher Blizzard 2005-03-23 22:57:08 UTC
I wonder if it's looking for the same character or many different characters. 
i.e. should pango be caching the miss cases.

Comment 7 Owen Taylor 2005-03-23 23:34:33 UTC
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)

Comment 8 Matěj Cepl 2007-05-09 11:34:00 UTC
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?

Comment 9 Matěj Cepl 2007-05-09 11:40:28 UTC
With MOZ_DISABLE_PANGO=1 I get 394 on RHEL4.

Comment 10 Matěj Cepl 2007-05-09 11:50:39 UTC
Made a clone to new RHEL-4 bug 239549 and closing this one.


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