Closed Bug 1552615 Opened 5 years ago Closed 7 months ago

very high vsize 20,907.89 MB, 2,350 MB on a fresh browser, in WebExtensions PID

Categories

(WebExtensions :: General, defect, P3)

68 Branch
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: slandden, Unassigned)

References

Details

Attachments

(2 files)

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

Steps to reproduce:

go to about:memory, click "Measure", click "WebExtensions" PId on right

Actual results:

20,907.89 MB ── vsize
6,143.88 MB ── wasm-guard-pages
0.00 MB ── wasm-runtime

Or on a fresh nightly browser/profile

2,350.25 MB ── vsize
0.00 MB ── wasm-runtime

Expected results:

An amount of VM that won't break 32-bit Firefox.

Regressions: 1303013

Shawn can you give us a more detailed STR (what pages and extensions to load, etc) and attach a memory report from when you see this behavior? Also please note there are different heuristics for wasm guard pages on 32-bit builds of Firefox.

Flags: needinfo?(slandden)
Attached file memory-report.json.gz

This is a memory report from a fresh start of Firefox nightly with a new profile on Ubuntu Disco x86_64.

Flags: needinfo?(slandden)

Okay, a 2GB vsize isn't unexpected on 64-bit linux and shouldn't be a major problem (you have something like 256 TiB available per process). The resident and resident-unique numbers look okay as well.

20GB is a bit surprising, I'd definitely like to see a memory report from when that happens again.

Attached file memory-report.json.gz

Memory report of the Firefox I am using to submit the file.

Hi Eric, Can you helps us find the correct component for this issue ? Does this belong to Memory Allocator ? or maybe something more related to web Extensions?

Flags: needinfo?(erahm)

Kris, do you know where this should end up? I think we decided this was probably WebExtensions using WASM. That's not necessarily a bug, but we only seem to be reporting 1 set of WASM guard pages when clearly there are at least 3:

20,929.87 MB ── vsize
6,143.88 MB ── wasm-guard-pages
0.00 MB ── wasm-runtime

I'm not sure what rules we have for WebExtensions using WASM, but I'd guess we consider it okay as long as compilation is part of the build step.

Flags: needinfo?(erahm) → needinfo?(kmaglione+bmo)

Hi, I'm setting the component for this issue to WebExtensions since it might be related to it, in case its not please change the component to the correct one, maybe Kris can help us with that.

Component: Untriaged → General
Product: Firefox → WebExtensions
Version: 68 Branch → Firefox 68
Flags: needinfo?(kmaglione+bmo)
Priority: -- → P3

I believe this is definitely related to uBlock Origin. I found this thread on Reddit: https://www.reddit.com/r/uBlockOrigin/comments/b7j45j/ublock_118_memory_leak_on_firefox_up_to_25g_on/

On my computer I just disabled uBlock Origin and saw vsize go from 20.5 GiB to 2.5 GiB instantly.

Shawn, can you please confirm?

Flags: needinfo?(slandden)
Version: Firefox 68 → 68 Branch

This is a bug in Firefox not uBlock Origin however you can find reproduction steps using uBlock Origin at https://github.com/uBlockOrigin/uBlock-issues/issues/811.

I can confirm this - I still have this issue.

This is a firefox bug either way you look at it. Even if it is an extention, it should not be able to allocate 26Gb of virtual memory in a managed javascript sandbox style environment. If nothing else, there should be a config mechanism to manage a vzise limit for threads like the webextension thread.

  1.50 MB ── js-main-runtime-temporary-peak
   9,568 ── page-faults-hard
  11,922,780 ── page-faults-soft
  297.93 MB ── resident
  511.52 MB ── resident-peak
 246.20 MB ── resident-unique
 0.86 MB ── script-preloader-memmapped-cache
19.38 MB ── shmem-allocated
19.38 MB ── shmem-mapped
 0.00 MB ── system-heap-allocated
       0 ── unresolved-ipc-responses
27,440.82 MB ── vsize
 0.00 MB ── wasm-runtime

(In reply to Rares Doghi from comment #7)

I'm setting the component for this issue to WebExtensions since it might be related to it

It's a WebAssembly "issue" -- using quotes because it's only about virtual memory here, not actual physical memory; 64-bit OSes have 256 TB of addressable space.

Disabling WASM usage in uBO[1] will not cause the vsize figure to climb, but at the cost of uBO being less performant and for no actual, real physical world gain in return.

[1] https://github.com/gorhill/uBlock/wiki/Advanced-settings#disablewebassembly

Severity: normal → S3

A needinfo is requested from the reporter, however, the reporter is inactive on Bugzilla. Given that the bug is still UNCONFIRMED, closing the bug as incomplete.

For more information, please visit BugBot documentation.

Status: UNCONFIRMED → RESOLVED
Closed: 7 months ago
Flags: needinfo?(slandden)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: