Closed Bug 1036036 Opened 5 years ago Closed 5 years ago

Intermittent browser_bootstrapped_custom_toolbar.js | leaked 1 docShell(s) until shutdown

Categories

(Firefox :: Toolbars and Customization, defect)

defect
Not set
Points:
8

Tracking

()

RESOLVED FIXED
Firefox 34
Iteration:
34.1
Tracking Status
firefox32 --- fixed
firefox33 --- fixed
firefox34 --- fixed
firefox-esr24 --- unaffected
firefox-esr31 --- unaffected

People

(Reporter: RyanVM, Assigned: smacleod)

Details

(Keywords: intermittent-failure, memory-leak)

Attachments

(1 file)

Given the timing involved, I really wonder if this is related to bug 1036031. The Browser.Experiments.Experiments look possibly-relevant, but I see them in green runs too.

https://tbpl.mozilla.org/php/getParsedLog.php?id=43347489&tree=Fx-Team

Windows 7 32-bit fx-team debug test mochitest-browser-chrome-1 on 2014-07-08 07:34:59 PDT for push 18235d048be3
slave: t-w732-ix-119

08:26:01     INFO -  1404833161778	Browser.Experiments.Experiments	TRACE	PreviousExperimentProvider #0::shutdown()
08:26:01     INFO -  1404833161791	Browser.Experiments.Experiments	TRACE	Experiments #0::uninit: started
08:26:01     INFO -  1404833161792	Browser.Experiments.Experiments	TRACE	Experiments #0::uninit: finished with _loadTask
08:26:01     INFO -  1404833161792	Browser.Experiments.Experiments	TRACE	Experiments #0::uninit: no previous shutdown
08:26:01     INFO -  1404833161792	Browser.Experiments.Experiments	TRACE	Experiments #0::Unregistering instance with Addon Manager.
08:26:01     INFO -  1404833161793	Browser.Experiments.Experiments	TRACE	Experiments #0::Unregistering previous experiment add-on provider.
08:26:01     INFO -  1404833161794	Browser.Experiments.Experiments	TRACE	PreviousExperimentProvider #0::shutdown()
08:26:01     INFO -  1404833161794	addons.manager	ERROR	Exception calling provider shutdown: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://app/modules/experiments/Experiments.jsm :: this.Experiments.PreviousExperimentProvider.prototype<.shutdown :: line 2188"  data: no] Stack trace: this.Experiments.PreviousExperimentProvider.prototype<.shutdown()@resource://app/modules/experiments/Experiments.jsm:2188 < callProvider()@resource://gre/modules/AddonManager.jsm:194 < AMI_unregisterProvider()@resource://gre/modules/AddonManager.jsm:849 < AMP_unregisterProvider()@resource://gre/modules/AddonManager.jsm:2321 < Experiments.Experiments.prototype._unregisterWithAddonManager()@resource://app/modules/experiments/Experiments.jsm:500 < Experiments.Experiments.prototype.uninit<()@resource://app/modules/experiments/Experiments.jsm:446 < TaskImpl_run()@resource://gre/modules/Task.jsm:314 < TaskImpl_handleResultValue()@resource://gre/modules/Task.jsm:393 < TaskImpl_run()@resource://gre/modules/Task.jsm:322 < TaskImpl()@resource://gre/modules/Task.jsm:275 < createAsyncFunction/asyncFunction()@resource://gre/modules/Task.jsm:249 < Barrier.prototype<._wait()@resource://gre/modules/AsyncShutdown.jsm:587 < Barrier.prototype<.wait()@resource://gre/modules/AsyncShutdown.jsm:553 < Spinner.prototype.observe()@resource://gre/modules/AsyncShutdown.jsm:337 < <file:unknown>
08:26:01     INFO -  1404833161800	Browser.Experiments.Experiments	INFO	Experiments #0::Completed uninitialization.
08:26:01     INFO -  [Parent 2760] WARNING: NS_ENSURE_TRUE(mDB) failed: file c:/builds/moz2_slave/fx-team-w32-d-0000000000000000/build/netwerk/cache/nsDiskCacheDeviceSQL.cpp, line 1406
08:26:03     INFO -  --DOMWINDOW == 11 (3331DE00) [pid = 2760] [serial = 11826] [outer = 160DF800] [url = about:blank]
08:26:03     INFO -  --DOMWINDOW == 10 (1ED30800) [pid = 2760] [serial = 11825] [outer = 161FB800] [url = about:blank]
08:26:03     INFO -  --DOMWINDOW == 9 (3A48D200) [pid = 2760] [serial = 11822] [outer = 39340E00] [url = about:blank]
08:26:03     INFO -  --DOMWINDOW == 8 (160DF800) [pid = 2760] [serial = 7] [outer = 00000000] [url = about:blank]
08:26:03     INFO -  --DOMWINDOW == 7 (161FB800) [pid = 2760] [serial = 6] [outer = 00000000] [url = about:blank]
08:26:03     INFO -  --DOMWINDOW == 6 (39340E00) [pid = 2760] [serial = 11821] [outer = 00000000] [url = about:blank]
08:26:04     INFO -  --DOCSHELL 161FC400 == 0 [pid = 2760] [id = 4]
08:26:04     INFO -  --DOMWINDOW == 5 (13191C00) [pid = 2760] [serial = 4] [outer = 00000000] [url = about:blank]
08:26:04     INFO -  --DOMWINDOW == 4 (1A285800) [pid = 2760] [serial = 15] [outer = 00000000] [url = about:blank]
08:26:04     INFO -  --DOMWINDOW == 3 (1A285000) [pid = 2760] [serial = 14] [outer = 00000000] [url = chrome://mochikit/content/browser-harness.xul]
08:26:04     INFO -  --DOMWINDOW == 2 (0EA64800) [pid = 2760] [serial = 1] [outer = 00000000] [url = resource://gre-resources/hiddenWindow.html]
08:26:04     INFO -  --DOMWINDOW == 1 (131F1800) [pid = 2760] [serial = 5] [outer = 00000000] [url = resource://gre-resources/hiddenWindow.html]
08:26:04     INFO -  --DOMWINDOW == 0 (13191000) [pid = 2760] [serial = 3] [outer = 00000000] [url = chrome://browser/content/browser.xul]
08:26:04     INFO -  [Parent 2760] WARNING: not an nsIRDFRemoteDataSource: 'remote != nullptr', file c:\builds\moz2_slave\fx-team-w32-d-0000000000000000\build\rdf\datasource\src\nsLocalStore.cpp, line 279
08:26:04     INFO -  [Parent 2760] WARNING: not an nsIRDFRemoteDataSource: 'remote != nullptr', file c:\builds\moz2_slave\fx-team-w32-d-0000000000000000\build\rdf\datasource\src\nsLocalStore.cpp, line 279
08:26:04     INFO -  [Parent 2760] WARNING: Leaking the RDF Service.: file c:/builds/moz2_slave/fx-team-w32-d-0000000000000000/build/rdf/build/nsRDFModule.cpp, line 165
08:26:05     INFO -  [Parent 2760] WARNING: '!compMgr', file c:/builds/moz2_slave/fx-team-w32-d-0000000000000000/build/xpcom/glue/nsComponentManagerUtils.cpp, line 63
08:26:05     INFO -  nsStringStats
08:26:05     INFO -   => mAllocCount:        9060219
08:26:05     INFO -   => mReallocCount:       240881
08:26:05     INFO -   => mFreeCount:         9060219
08:26:05     INFO -   => mShareCount:       17360478
08:26:05     INFO -   => mAdoptCount:         711942
08:26:05     INFO -   => mAdoptFreeCount:     711942
08:26:05     INFO -   => Process ID: 2760, Thread ID: 2752
08:26:05     INFO -  TEST-INFO | Main app process: exit status 0
08:26:06  WARNING -  TEST-UNEXPECTED-FAIL | browser/components/customizableui/test/browser_bootstrapped_custom_toolbar.js | leaked 1 docShell(s) until shutdown
Georg knows about Experiments. Maybe he has a clue.
Unlikely to be experiments related - the tracing is normal & expected, the shutdown exceptions is bug 1012466 and fixed on m-c on 2014-07-11 (the reports continue to 2014-07-18).
Marco, please mark this as assigned in the spreadsheet for this iteration.
Assignee: nobody → smacleod
Iteration: --- → 34.1
Points: --- → 8
Flags: needinfo?(mmucci)
Added to Iteration 34.1
Status: NEW → ASSIGNED
QA Whiteboard: [qa-]
Flags: needinfo?(mmucci)
Flags: firefox-backlog+
When adding a SHistoryListener in the Session Store test frame script
we were creating an intermediate global variable that was rooting the
docshell. This prevented things from being GC'd properly.

I've removed this intermediate variable and we should no longer keep
the docshell alive. This will probably also fix Bug 1036031.

I pushed the patch from Bug 965697 applied on beta to try[1] which was
able to reproduce the perma orange. I then applied this patch ontop and
pushed to try[1] which appeared to fix things.

As for why this is only an intermittent on trunk, my knowledge of the GC
is too shallow to know.

[1] https://tbpl.mozilla.org/?tree=Try&rev=f1b10a9ea96c
[2] https://tbpl.mozilla.org/?tree=Try&rev=36f1f0d3f828
Attachment #8462261 - Flags: review?(ttaubert)
Comment on attachment 8462261 [details] [diff] [review]
Patch - Stop leaking docshells in Session Store tests

Review of attachment 8462261 [details] [diff] [review]:
-----------------------------------------------------------------

Nice!
Attachment #8462261 - Flags: review?(ttaubert) → review+
https://hg.mozilla.org/mozilla-central/rev/45f0d5025bb4
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
Nice fix! How'd you track this one down, out of curiosity?
(In reply to :Gavin Sharp [email: gavin@gavinsharp.com] from comment #153)
> Nice fix! How'd you track this one down, out of curiosity?

As RyanVM mentioned[1], the fix in Bug 965697 was causing a perma-leak on beta and it landed around the time that all the other docshell leak intermittents appeared. It was a pretty simple patch that was referencing the docshell, so it was either going to be the webNav var or the SHistoryListener keeping things alive. The perma fail on beta made it nice and easy to test the fix :D

The understanding of why it was leaking the docshell came from the Gecko bootcamp mconley and I attended (Which was awesome and useful, so yay! for cross-team knowledge sharing).

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=965697#c341
You need to log in before you can comment on or make changes to this bug.