pdf with many images will OOM on scrolling (about:memory and pdf link attached)

NEW
Unassigned

Status

()

defect
P3
normal
a year ago
a year ago

People

(Reporter: mayankleoboy1, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(4 attachments)

(Reporter)

Description

a year ago
Posted file aboutsupport.txt
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
Build ID: 20180208103049

Steps to reproduce:

1. On normal nightly profile
2. Open the pdf attached
3. Start scrolling from page 97 (This is because there are lots of images in quick succession starting from this page)
4. Scroll till page 115 (From this point onward, images are very less)
4. Huge memory increase. Till 3.8GB


Actual results:

Huge memory increase
Also OOM+crash
https://crash-stats.mozilla.com/report/index/7564658b-4b49-4d96-9123-c071d0180208


Expected results:

not so
(Reporter)

Comment 1

a year ago
about:memory
(Reporter)

Comment 2

a year ago
File is 12mb in size, so cant upload here. 
Heres the direst link:

http://idav.ucdavis.edu/~dfalcant//downloads/dissertation.pdf
(Reporter)

Updated

a year ago
Summary: pdf with many images will OOM on scrolling → pdf with many images will OOM on scrolling (about:memory and pdf link attached)
(Reporter)

Comment 3

a year ago
This also happens on a new profile.
Note: Memory decreases after you switch tabs and wait for some time. So appears to be a images related issue.
Component: Graphics → Layout: Images
I tried to reproduce, the biggest I could get memory use for the content process as shown by activity monitor was about 1 GB. I did an about:memory quickly snapshot several times when I hit a peak memory usage and I never saw images taking much memory at all. The memory report attached also doesn't have much memory being used by images. My memory reports looked like this

747.83 MB (100.0%) -- explicit
├──386.42 MB (51.67%) -- workers/workers(pdf.js)/worker(../build/pdf.worker.js, 0x11e2d6000)
│  ├──375.07 MB (50.15%) -- zone(0x12493a000)
│  │  ├──341.63 MB (45.68%) -- compartment(web-worker)
│  │  │  ├──334.50 MB (44.73%) -- classes
│  │  │  │  ├──302.60 MB (40.46%) -- class(ArrayBuffer)/objects
│  │  │  │  │  ├──302.42 MB (40.44%) ── malloc-heap/elements/normal
│  │  │  │  │  └────0.17 MB (00.02%) ── gc-heap
│  │  │  │  ├───24.07 MB (03.22%) ++ (12 tiny)
│  │  │  │  └────7.84 MB (01.05%) ++ class(Array)/objects
│  │  │  └────7.13 MB (00.95%) ++ (8 tiny)
│  │  ├───16.85 MB (02.25%) ── unused-gc-things
│  │  └───16.59 MB (02.22%) ++ (14 tiny)
│  ├────8.51 MB (01.14%) ++ runtime
│  └────2.84 MB (00.38%) ++ (2 tiny)
├──212.06 MB (28.36%) -- window-objects/top(http://idav.ucdavis.edu/~dfalcant//downloads/dissertation.pdf, id=8589934593)
│  ├──204.49 MB (27.34%) -- active/window(http://idav.ucdavis.edu/~dfalcant//downloads/dissertation.pdf)
│  │  ├──201.10 MB (26.89%) -- js-compartment(resource://pdf.js/web/viewer.html, http://idav.ucdavis.edu/~dfalcant//downloads/dissertation.pdf)
│  │  │  ├──198.18 MB (26.50%) -- classes
│  │  │  │  ├──182.75 MB (24.44%) -- class(ArrayBuffer)/objects
│  │  │  │  │  ├──182.28 MB (24.37%) ── malloc-heap/elements/normal
│  │  │  │  │  └────0.47 MB (00.06%) ── gc-heap
│  │  │  │  ├───11.04 MB (01.48%) ++ class(Array)/objects
│  │  │  │  └────4.39 MB (00.59%) ++ (12 tiny)

So it looks like the right component is for the pdf.js viewer.
Component: Layout: Images → PDF Viewer
Product: Core → Firefox

Comment 7

a year ago
It seems I can reproduce this bug, although not a OOM crash.

See the attached screenshots for memory and CPU usage. The first half is while scrolling, the second after.

Updated

a year ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.