Open Bug 1755701 Opened 3 years ago Updated 2 years ago

[meta] Firefox keeps too many files (ports) open

Categories

(Core :: XPCOM, defect)

defect

Tracking

()

People

(Reporter: whimboo, Unassigned)

References

(Depends on 3 open bugs)

Details

(Keywords: meta, perf:resource-use)

Yesterday I have seen that my Firefox DevEdition had about 148k files/ports open. The process was running for about 2 weeks. When checking with the Activity Monitor a couple of open files were visible that were related to tabs that I've closed a couple of days ago.

I'm going to file individual bugs given that there might be quite a lot of different components that need a fix here.

(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #0)

a couple of open files were visible that were related to tabs that I've closed a couple of days ago.

Were these tabs visible as ghost windows in about:memory?

Severity: -- → N/A
Product: Firefox → Core

(In reply to Florian Quèze [:florian] from comment #1)

a couple of open files were visible that were related to tabs that I've closed a couple of days ago.

Were these tabs visible as ghost windows in about:memory?

I cannot say because I had to restart Firefox. Once I'm in this situation again I'll check that and file new bugs with details.

Bug 1723111 looks like a Python exception, and it's 24 = EMFILE = Too many open files, not 23 = ENFILE = Too many open files in system; so, it would be a problem with that Python process running into its own fd limit and not anything that could have been caused by fd use in Firefox itself.

Depends on: 1757881
Depends on: 701661
No longer depends on: 1757881

Moving this to XPCOM, not because the cause lies there but if we wanted to monitor filehandle usage, it would probably start from there.

Component: General → XPCOM

While I was trying to get more details of leaking ports on MacOS with the help of @mstange I noticed that the command lsmp is currently broken on MacOS Monterey and doesn't allow filtering per process (-p option). Markus filed a bug against Apple but I don't have the reference. Means I might have to wait with further analysis.

Depends on: 1693382
Depends on: 1764159

(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #5)

While I was trying to get more details of leaking ports on MacOS with the help of @mstange I noticed that the command lsmp is currently broken on MacOS Monterey and doesn't allow filtering per process (-p option). Markus filed a bug against Apple but I don't have the reference.

This is actually the reference: FB9957317.

Severity: N/A → S3
You need to log in before you can comment on or make changes to this bug.