Lost GreaseMonkey Extension leaked file handles causing Firefox crashes with EMFILE (Too many open files) after tabbed browsing

RESOLVED INVALID

Status

()

Core
DOM
--
critical
RESOLVED INVALID
13 years ago
13 years ago

People

(Reporter: pt, Unassigned)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7
Build Identifier: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7"

Using firefox, files are continually opened until the browser reaches the
maximum open file limit for the user and crashes.

perl -e 'while (1) { sleep 10;system("lsof | grep firefox | wc -l");}'
661
689
715
741
777
792
817
839
855
863
874
889
895
907
913
943
963
978
991
990
1003
1008
1049
1049
1088
1115
1134
1148
1163
1172
0

(strace)
read(38, 0xbfbb64d3, 1)                 = -1 EAGAIN (Resource temporarily
unavailable)
read(31, 0xbfbb64af, 1)                 = -1 EAGAIN (Resource temporarily
unavailable)
read(36, 0xbfbb648b, 1)                 = -1 EAGAIN (Resource temporarily
unavailable)
read(4, "\372", 1)                      = 1
pipe(0x991a644)                         = -1 EMFILE (Too many open files)



Reproducible: Always

Steps to Reproduce:
1. open firefox
2. click on links
3. close links
4. repeat step 2 & 3
Actual Results:  
crash - emfile

Expected Results:  
open file count increased with more open tabs and decreases with fewer open tabs
instead of constantly increasing.

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=166738

Updated

13 years ago
Assignee: nobody → general
Component: Tabbed Browser → DOM
Product: Firefox → Core
QA Contact: tabbed.browser → ian
Summary: Firefox crashes with EMFILE (Too many open files) after tabbed browsing → Firefox crashes with EMFILE (Too many open files) after tabbed browsing
Version: unspecified → Trunk
If you have an strace, could you indicate what sort of files we're talking about
here (the ones that are open)?
(Reporter)

Comment 2

13 years ago
(In reply to comment #1)
> If you have an strace, could you indicate what sort of files we're talking about
> here (the ones that are open)?
Sorry
It seems to be opening a non-existent config.xml repeatedly and never closing.

I will attach a file.
Hmm...  The string "config.xml" does not appear in the source either on trunk
(<http://lxr.mozilla.org/seamonkey/search?string=config.xml>) or on the Firefox
1.0.x branch
(<http://lxr.mozilla.org/aviary101branch/search?string=config.xml>).  Do you
have any extensions installed?
(Reporter)

Comment 4

13 years ago
It ends up the config.xml I spoke of was a relic of an old version of
greasemoney I had apparently installed a year ago under an old version of Fedora.
It did not show up in the Tools->Extensions nor in installed-extensions.txt but
none the less the config.xml lived in its e4a8a97b-f2ed-450b-b12d-ee082ba24781
directory.
I biffed that directory and things seem to be working better.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → INVALID
That sounds like an extension manager bug we probably want to fix... We don't
really want upgrades to cause people's browsers to crash.

Updated

13 years ago
Summary: Firefox crashes with EMFILE (Too many open files) after tabbed browsing → Lost GreaseMonkey Extension leaked file handles causing Firefox crashes with EMFILE (Too many open files) after tabbed browsing
The chrome reg and EM re-write that has been on the branch for quite some time
should prevent this from happening in regards uninstalling an extension using
the EM and it not being shown in the EM for 1.5
You need to log in before you can comment on or make changes to this bug.