Open Bug 1762668 Opened 3 years ago Updated 1 year ago

High image memory usage on Reddit's r/place image

Categories

(Core :: Graphics: ImageLib, defect)

defect

Tracking

()

People

(Reporter: homeknopf1, Unassigned)

Details

Attachments

(1 file)

Steps to reproduce:

When opening a Website, which sends to your Client a lot of packets (they dont have to be big), in this case PNG file which combined adds to an full image or change for the image.

One can currently see it perfectly on this website: https://www.reddit.com/r/place/?cx=500&cy=417&px=435 . It sends 999x999 png file a couple of per seconds which also gets processed Client sided.

It will fill up the Ram insanely fast, while Firefox Task Manager nor the Windows 11 Task manager won't show the actual Ram usage leading to a full ram, Memory Leak like issue.

Actual results:

Opening the example Website will lead to a Full Ram on the Host machine.

Expected results:

Firefox should handle the packets better so the Ram does not get full and it should show up in both Task managers.

This is not a security issue, so I'm going to unhide this.

It looks like there's a ton of image memory. Here's an excerpt from about:memory:

├──694.04 MB (81.48%) -- images
│ ├──693.77 MB (81.45%) -- content
│ │ ├──693.69 MB (81.44%) -- raster
│ │ │ ├──455.45 MB (53.47%) -- used
│ │ │ │ ├──439.15 MB (51.56%) ++ progress=18f
│ │ │ └──238.24 MB (27.97%) -- unused

By contrast, the actual web page is using around 90MB of memory.

Group: firefox-core-security
Component: Untriaged → ImageLib
Product: Firefox → Core
Summary: Website can lead to a Memory leak → High image memory usage on Reddit's r/place image

I think this page is a limited time event, so if this is worth looking at, it would be good to investigate it soon.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: Firefox 98 → Trunk

Looks like it just ended while I was investigating.

Anyways, what I observed was our image cache filling up, it would empty if you hit minimize memory usage. The images were marked as "used" though, indicating something in content was probably still holding on to them. It looked like the images were fetched and then drawn into a canvas. I couldn't look at the js source as any attempts to fetch it returned 404 (but not when loaded as part of the page load).

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

Attachment

General

Creator:
Created:
Updated:
Size: