Open Bug 1792598 Opened 2 years ago Updated 9 months ago

XHR'ed dataTransfer file-descriptors remain open

Categories

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

Firefox 105
defect

Tracking

()

UNCONFIRMED

People

(Reporter: s+mozb, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

Attached file fd-delayed-close.html (deleted) —

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

Steps to reproduce:

When using XHR to upload a file from dataTransfer, the file-descriptor is not immediately closed when the upload has completed. Looks like it gets closed by the next gc, which may happen 15-30 seconds after upload completion, or never at all.

If the file was uploaded from a usb flashdrive, this issue makes safe-removal impossible until another gc happens, or the user does a manual gc in about:memory, or the browser is closed. Just closing the tab is not sufficient; the filedescriptor remains open.

Screenshot: https://ocv.me/stuff/bugs/firefox/fd-delayed-close.png

Actual results:

Firefox blocks safe-removal of the usb flashdrive after upload has completed

Expected results:

The filedescriptor should be closed when XHR is done with it

Turns out the mre must be locally hosted in order to work, as the PUT is blocked by bmoattachments' CSP.

Optionally, this mirror works: https://ocv.me/stuff/bugs/firefox/fd-delayed-close.html

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
Severity: -- → S3
Priority: -- → P3
Whiteboard: [necko-triaged]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: