Open Bug 1663262 Opened 4 years ago Updated 2 years ago

Very high memory usage while deleting large chunks of browsing history

Categories

(Toolkit :: Data Sanitization, defect, P3)

80 Branch
defect

Tracking

()

People

(Reporter: stefanel.stan, Unassigned)

References

Details

(Keywords: perf)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

Steps to reproduce:

  1. Open browsing history (CTRL + H)
  2. Delete browsing history for 1 past month (eg: June)
  3. When June is no longer listed, delete July month browsing history

Actual results:

After step #3, Mozilla Firefox begins having a critical memory leak, ramping the used memory even up to 11GB (I had to end the process manually)

Expected results:

Mozilla should have deleted the browsing history (which can take maybe up to 5 seconds) and return to normal.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Bookmarks & History

This is not a memory leak, it's high memory usage. It's likely related to bug 734643.

Do you have add-ons that may be listening to history changes? Could you please attach a log from about:support?

Depends on: 734643
Flags: needinfo?(stefanel.stan)
Summary: Critical memory leak while deleting browsing history → Very high memory usage while deleting large chunks of browsing history

Probably also bug 1626612. It was hidden because attached memory reports were not anonymized correctly (this bug was fixed).

Sample:

2,301.07 MB (100.0%) -- explicit
├──1,114.65 MB (48.44%) -- network
│  ├──1,114.24 MB (48.42%) -- cache2
│  │  ├──1,093.48 MB (47.52%) ── disk-storage(<anonymized>) [228]
│  │  └─────20.76 MB (00.90%) -- (4 tiny)
│  │        ├──10.14 MB (00.44%) ── memory-storage(<anonymized>) [11]
│  │        ├───4.69 MB (00.20%) ── io
│  │        ├───3.04 MB (00.13%) ── index
│  │        └───2.89 MB (00.13%) ── service
│  └──────0.42 MB (00.02%) ++ (4 tiny)
├────720.08 MB (31.29%) ── heap-unclassified
├────206.12 MB (08.96%) -- js-non-window

History is unrelated to the network cache though...

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Attached file memory-report.json.gz

(In reply to Marco Bonardo [:mak] from comment #4)

History is unrelated to the network cache though...

Yet, I can still reproduce by "forgetting about" Gmail from History sidebar.

Forgetting a site does not just remove history, it also clears the cache, cookies and a bunch of other information:
https://searchfox.org/mozilla-central/rev/5a1a34953a26117f3be1a00db20c8bbdc03273d6/toolkit/components/cleardata/nsIClearDataService.idl#256-261

So this is pretty much both bug 734643 and some high memory usage when clearing the cache.
Honza, do you know of an existing bug about high memory usage when removing things from the cache?

Flags: needinfo?(stefanel.stan) → needinfo?(honzab.moz)
Component: Bookmarks & History → Data Sanitization
Product: Firefox → Toolkit
Keywords: perf

Clear a needinfo that is pending on an inactive user.

Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.

For more information, please visit auto_nag documentation.

Flags: needinfo?(honzab.moz)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: