Open Bug 1790500 Opened 2 years ago Updated 5 months ago

File-descriptors are not closed under heavy load

Categories

(Core :: DOM: Networking, defect, P3)

Firefox 104
defect

Tracking

()

UNCONFIRMED

People

(Reporter: s+mozb, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file, 1 obsolete file)

4.95 KB, text/html
Details
Attached file fd-no-gc.html (obsolete) —

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0

Steps to reproduce:

When using XHR to upload several thousand files, Firefox may enter a state where it stops closing file descriptors, eventually crashing. Appears to be exacerbated by heavy DOM load

An MRE is attached which should reproduce the issue after a few attempts; screenshot @ https://ocv.me/stuff/bugs/firefox/fd-no-gc.png

Possibly Linux-only bug; very brief testing on Windows came out negative

Actual results:

Firefox runs out of file descriptors and crashes in various ways

Expected results:

The file descriptors should be closed in a timely manner once the objects are nulled in javascript

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Networking
Product: Firefox → Core
Attached file fd-no-gc.html

prevent accidental POSTing to bmoattachments.org -- encourage local-hosting the mre instead

Attachment #9294337 - Attachment is obsolete: true

Some observations I forgot to mention:

  • clicking "GC" or "Measure" in about:memory will close the FDs
    • and sometimes it'll make the GC start running at an alright pace, closing FDs periodically as expected
    • but usually the number of open FDs will just start another climb
  • there's been cases where, after all the files have finished uploading, the final handful of FDs will never be closed, permanently blocking safe-removal of USB flashdrives until the browsertab is closed or a GC is performed manually
    • I'll make a separate issue for that problem once I find a way to reproduce it reliably
Severity: -- → S4
Priority: -- → P2
Whiteboard: [necko-triaged]

The related issue regarding the final handful of FDs "never" getting closed has been reported as issue 1792598

While far less severe than this bug (just a user annoyance rather than a full browser crash) it should be easier to reproduce

Blocks: xhr
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: