Closed Bug 1508911 Opened 2 years ago Closed 7 months ago

Assertion failure: !mIsBeingDestroyed, at src/docshell/base/nsDocShell.cpp:5489

Categories

(Core :: DOM: Navigation, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Fission Milestone M5b
Tracking Status
firefox-esr68 --- wontfix
firefox64 --- wontfix
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- wontfix
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- wontfix
firefox72 --- disabled
firefox73 --- disabled
firefox74 --- disabled
firefox75 --- fixed

People

(Reporter: tsmith, Assigned: kmag)

References

(Blocks 2 open bugs)

Details

(4 keywords)

Attachments

(1 file, 1 obsolete file)

Attached file testcase.html (obsolete) —
Reduced with m-c:
BuildID=20181120164749
SourceStamp=8eff0a4f5d8f4442ce233d492185a90c460846ef

Assertion failure: !mIsBeingDestroyed, at src/docshell/base/nsDocShell.cpp:5489

#0 nsDocShell::SetParentWidget(nsIWidget*) src/docshell/base/nsDocShell.cpp:5489:3
#1 non-virtual thunk to nsDocShell::SetParentWidget(nsIWidget*) src/docshell/base/nsDocShell.cpp
#2 nsDocumentViewer::Hide() src/layout/base/nsDocumentViewer.cpp:2374:15
#3 nsDocShell::SetVisibility(bool) src/docshell/base/nsDocShell.cpp
#4 non-virtual thunk to nsDocShell::SetVisibility(bool) src/docshell/base/nsDocShell.cpp
#5 nsFrameLoader::Hide() src/dom/base/nsFrameLoader.cpp:908:12
#6 nsHideViewer::Run() src/layout/generic/nsSubDocumentFrame.cpp:1000:21
#7 nsContentUtils::RemoveScriptBlocker() src/dom/base/nsContentUtils.cpp:5564:15
#8 nsAutoScriptBlocker::~nsAutoScriptBlocker() src/dom/base/nsContentUtils.h:3672:5
#9 mozilla::PresShell::DoFlushPendingNotifications(mozilla::ChangesToFlush) src/layout/base/PresShell.cpp:4357:5
#10 nsIDocument::FlushPendingNotifications(mozilla::ChangesToFlush) src/dom/base/nsDocument.cpp:7798:12
#11 nsIDocument::FlushPendingNotifications(mozilla::FlushType) src/dom/base/nsDocument.cpp:7737:3
#12 nsComputedDOMStyle::UpdateCurrentStyleSources(bool) src/layout/style/nsComputedDOMStyle.cpp:892:15
#13 nsComputedDOMStyle::GetPropertyValue(nsTSubstring<char16_t> const&, nsTSubstring<char16_t>&) src/layout/style/nsComputedDOMStyle.cpp:450:3
#14 nsComputedDOMStyle::GetPropertyValue(nsCSSPropertyID, nsTSubstring<char16_t>&) src/layout/style/nsComputedDOMStyle.cpp:381:10
#15 nsDOMCSSDeclaration::GetWidth(nsTSubstring<char16_t>&, mozilla::ErrorResult&) src/obj-firefox/dist/include/mozilla/ServoCSSPropList.h:335:1
#16 mozilla::dom::CSS2Properties_Binding::get_width(JSContext*, JS::Handle<JSObject*>, nsDOMCSSDeclaration*, JSJitGetterCallArgs) src/obj-firefox/dom/bindings/CSS2PropertiesBinding.cpp:25486:9
#17 bool mozilla::dom::binding_detail::GenericGetter<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) src/dom/bindings/BindingUtils.cpp:3252:13
#18 CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) src/js/src/vm/Interpreter.cpp:468:15
#19 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) src/js/src/vm/Interpreter.cpp:560:16
#20 InternalCall(JSContext*, js::AnyInvokeArgs const&) src/js/src/vm/Interpreter.cpp:614:12
#21 js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) src/js/src/vm/Interpreter.cpp:633:10
#22 JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) src/js/src/jsapi.cpp:2988:12
#23 JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JSObject*>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) src/obj-firefox/dist/include/jsapi.h:2701:12
#24 xpc::XrayWrapper<js::CrossCompartmentWrapper, xpc::DOMXrayTraits>::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) const src/js/xpconnect/wrappers/XrayWrapper.cpp:2234:12
#25 js::Proxy::getInternal(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) src/js/src/proxy/Proxy.cpp:384:21
#26 js::Proxy::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) src/js/src/proxy/Proxy.cpp:394:12
#27 js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) src/js/src/vm/ObjectOperations-inl.h:119:16
#28 js::Proxy::getInternal(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) src/js/src/proxy/Proxy.cpp:380:20
#29 js::Proxy::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) src/js/src/proxy/Proxy.cpp:394:12
#30 js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) src/js/src/vm/ObjectOperations-inl.h:119:16
#31 js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, js::PropertyName*, JS::MutableHandle<JS::Value>) src/js/src/vm/ObjectOperations-inl.h:130:12
#32 js::GetProperty(JSContext*, JS::Handle<JS::Value>, JS::Handle<js::PropertyName*>, JS::MutableHandle<JS::Value>) src/js/src/vm/Interpreter.cpp:4925:12
#33 GetPropertyOperation(JSContext*, js::InterpreterFrame*, JS::Handle<JSScript*>, unsigned char*, JS::MutableHandle<JS::Value>, JS::MutableHandle<JS::Value>) src/js/src/vm/Interpreter.cpp:223:12
#34 Interpret(JSContext*, js::RunState&) src/js/src/vm/Interpreter.cpp:3158:10
#35 js::RunScript(JSContext*, js::RunState&) src/js/src/vm/Interpreter.cpp:447:12
#36 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) src/js/src/vm/Interpreter.cpp:587:15
#37 InternalCall(JSContext*, js::AnyInvokeArgs const&) src/js/src/vm/Interpreter.cpp:614:12
#38 js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) src/js/src/vm/Interpreter.cpp:633:10
#39 JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) src/js/src/jsapi.cpp:2988:12
#40 mozilla::dom::EventListener::HandleEvent(JSContext*, JS::Handle<JS::Value>, mozilla::dom::Event&, mozilla::ErrorResult&) src/obj-firefox/dom/bindings/EventListenerBinding.cpp:52:8
#41 void mozilla::dom::EventListener::HandleEvent<mozilla::dom::EventTarget*>(mozilla::dom::EventTarget* const&, mozilla::dom::Event&, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*) src/obj-firefox/dist/include/mozilla/dom/EventListenerBinding.h:66:12
#42 mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*) src/dom/events/EventListenerManager.cpp:1112:9
#43 mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) src/dom/events/EventListenerManager.cpp:1317:15
#44 mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) src/dom/events/EventDispatcher.cpp:425:17
#45 mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) src/dom/events/EventDispatcher.cpp:642:16
#46 mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) src/dom/events/EventDispatcher.cpp:1164:11
#47 nsDocumentViewer::LoadComplete(nsresult) src/layout/base/nsDocumentViewer.cpp:1165:7
#48 nsDocShell::EndPageLoad(nsIWebProgress*, nsIChannel*, nsresult) src/docshell/base/nsDocShell.cpp:7034:21
#49 nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) src/docshell/base/nsDocShell.cpp:6825:7
#50 non-virtual thunk to nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) src/docshell/base/nsDocShell.cpp
#51 nsDocLoader::DoFireOnStateChange(nsIWebProgress*, nsIRequest*, int&, nsresult) src/uriloader/base/nsDocLoader.cpp:1309:3
#52 nsDocLoader::doStopDocumentLoad(nsIRequest*, nsresult) src/uriloader/base/nsDocLoader.cpp:852:14
#53 nsDocLoader::DocLoaderIsEmpty(bool) src/uriloader/base/nsDocLoader.cpp:741:9
#54 nsDocLoader::DocLoaderIsEmpty(bool) src/uriloader/base/nsDocLoader.cpp:744:19
#55 nsDocLoader::OnStopRequest(nsIRequest*, nsISupports*, nsresult) src/uriloader/base/nsDocLoader.cpp:630:5
#56 non-virtual thunk to nsDocLoader::OnStopRequest(nsIRequest*, nsISupports*, nsresult) src/uriloader/base/nsDocLoader.cpp
#57 mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult) src/netwerk/base/nsLoadGroup.cpp:628:28
#58 mozilla::net::nsLoadGroup::Cancel(nsresult) src/netwerk/base/nsLoadGroup.cpp:257:15
#59 nsDocLoader::Stop() src/uriloader/base/nsDocLoader.cpp:244:22
#60 nsDocShell::Stop(unsigned int) src/docshell/base/nsDocShell.cpp:4964:5
#61 nsDocShell::Destroy() src/docshell/base/nsDocShell.cpp:5256:3
#62 nsFrameLoader::DestroyDocShell() src/dom/base/nsFrameLoader.cpp:1740:15
#63 nsFrameLoaderDestroyRunnable::Run() src/dom/base/nsFrameLoader.cpp:1678:19
#64 nsIDocument::MaybeInitializeFinalizeFrameLoaders() src/dom/base/nsDocument.cpp:6733:22
#65 mozilla::detail::RunnableMethodImpl<nsIDocument*, void (nsIDocument::*)(), true, (mozilla::RunnableKind)0>::Run() src/obj-firefox/dist/include/nsThreadUtils.h:1242:13
#66 nsContentUtils::AddScriptRunner(already_AddRefed<nsIRunnable>) src/dom/base/nsContentUtils.cpp:5637:13
#67 nsContentUtils::AddScriptRunner(nsIRunnable*) src/dom/base/nsContentUtils.cpp:5644:3
#68 nsIDocument::FinalizeFrameLoader(nsFrameLoader*, nsIRunnable*) src/dom/base/nsDocument.cpp:6687:5
#69 nsFrameLoader::StartDestroy() src/dom/base/nsFrameLoader.cpp:1668:7
#70 nsObjectLoadingContent::UnloadObject(bool) src/dom/base/nsObjectLoadingContent.cpp:2587:19
#71 nsObjectLoadingContent::LoadObject(bool, bool, nsIRequest*) src/dom/base/nsObjectLoadingContent.cpp:2008:3
#72 mozilla::dom::HTMLEmbedElement::AfterMaybeChangeAttr(int, nsAtom*, bool) src/dom/html/HTMLEmbedElement.cpp:174:23
#73 mozilla::dom::HTMLEmbedElement::OnAttrSetButNotChanged(int, nsAtom*, nsAttrValueOrString const&, bool) src/dom/html/HTMLEmbedElement.cpp:151:17
#74 mozilla::dom::Element::SetAttr(int, nsAtom*, nsAtom*, nsTSubstring<char16_t> const&, nsIPrincipal*, bool) src/dom/base/Element.cpp:2607:12
#75 mozilla::dom::Element::SetAttr(int, nsAtom*, nsAtom*, nsTSubstring<char16_t> const&, bool) src/obj-firefox/dist/include/mozilla/dom/Element.h:866:12
#76 mozilla::dom::Element::SetAttr(nsAtom*, nsTSubstring<char16_t> const&, mozilla::ErrorResult&) src/obj-firefox/dist/include/mozilla/dom/Element.h:1618:14
#77 mozilla::dom::HTMLEmbedElement_Binding::set_src(JSContext*, JS::Handle<JSObject*>, mozilla::dom::HTMLEmbedElement*, JSJitSetterCallArgs) src/obj-firefox/dom/bindings/HTMLEmbedElementBinding.cpp:79:9
#78 bool mozilla::dom::binding_detail::GenericSetter<mozilla::dom::binding_detail::NormalThisPolicy>(JSContext*, unsigned int, JS::Value*) src/dom/bindings/BindingUtils.cpp:3320:8
#79 CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) src/js/src/vm/Interpreter.cpp:468:15
#80 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) src/js/src/vm/Interpreter.cpp:560:16
#81 InternalCall(JSContext*, js::AnyInvokeArgs const&) src/js/src/vm/Interpreter.cpp:614:12
#82 js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) src/js/src/vm/Interpreter.cpp:633:10
#83 js::CallSetter(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::Handle<JS::Value>) src/js/src/vm/Interpreter.cpp:775:12
#84 SetExistingProperty(JSContext*, JS::Handle<JS::PropertyKey>, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::Handle<js::NativeObject*>, JS::Handle<JS::PropertyResult>, JS::ObjectOpResult&) src/js/src/vm/NativeObject.cpp:3016:10
#85 bool js::NativeSetProperty<(js::QualifiedBool)1>(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::PropertyKey>, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::ObjectOpResult&) src/js/src/vm/NativeObject.cpp:3046:20
#86 js::SetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::PropertyKey>, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::ObjectOpResult&) src/js/src/vm/ObjectOperations-inl.h:298:12
#87 SetPropertyOperation(JSContext*, JSOp, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::Handle<JS::Value>) src/js/src/vm/Interpreter.cpp:277:12
#88 Interpret(JSContext*, js::RunState&) src/js/src/vm/Interpreter.cpp:3241:10
#89 js::RunScript(JSContext*, js::RunState&) src/js/src/vm/Interpreter.cpp:447:12
#90 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) src/js/src/vm/Interpreter.cpp:587:15
#91 InternalCall(JSContext*, js::AnyInvokeArgs const&) src/js/src/vm/Interpreter.cpp:614:12
#92 js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) src/js/src/vm/Interpreter.cpp:633:10
#93 JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) src/js/src/jsapi.cpp:2988:12
#94 mozilla::dom::FrameRequestCallback::Call(JSContext*, JS::Handle<JS::Value>, double, mozilla::ErrorResult&) src/obj-firefox/dom/bindings/WindowBinding.cpp:956:8
#95 mozilla::dom::FrameRequestCallback::Call(double, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*) src/obj-firefox/dist/include/mozilla/dom/WindowBinding.h:597:12
#96 mozilla::dom::FrameRequestCallback::Call(double, char const*) src/obj-firefox/dist/include/mozilla/dom/WindowBinding.h:610:12
#97 nsRefreshDriver::RunFrameRequestCallbacks(mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:1720:19
#98 nsRefreshDriver::Tick(mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:1892:7
#99 mozilla::RefreshDriverTimer::TickRefreshDrivers(mozilla::TimeStamp, nsTArray<RefPtr<nsRefreshDriver> >&) src/layout/base/nsRefreshDriver.cpp:301:7
#100 mozilla::RefreshDriverTimer::Tick(mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:319:5
#101 mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::TickRefreshDriver(mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:676:16
#102 mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsync(mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:573:9
#103 mozilla::layout::VsyncChild::RecvNotify(mozilla::TimeStamp const&) src/layout/ipc/VsyncChild.cpp:76:16
#104 mozilla::layout::PVsyncChild::OnMessageReceived(IPC::Message const&) src/obj-firefox/ipc/ipdl/PVsyncChild.cpp:167:20
#105 mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) src/obj-firefox/ipc/ipdl/PBackgroundChild.cpp:2446:28
#106 mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) src/ipc/glue/MessageChannel.cpp:2244:25
#107 mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) src/ipc/glue/MessageChannel.cpp:2171:17
#108 mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) src/ipc/glue/MessageChannel.cpp:2008:5
#109 mozilla::ipc::MessageChannel::MessageTask::Run() src/ipc/glue/MessageChannel.cpp:2041:15
#110 nsThread::ProcessNextEvent(bool, bool*) src/xpcom/threads/nsThread.cpp:1244:14
#111 NS_ProcessNextEvent(nsIThread*, bool) src/xpcom/threads/nsThreadUtils.cpp:530:10
#112 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:97:21
#113 MessageLoop::RunInternal() src/ipc/chromium/src/base/message_loop.cc:325:10
#114 MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:298:3
#115 nsBaseAppShell::Run() src/widget/nsBaseAppShell.cpp:158:27
#116 XRE_RunAppShell() src/toolkit/xre/nsEmbedFunctions.cpp:961:22
#117 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:269:9
#118 MessageLoop::RunInternal() src/ipc/chromium/src/base/message_loop.cc:325:10
#119 MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:298:3
#120 XRE_InitChildProcess(int, char**, XREChildData const*) src/toolkit/xre/nsEmbedFunctions.cpp:787:34
#121 content_process_main(mozilla::Bootstrap*, int, char**) src/browser/app/../../ipc/contentproc/plugin-container.cpp:50:30
#122 main src/browser/app/nsBrowserApp.cpp:287:18
#123 __libc_start_main /build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:291
#124 _start (firefox+0x349f4)
Flags: in-testsuite?
Priority: -- → P2

Still repros if I open in multiple tabs and wait a few seconds.

Neha, could you please look over what's going on here or redirect to someone? It has 99 failures in 20 days and it's closing on disable-recommended bugs list. https://treeherder.mozilla.org/intermittent-failures.html#/bugdetails?startday=2019-07-21&endday=2019-08-20&tree=trunk&bug=1508911
It fails only on fission linux64/linux64-qr debug.

Recent failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=262367630&repo=mozilla-central

Flags: needinfo?(nkochar)

Kris, can you look into this?

Flags: needinfo?(nkochar) → needinfo?(kmaglione+bmo)
Flags: needinfo?(kmaglione+bmo) → needinfo?(nika)

Interestingly, the stacks of the few test failures I see by looking at https://treeherder.mozilla.org/intermittent-failures.html#/bugdetails?bug=1508911&startday=2019-08-05&endday=2019-08-11&tree=all appear to have a different pattern in their stack than the stack mentioned in the first commit. Here's a summary of the vague pattern:

Assertion failure: !mIsBeingDestroyed
nsFrameLoader::Show(...)
-snip-
AsyncFrameInit::Run()
nsContentUtils::RemoveScriptBlocker()
-snip-
PresShell::DoFlushPendingNotifications(...)
-snip-
nsDocShell::Stop(...)
nsDocShell::Destroy()
-snip-
nsFrameLoaderOwner::ChangeRemoteness(...)
WindowGlobalChild::RecvChangeFrameRemoteness(...)

The issue appears to be related to entering DoFlushPendingNotifications while the nsDocShell is being destroyed, but PresShell::mIsDestroying is false. The AsyncFrameInit call is queued up to run during one of these check blocks, and gets run immediately after, firing the assertion.

The PresShell seems like it would be set as destroying here: https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/docshell/base/nsDocShell.cpp#4925, while the Stop call which triggers the reflow is run here: https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/docshell/base/nsDocShell.cpp#4907.

I'm guessing this may be being caused by fission due how it exercises the nsDocShell::Destroy() codepath during document loading more than tests normally do, but I'm not sure if this is specifically a Fission issue. The original source (from ChangeFrameRemoteness) is certainly fission-related though.

:jwatt, do you happen to know what the correct behaviour here would be? Perhaps we need to make sure to not fire the loadgroup-empty notifications during nsDocShell::Destroy() before the PresShell has been marked as destroying?

Flags: needinfo?(nika) → needinfo?(jwatt)

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

This bug failed 51 times in the last 7 days. Occurs on linux64 and linux64-qr on debug build types.

Recent log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=264978425&repo=mozilla-central&lineNumber=5298

In the last 7 days there have been 39 occurrences Linux 64 (most Linux 64 QR) build type debug.

Recent failure: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=266426597&repo=mozilla-central&lineNumber=5191

Hi Neha, failure rate here seems to be increasing on fission. Can you assign someone to take a look or is there a way to disable this?

There are 42 total failures in the last 7 days on linux64 and linux64-qr debug fission.

Recent failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=267600834&repo=mozilla-central&lineNumber=4815

[task 2019-09-20T07:19:59.149Z] 07:19:59 INFO - TEST-START | js/xpconnect/tests/mochitest/test_bug629331.html
[task 2019-09-20T07:19:59.169Z] 07:19:59 INFO - GECKO(1963) | [Parent 1963, Main Thread] WARNING: Cannot set transparency mode on non-popup windows.: file /builds/worker/workspace/build/src/widget/gtk/nsWindow.cpp, line 4494
[task 2019-09-20T07:19:59.213Z] 07:19:59 INFO - GECKO(1963) | ++DOMWINDOW == 15 (0x7efcf862ec00) [pid = 2137] [serial = 66] [outer = 0x7efcfafdd6a0]
[task 2019-09-20T07:19:59.269Z] 07:19:59 INFO - GECKO(1963) | [Parent 1963, Main Thread] WARNING: Cannot set transparency mode on non-popup windows.: file /builds/worker/workspace/build/src/widget/gtk/nsWindow.cpp, line 4494
[task 2019-09-20T07:19:59.306Z] 07:19:59 INFO - GECKO(1963) | ++DOCSHELL 0x7efcfa0b1000 == 4 [pid = 2137] [id = {41ce7ce8-cabb-4c52-893a-401865665fcc}]
[task 2019-09-20T07:19:59.306Z] 07:19:59 INFO - GECKO(1963) | ++DOMWINDOW == 16 (0x7efcfafdda60) [pid = 2137] [serial = 67] [outer = (nil)]
[task 2019-09-20T07:19:59.321Z] 07:19:59 INFO - GECKO(1963) | Assertion failure: !mIsBeingDestroyed, at /builds/worker/workspace/build/src/docshell/base/nsDocShell.cpp:5151
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO - GECKO(1963) | #01: <name omitted> [docshell/base/nsDocShell.cpp:4817]
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO - GECKO(1963) | #02: nsFrameLoader::Show(int, int, int, int, nsSubDocumentFrame*) [dom/base/nsFrameLoader.cpp:913]
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO - GECKO(1963) | #03: nsSubDocumentFrame::ShowViewer() [layout/generic/nsIFrame.h:4747]
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO - GECKO(1963) | #04: AsyncFrameInit::Run() [layout/generic/nsSubDocumentFrame.cpp:0]
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO - GECKO(1963) | #05: nsContentUtils::RemoveScriptBlocker() [dom/base/nsContentUtils.cpp:5160]
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO - GECKO(1963) | #06: mozilla::PresShell::DoFlushPendingNotifications(mozilla::ChangesToFlush) [layout/base/PresShell.cpp:4109]
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO - GECKO(1963) | #07: mozilla::dom::Document::FlushPendingNotifications(mozilla::ChangesToFlush) [dom/base/Document.cpp:10071]
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO - GECKO(1963) | #08: nsDocLoader::DocLoaderIsEmpty(bool) [uriloader/base/nsDocLoader.cpp:681]
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO - GECKO(1963) | #09: nsDocLoader::NotifyDoneWithOnload(nsDocLoader*) [uriloader/base/nsDocLoader.h:0]
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.532Z] 07:20:20 INFO - GECKO(1963) | #10: nsDocLoader::DocLoaderIsEmpty(bool) [uriloader/base/nsDocLoader.cpp:735]
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO - GECKO(1963) | #11: nsDocLoader::OnStopRequest(nsIRequest*, nsresult) [uriloader/base/nsDocLoader.cpp:619]
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO - GECKO(1963) | #12: non-virtual thunk to nsDocLoader::OnStopRequest(nsIRequest*, nsresult) [uriloader/base/nsDocLoader.cpp:0]
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO - GECKO(1963) | #13: mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult) [netwerk/base/nsLoadGroup.cpp:568]
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO - GECKO(1963) | #14: mozilla::net::nsLoadGroup::Cancel(nsresult) [netwerk/base/nsLoadGroup.cpp:224]
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO - GECKO(1963) | #15: nsDocLoader::Stop() [uriloader/base/nsDocLoader.cpp:237]
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO - GECKO(1963) | #16: nsDocShell::Stop(unsigned int) [docshell/base/nsDocShell.cpp:4668]
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO - GECKO(1963) | #17: nsDocShell::Destroy() [docshell/base/nsDocShell.cpp:4925]
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO - GECKO(1963) | #18: nsFrameLoader::DestroyDocShell() [dom/base/nsFrameLoader.cpp:1891]
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO - GECKO(1963) | #19: nsFrameLoaderDestroyRunnable::Run() [dom/base/nsFrameLoader.cpp:1831]
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO - GECKO(1963) | #20: mozilla::dom::Document::MaybeInitializeFinalizeFrameLoaders() [dom/base/Document.cpp:8550]
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO - GECKO(1963) | #21: mozilla::detail::RunnableMethodImpl<mozilla::dom::Document*, void (mozilla::dom::Document::)(), true, (mozilla::RunnableKind)0>::Run() [xpcom/threads/nsThreadUtils.h:1176]
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO - GECKO(1963) | #22: nsContentUtils::AddScriptRunner(already_AddRefed<nsIRunnable>) [dom/base/nsContentUtils.cpp:0]
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO - GECKO(1963) | #23: nsContentUtils::AddScriptRunner(nsIRunnable
) [dom/base/nsContentUtils.cpp:5231]
[task 2019-09-20T07:20:20.533Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.534Z] 07:20:20 INFO - GECKO(1963) | #24: mozilla::dom::Document::FinalizeFrameLoader(nsFrameLoader*, nsIRunnable*) [dom/base/Document.cpp:8508]
[task 2019-09-20T07:20:20.535Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.535Z] 07:20:20 INFO - GECKO(1963) | #25: nsFrameLoader::StartDestroy() [dom/base/nsFrameLoader.cpp:1816]
[task 2019-09-20T07:20:20.535Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.536Z] 07:20:20 INFO - GECKO(1963) | #26: nsFrameLoaderOwner::ChangeRemoteness(mozilla::dom::RemotenessOptions const&, mozilla::ErrorResult&) [dom/base/nsFrameLoaderOwner.cpp:84]
[task 2019-09-20T07:20:20.536Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.537Z] 07:20:20 INFO - GECKO(1963) | #27: mozilla::dom::WindowGlobalChild::RecvChangeFrameRemoteness(mozilla::dom::BrowsingContext*, nsTString<char16_t> const&, unsigned long, std::function<void (mozilla::Tuple<nsresult const&, mozilla::dom::PBrowserBridgeChild*>)>&&) [dom/ipc/WindowGlobalChild.cpp:312]
[task 2019-09-20T07:20:20.539Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.539Z] 07:20:20 INFO - GECKO(1963) | #28: mozilla::dom::PWindowGlobalChild::OnMessageReceived(IPC::Message const&) [s3:gecko-generated-sources:9596c625a6e87a91e3c8829fb882f453359ca17174888223411dac9608b43bd5d09694c7bf27b196a7d4c3c0550ff25a5e7968a8c1ab9597e61f7d8a87c6f3c8/ipc/ipdl/PWindowGlobalChild.cpp::394]
[task 2019-09-20T07:20:20.540Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.540Z] 07:20:20 INFO - GECKO(1963) | #29: mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) [s3:gecko-generated-sources:819d57f1ac335c9022af60c24b45d1310a5e7ae4edb11d3380f34438b1431bb4968a4cbfd118c8344e19f7c4617ee53203eda7536acaeb5aaf41537f27dac0c1/ipc/ipdl/PContentChild.cpp::7834]
[task 2019-09-20T07:20:20.541Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.542Z] 07:20:20 INFO - GECKO(1963) | #30: mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) [ipc/glue/MessageChannel.cpp:2186]
[task 2019-09-20T07:20:20.542Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.543Z] 07:20:20 INFO - GECKO(1963) | #31: mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) [ipc/glue/MessageChannel.cpp:2112]
[task 2019-09-20T07:20:20.543Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.544Z] 07:20:20 INFO - GECKO(1963) | #32: mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) [ipc/glue/MessageChannel.cpp:0]
[task 2019-09-20T07:20:20.545Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.546Z] 07:20:20 INFO - GECKO(1963) | #33: mozilla::ipc::MessageChannel::MessageTask::Run() [ipc/glue/MessageChannel.cpp:1987]
[task 2019-09-20T07:20:20.546Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.547Z] 07:20:20 INFO - GECKO(1963) | #34: mozilla::SchedulerGroup::Runnable::Run() [xpcom/threads/SchedulerGroup.cpp:295]
[task 2019-09-20T07:20:20.547Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.548Z] 07:20:20 INFO - GECKO(1963) | #35: nsThread::ProcessNextEvent(bool, bool*) [xpcom/threads/nsThread.cpp:1214]
[task 2019-09-20T07:20:20.548Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.549Z] 07:20:20 INFO - GECKO(1963) | #36: NS_ProcessNextEvent(nsIThread*, bool) [xpcom/threads/nsThreadUtils.cpp:486]
[task 2019-09-20T07:20:20.549Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.550Z] 07:20:20 INFO - GECKO(1963) | #37: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [ipc/glue/MessagePump.cpp:0]
[task 2019-09-20T07:20:20.551Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.552Z] 07:20:20 INFO - GECKO(1963) | #38: MessageLoop::RunInternal() [ipc/chromium/src/base/message_loop.cc:315]
[task 2019-09-20T07:20:20.553Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.553Z] 07:20:20 INFO - GECKO(1963) | #39: MessageLoop::Run() [ipc/chromium/src/base/message_loop.cc:291]
[task 2019-09-20T07:20:20.554Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.554Z] 07:20:20 INFO - GECKO(1963) | #40: nsBaseAppShell::Run() [widget/nsBaseAppShell.cpp:139]
[task 2019-09-20T07:20:20.555Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.555Z] 07:20:20 INFO - GECKO(1963) | #41: XRE_RunAppShell() [toolkit/xre/nsEmbedFunctions.cpp:934]
[task 2019-09-20T07:20:20.556Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.556Z] 07:20:20 INFO - GECKO(1963) | #42: mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) [ipc/glue/MessagePump.cpp:238]
[task 2019-09-20T07:20:20.557Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.558Z] 07:20:20 INFO - GECKO(1963) | #43: MessageLoop::RunInternal() [ipc/chromium/src/base/message_loop.cc:315]
[task 2019-09-20T07:20:20.558Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.559Z] 07:20:20 INFO - GECKO(1963) | #44: MessageLoop::Run() [ipc/chromium/src/base/message_loop.cc:291]
[task 2019-09-20T07:20:20.559Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.560Z] 07:20:20 INFO - GECKO(1963) | #45: XRE_InitChildProcess(int, char**, XREChildData const*) [toolkit/xre/nsEmbedFunctions.cpp:769]
[task 2019-09-20T07:20:20.560Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.737Z] 07:20:20 INFO - GECKO(1963) | #46: content_process_main(mozilla::Bootstrap*, int, char**) [ipc/contentproc/plugin-container.cpp:57]
[task 2019-09-20T07:20:20.737Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.738Z] 07:20:20 INFO - GECKO(1963) | #47: main [browser/app/nsBrowserApp.cpp:272]
[task 2019-09-20T07:20:20.738Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.740Z] 07:20:20 INFO - GECKO(1963) | #48: libc.so.6 + 0x20830
[task 2019-09-20T07:20:20.740Z] 07:20:20 INFO -
[task 2019-09-20T07:20:20.741Z] 07:20:20 INFO - GECKO(1963) | #49: _start

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

There have been no failures in the last three nightlies.

My guess is that the assertion is no longer being triggered because kmag's patches in bug 1582523 changed the timing of when the 'iframe's 'load' event fires in js/xpconnect/tests/mochitest/test_bug396851.html. Most likely if we were to trigger go() off the top-level document's 'DOMContentLoaded' event instead then the intermittent assertion would come back.

Assignee: nobody → kmaglione+bmo
Flags: needinfo?(kmaglione+bmo)
Attached file testcase.html

Here is an up to date test case that can trigger the assertion.

Reduced with m-c:
BuildID=20191008093420
SourceStamp=035f52aed4427b22facfa883067e298f10ef9e97

Attachment #9026608 - Attachment is obsolete: true

If a Pernosco session would help get this issue resolved please let me know and I will create one.

Fission Milestone: --- → M4.1
Whiteboard: [stockwell needswork:owner]
Status: NEW → ASSIGNED
Fission Milestone: M4.1 → M5
See Also: → 1574516

kmag, you said this bug was fixed by another bug and we can dupe this bug to that one. Do you recall that bug #?

Flags: needinfo?(kmaglione+bmo)
Blocks: 1574516
See Also: 1574516

Moving P2 M5 bugs to M5b milestone

Fission Milestone: M5 → M5b
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Flags: needinfo?(kmaglione+bmo)
Resolution: --- → FIXED
Flags: in-testsuite? → in-testsuite-

Clearing old needinfo for jwatt because this bug has since been fixed.

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