Closed Bug 1655255 Opened 5 years ago Closed 8 months ago

Huge amount of heap-unclassified in main process

Categories

(Toolkit :: about:memory, defect)

75 Branch
defect

Tracking

()

RESOLVED INCOMPLETE
Tracking Status
firefox79 --- affected
firefox80 --- affected
firefox81 --- affected

People

(Reporter: cjpeople2013, Unassigned)

Details

Attachments

(2 files)

303.67 KB, application/gzip
Details
6.77 MB, application/octet-stream
Details
Attached file memory-report.json.gz

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

Steps to reproduce:

Visit some sites in Firefox safe mode. And see about:memory

Actually I visited following sites(I open each site in a new tab)

  1. https://bbs.nga.cn/read.php?tid=22662758
  2. https://www.youtube.com/watch?v=ChXiROKng30&list=RDeS2T9IiOYbc&index=3
  3. https://www.zhihu.com/question/293518045/answer/1357201883
  4. https://s0developer0mozilla0org.icopy.site/en-US/docs/Mozilla/Performance/DMD
  5. https://support.mozilla.org/en-US/products/firefox?as=u&utm_source=inproduct
  6. https://github.com/FelisCatus/SwitchyOmega/issues/1392

Actual results:

See a huge amount of heap-unclassified in main process, didn't decrease even I close some tabs.

Expected results:

Firefox should use less memory

Attached file dmd.tar

DMD profiler output

Hi Zhu,

Thanks for the details. I was able to reproduce on windows 10 pro on the following versions

Firefox Nightly version 81.0a1 (2020-07-29) (64-bit)
Beta 80.0b1 (64-bit)
Release 79.0 (64-bit)

I will move this over to a component so developers can take a look over it. If is not the correct component please feel free to change it to an appropriate one.

Thanks for the report.

Best regards, Clara

Status: UNCONFIRMED → NEW
Component: Untriaged → about:memory
Ever confirmed: true
Product: Firefox → Toolkit

Thanks for the report.

A bit chunk of the unreported memory is in this single stack:

Unreported {
11 blocks in heap block record 1 of 7,533
177,086,464 bytes (177,068,228 requested / 18,236 slop)
Individual block sizes: 58,941,440; 17,326,080; 16,986,112 x 3; 16,412,672 x 3; 585,728; 32,768; 4,096
29.84% of the heap (29.84% cumulative)
76.79% of unreported (76.79% cumulative)
Allocated at {
#01: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/bin/firefox + 0x20ad9)
#02: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/lib/firefox/libxul.so + 0x139f563)
#03: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/lib/firefox/libxul.so + 0x1378168)
#04: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/lib/firefox/libxul.so + 0x138b78c)
#05: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/lib/firefox/libxul.so + 0x13932f6)
#06: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/lib/firefox/libxul.so + 0x1395728)
#07: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/lib/firefox/libxul.so + 0x13989b0)
#08: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/lib/firefox/libxul.so + 0x16b1691)
}
}

Unfortunately, as you can see the stack is unsymbolicated. You need to run dmd.py on the log before you upload it. Are you using your own build? On OSX, you get at least some stack information without the symbolication but apparently on Linux you don't get much.

Flags: needinfo?(cjpeople2013)

(In reply to Andrew McCreight [:mccr8] from comment #3)

Thanks for the report.

A bit chunk of the unreported memory is in this single stack:

Unreported {
11 blocks in heap block record 1 of 7,533
177,086,464 bytes (177,068,228 requested / 18,236 slop)
Individual block sizes: 58,941,440; 17,326,080; 16,986,112 x 3; 16,412,672 x 3; 585,728; 32,768; 4,096
29.84% of the heap (29.84% cumulative)
76.79% of unreported (76.79% cumulative)
Allocated at {
#01: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/bin/firefox + 0x20ad9)
#02: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/lib/firefox/libxul.so + 0x139f563)
#03: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/lib/firefox/libxul.so + 0x1378168)
#04: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/lib/firefox/libxul.so + 0x138b78c)
#05: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/lib/firefox/libxul.so + 0x13932f6)
#06: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/lib/firefox/libxul.so + 0x1395728)
#07: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/lib/firefox/libxul.so + 0x13989b0)
#08: ??? (/gnu/store/hb8249nwjkj0lg2sh2xd0g145r8l6a0i-firefox-75.0/lib/firefox/libxul.so + 0x16b1691)
}
}

Unfortunately, as you can see the stack is unsymbolicated. You need to run dmd.py on the log before you upload it. Are you using your own build? On OSX, you get at least some stack information without the symbolication but apparently on Linux you don't get much.

Yes, I build Firefox on Guix. But unfortunately I delete old build dir so dmd.py complains that cannot found fix-stacks. How can I get executable fix-stacks? Should compile Firefox once more?

Flags: needinfo?(cjpeople2013)

I'm not sure if the Guix build will include the right symbols or not.

(In reply to Andrew McCreight [:mccr8] from comment #5)

I'm not sure if the Guix build will include the right symbols or not.

Oh, Guix strip symbols in build step.

I cannot reproduce this bug now. I'll report to you if I experience this again.

Thanks. Another approach would be to use the Firefox Profiler. It has a memory profiling mode that might give some insight into what was being allocated, but I haven't used it myself.

The severity field is not set for this bug.
:njn, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(n.nethercote)
Severity: -- → S4
Flags: needinfo?(n.nethercote)
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: