Opened 3 years ago

Last modified 13 months ago

#18047 new defect

Performance: Memory leaking in Tor Browser

Reported by: bugzilla Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-performance-leaking
Cc: nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Didn't find any tracking ticket for memory leaks in Tor Browser.
So created one. Maybe better rename into Performance like #6548...

Report:
TBB 5.0.7 (defaults) doesn't free memory.
All tabs closed after use, but Commit is 300+ MB.
Some unusual things in about:memory :
49.61 MB (33.01%) -- image(chrome://browser/skin/menuPanel.png)

50 MB in memory picture?

16.99 MB ── gfx-surface-win32

Bugzilla users wrote that it is too much and is pointing to leakage.

├────368.91 MB (18.01%) -- commit
│ ├──248.55 MB (12.14%) -- private
│ │ ├──246.86 MB (12.05%) ── readwrite [979]

Unknown object was duplicated 979 times! Some info from https://bugzilla.mozilla.org/show_bug.cgi?id=858615

P.S. sorry for cc: nickm, added to receive your reply.

Child Tickets

TicketStatusOwnerSummaryComponent
#9521assignedtbb-team"new identity" leaks memory in eventSuppressor.suppressEventHandling()Applications/Tor Browser
#18090reopenedtbb-teamTorcrazybutton eats all memory and crashes Tor BrowserApplications/Tor Browser
#19876newtbb-teamMemory leak: a lot of private strings (New Identity doesn't help)Applications/Tor Browser
#20005closedtbb-teamBackport - easy fixes for memory leaks investigationApplications/Tor Browser

Change History (4)

comment:1 Changed 3 years ago by bugzilla

js-non-window for default add-ons:
│ │ ├───74.20 MB (19.06%) -- zone(0x6b40048)
│ │ │ ├──26.18 MB (06.73%) -- compartment([System Principal], Addon-SDK (from: resource://gre/modules/commonjs/toolkit/loader.js:241))
│ │ │ │ ├──25.21 MB (06.48%) -- classes
│ │ │ │ │ ├──14.32 MB (03.68%) -- class(Object)
│ │ │ │ │ │ ├──13.93 MB (03.58%) -- objects
│ │ │ │ │ │ │ ├───8.53 MB (02.19%) -- malloc-heap
│ │ │ │ │ │ │ │ ├──8.52 MB (02.19%) ── slots
│ │ │ │ │ │ │ │ └──0.02 MB (00.00%) ── elements/non-asm.js
│ │ │ │ │ │ │ └───5.40 MB (01.39%) ── gc-heap
│ │ │ │ │ │ └───0.38 MB (00.10%) ++ shapes
│ │ │ │ │ ├───6.19 MB (01.59%) ++ (7 tiny)
│ │ │ │ │ └───4.71 MB (01.21%) -- class(Function)
│ │ │ │ │ ├──4.38 MB (01.12%) -- objects
│ │ │ │ │ │ ├──4.33 MB (01.11%) ── gc-heap
│ │ │ │ │ │ └──0.04 MB (00.01%) ── malloc-heap/slots
│ │ │ │ │ └──0.33 MB (00.08%) ++ shapes
│ │ │ │ └───0.97 MB (00.25%) ++ (5 tiny)
│ │ │ ├──24.41 MB (06.27%) ++ (304 tiny)
│ │ │ ├──14.66 MB (03.77%) -- strings
│ │ │ │ ├───8.23 MB (02.11%) -- string(<non-notable strings>)
│ │ │ │ │ ├──6.14 MB (01.58%) -- malloc-heap
│ │ │ │ │ │ ├──6.07 MB (01.56%) ── latin1
│ │ │ │ │ │ └──0.07 MB (00.02%) ── two-byte
│ │ │ │ │ └──2.09 MB (00.54%) ++ gc-heap
│ │ │ │ └───6.43 MB (01.65%) ++ (129 tiny)
│ │ │ └───8.94 MB (02.30%) ── unused-gc-things

comment:2 Changed 3 years ago by bugzilla

TBB leaves ghost windows:
├──135.56 MB (34.82%) -- window-objects
│ ├───84.14 MB (21.61%) -- top(none)
│ │ ├──83.16 MB (21.36%) -- ghost

Reason: Torbutton might become crazy after using 'Open in New Tab' for embedded video, audio, etc.

comment:3 Changed 3 years ago by bugzilla

950 MB for browser console only!

[02-20 21:19:54] Torbutton INFO: Last window closed. None remain.																
getFirstPartyURI failed for data:text/plain,: 0x80070057																
getFirstPartyURI failed for https://trac.torproject.org/projects/tor/ticket/4278: 0x80070057																

and so on - TBB continues to update elements of closed tabs...

comment:4 Changed 13 months ago by cypherpunks

about:memory is totally broken and shows only

Main Process
Explicit Allocations

1.73 MB (100.0%) -- explicit

, and in console

10:31:23.325 Error: aboutMemory.js assertion failed: _amount already set for non-leaf node 1 aboutMemory.js:85:11
	assert chrome://global/content/aboutMemory.js:85:11
	fillInNonLeafNodes chrome://global/content/aboutMemory.js:1260:9
	fillInNonLeafNodes chrome://global/content/aboutMemory.js:1242:22
	fillInNonLeafNodes chrome://global/content/aboutMemory.js:1242:22
	fillInTree chrome://global/content/aboutMemory.js:1270:3
	appendProcessAboutMemoryElements chrome://global/content/aboutMemory.js:1522:5
	displayReports chrome://global/content/aboutMemory.js:1087:7
	updateAboutMemoryFromReporters/processLiveMemoryReports/displayReportsAndFooter chrome://global/content/aboutMemory.js:526:9
Note: See TracTickets for help on using tickets.