Open Bug 1256985 Opened 8 years ago Updated 3 months ago

When many fonts (45k) are present on a Linux system writing a message no longer works. High memory?

Categories

(Thunderbird :: Message Compose Window, defect, P5)

38 Branch
x86_64
Linux

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: cristiano, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: crash, perf)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0
Build ID: 20160308121151

Steps to reproduce:

1. I installed over 45k fonts. (on linux)
2. I tried to reply to a mail in INBOX.
2b. I tried to close the composer window.


Actual results:

The reply window took longer than usual to appear. When it did, the original message was not shown, many different markup tools were disabled and the recipient address was empty. When entering a recipient address the text autocompletes, but when pressing enter to accept the text field becomes blank again. When closing the composer window, it takes a long time and then Thunderbird crashes, unable to restart again until logging off and back on again. Something about GLib-critical assertion failed sys_page_size == 0. Trying to send a new mail results in exactly the same.
Removing the fonts from font cache resolves the issue.


Expected results:

Thunderbird should probably perform better on a system where there are 45k+ fonts in the future. I know that's a lot of fonts, but probably restricting the list of scanned/loaded fonts to the top 5k or so should do the trick as a last resort. I'd like to have that many fonts and still be able to send mail.
Keywords: crash, hang
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Is there anything in Tools->Error console when the compose window misbehaves?

How can we reproduce this? Is there any easy download of so many fonts?
(In reply to :aceman from comment #1)
> Is there anything in Tools->Error console when the compose window misbehaves?
> 
> How can we reproduce this? Is there any easy download of so many fonts?

I got them by performing a complete recursive wget of www.dafont.com, which was not a criminal thing to do as they only serve fonts that are free for non-commercial use. Note that if you want to follow the same road you'll have to enable wget to go to other hosts as the fonts reside on the dl.dafont.com server. There is no clean way to get them all from that host directly that i could find, the files are all zips that are delivered by a cgi script. It took a couple of hours, but maybe you only need to get half of them to make the bug occur.

It will take a long time for fc-cache to load the font meta-information now since i removed the directory from the list of directories to cache, and i am not able to check for error messages on the console this week anymore because i will not be home for the rest of the week. If you can reproduce it, there will be no need to, so please post when you have a or have no result, i'll be happy to assist in the latter case.

I'm glad you're looking into this. Happy bug hunting! :)
Cristiano...

> Is there anything in Tools->Error console when the compose window misbehaves?
(GLib-critical assertion failed sys_page_size == 0 can be ignored)


probably same issue as bug 800279 and bug 717574 - too many files open so you hit the open file limit
Flags: needinfo?(cristiano)
Summary: When a LOT of fonts are present on a Linux system writing a message no longer works. → When many fonts are present on a Linux system writing a message no longer works.
Christiano,
Using lsof, how many files are shown to be open for Thunderbird?
Assuming it's just performance (or OOM), until a second party proves otherwise.
(christiano seems to be gone)
Severity: normal → major
Flags: needinfo?(cristiano)
Keywords: crash, hangperf
Severity: major → critical
Keywords: crash, qawanted
See Also: → 800279
Summary: When many fonts are present on a Linux system writing a message no longer works. → When many fonts are present on a Linux system writing a message no longer works. High memory?
Blocks: 1330872
Keywords: qawanted
See Also: → 495911

Only for the adventurous. STR (steps to reproduce) comment 2

Maybe there needs to be a sanity check on font handling?

I'll pass.

Windows is supposed to be able to manage about 1000 fonts. But avoid to install too many fonts at one time because that slows down the system. A lot of programs have to load to memory all installed fonts to be able to run.
So it is better to put fonts you use regularly in the Fonts folder. Keep the rest in any other folder or storage device, so you can install/uninstall them as needed.

REF: Dafont FAQ

I'd suspect Linux would be similar and the site currently has 43,888 fonts of which:
13,996 with accents
16,096 with the Euro symbol

Severity: critical → S2
Severity: S2 → S3
Priority: -- → P5
Summary: When many fonts are present on a Linux system writing a message no longer works. High memory? → When many fonts (45k) are present on a Linux system writing a message no longer works. High memory?
You need to log in before you can comment on or make changes to this bug.