Don't trigger a full GC in nsGlobalWindow::DetachFromDocShell()

NEW
Assigned to

Status

()

Core
DOM
P3
normal
11 months ago
8 months ago

People

(Reporter: mccr8, Assigned: smaug, NeedInfo)

Tracking

(Blocks: 2 bugs)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

11 months ago
It looks like we may not actually need to do this.
(Assignee)

Comment 1

11 months ago
Created attachment 8883058 [details] [diff] [review]
no_full_gc_at_docshell_detach.diff
Attachment #8883058 - Flags: review?(continuation)
(Reporter)

Comment 2

11 months ago
Comment on attachment 8883058 [details] [diff] [review]
no_full_gc_at_docshell_detach.diff

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

Hopefully this will be okay!
Attachment #8883058 - Flags: review?(continuation) → review+
(Reporter)

Comment 4

11 months ago
I wonder if in some cases we have to GC the same zone twice in a row, but the PokeGC approach only does it once. That might be hard to fix, because we have to worry about zones going away.
Where did we end up with this work?
Flags: needinfo?(continuation)
Priority: -- → P3
(Reporter)

Comment 6

8 months ago
I'm not sure, but based on comment 3, I assume it made Win32 reftests OOM like they always do when we try to GC/CC less aggressively.
Flags: needinfo?(continuation)
(Assignee)

Comment 7

8 months ago
Hmm, we have changed GC/CC scheduling a bit, worth to push to try again.

remote: 
remote: View the pushlog for these changes here:
remote:   https://hg.mozilla.org/try/pushloghtml?changeset=42e80c4e478642c06406f58767da8fb19a517191
remote: 
remote: Follow the progress of your build on Treeherder:
remote:   https://treeherder.mozilla.org/#/jobs?repo=try&revision=42e80c4e478642c06406f58767da8fb19a517191
remote: recorded changegroup in replication log in 0.019s
(Assignee)

Comment 8

8 months ago
Looks quite reasonable. Possibly worth to try to land for FF58.

Comment 9

8 months ago
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a50a428b23fc
Don't trigger a full GC in nsGlobalWindow::DetachFromDocShell(), r=mccr8
(Assignee)

Comment 10

8 months ago
Crossing fingers.
Backed out for frequent leaks during a11y run on Linux x64 asan:

https://hg.mozilla.org/integration/mozilla-inbound/rev/27ba09aa4be87e7dc6e036bbbe1045e2a2a19f01

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=a50a428b23fcfeaa84cb7f781d9a9f592216eaa8&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=133147779&repo=mozilla-inbound

[task 2017-09-25T16:03:42.167Z] 16:03:42     INFO - TEST-INFO | LeakSanitizer | To show the addresses of leaked objects add report_objects=1 to LSAN_OPTIONS
[task 2017-09-25T16:03:42.167Z] 16:03:42     INFO - TEST-INFO | LeakSanitizer | This can be done in testing/mozbase/mozrunner/mozrunner/utils.py
[task 2017-09-25T16:03:42.168Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_malloc, maybe_pod_malloc, js::Shape::hashify, maybeCreateTableForLookup
[task 2017-09-25T16:03:42.169Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_calloc, maybe_pod_calloc, AllocScriptData, js::detail::CopyScript
[task 2017-09-25T16:03:42.170Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_calloc, maybe_pod_calloc, NewEmptyScopeData, js::Scope::XDRSizedBindingNames
[task 2017-09-25T16:03:42.171Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_malloc, maybe_pod_malloc, mozilla::UniquePtr, js::GlobalScope::create
[task 2017-09-25T16:03:42.171Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_malloc, maybe_pod_malloc, js::NewStringCopyNDontDeflate, AtomizeAndCopyChars
[task 2017-09-25T16:03:42.172Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_malloc, maybe_pod_malloc, js::NewStringCopyNDontDeflate, js::JSONParser
[task 2017-09-25T16:03:42.173Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_malloc, maybe_pod_malloc, mozilla::UniquePtr, js::LexicalScope::create
[task 2017-09-25T16:03:42.174Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at start_thread, clone, js_pod_malloc, maybe_pod_malloc
[task 2017-09-25T16:03:42.175Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_malloc, maybe_pod_malloc, mozilla::UniquePtr, js::FunctionScope::create
[task 2017-09-25T16:03:42.176Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_calloc, maybe_pod_calloc, NewEmptyScopeData, js::GlobalScope::create
[task 2017-09-25T16:03:42.176Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_malloc, maybe_pod_malloc, NewStringDeflated, AtomizeAndCopyChars
[task 2017-09-25T16:03:42.177Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_malloc, maybe_pod_malloc, js::Shape::hashify, js::NativeObject::toDictionaryMode
[task 2017-09-25T16:03:42.178Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at nsStringBuffer::Alloc, Atom::Atom, CreateDynamic, NS_Atomize
[task 2017-09-25T16:03:42.178Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at Alloc, nsTSubstring, nsTSubstring, nsTSubstring
[task 2017-09-25T16:03:42.180Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at AllocateProtoAndIfaceCache, xpc::CreateGlobalObject, XPCWrappedNative::WrapNewGlobal, xpc::InitClassesWithNewWrappedGlobal
[task 2017-09-25T16:03:42.180Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_malloc, maybe_pod_malloc, NewStringDeflated, JS_NewUCStringCopyN
[task 2017-09-25T16:03:42.181Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_malloc, maybe_pod_malloc, js::NewStringCopyNDontDeflate, NewStringCopyN
[task 2017-09-25T16:03:42.182Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_malloc, maybe_pod_malloc, mozilla::UniquePtr, js::FunctionScope::clone
[task 2017-09-25T16:03:42.183Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_malloc, maybe_pod_malloc, js::TypeNewScript::make, js::ObjectGroup::defaultNewGroup
[task 2017-09-25T16:03:42.183Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at nsStringBuffer::Alloc, nsAttrValue::GetStringBuffer, nsAttrValue::SetTo, mozilla::dom::Element::SetAttr
[task 2017-09-25T16:03:42.184Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_calloc, maybe_pod_calloc, AllocScriptData, partiallyInit
[task 2017-09-25T16:03:42.185Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_malloc, maybe_pod_malloc, mozilla::UniquePtr, js::VarScope::create
[task 2017-09-25T16:03:42.186Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_calloc, maybe_pod_calloc, AllocScriptData, JSScript::partiallyInit
[task 2017-09-25T16:03:42.186Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_malloc, maybe_pod_malloc, mozilla::UniquePtr, js::Scope::clone
[task 2017-09-25T16:03:42.187Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_calloc, maybe_pod_calloc, NewEmptyScopeData, js::FunctionScope::create
[task 2017-09-25T16:03:42.188Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_new, HashChildren, js::PropertyTree::insertChild, inlinedGetChild
[task 2017-09-25T16:03:42.189Z] 16:03:42    ERROR - TEST-UNEXPECTED-FAIL | LeakSanitizer | leak at js_pod_malloc, maybe_pod_malloc, js::LazyScript::CreateRaw, js::LazyScript::Create
Flags: needinfo?(bugs)
You need to log in before you can comment on or make changes to this bug.