Closed Bug 1370211 Opened 3 years ago Closed 3 years ago

Assertion failure MOZ_ASSERT(!mTrackingScripts.Contains(aURL)) at nsIDocument::NoteScriptTrackingStatus


(Core :: DOM: Core & HTML, defect, P3)






(Reporter: mayhemer, Assigned: schien)



STR (untested):
- debug build from m-c@6d4b65abc362
- load (cached), let load
- open an article with a middle-click
- while the background tab is loading, go to the Weather page (in the top nav menu) in the active tab

Might be a regression from bug 1015466

>	xul.dll!nsIDocument::NoteScriptTrackingStatus({...}, false) Line 3072	C++
 	xul.dll!mozilla::dom::ScriptLoader::FillCompileOptionsForRequest({...}, 0x14ef3800, {...}, 0x0133e2f0) Line 1855	C++
 	xul.dll!mozilla::dom::ScriptLoader::AttemptAsyncScriptCompile(0x14ef3800) Line 1597	C++
 	xul.dll!mozilla::dom::ScriptLoader::PrepareLoadedRequest(0x14ef3800, 0x1c9fc500, NS_OK) Line 2797	C++
 	xul.dll!mozilla::dom::ScriptLoader::OnStreamComplete(0x1c9fc500, 0x14ef3800, NS_OK, NS_OK, 0x00000000) Line 2558	C++
 	xul.dll!mozilla::dom::ScriptLoadHandler::OnStreamComplete(0x1c9fc500, 0x00000000, NS_OK, 0, 0x14b2a000) Line 373	C++
 	xul.dll!nsIncrementalStreamLoader::OnStopRequest(0x01ba2850, 0x00000000, NS_OK) Line 98	C++
 	xul.dll!mozilla::net::InterceptFailedOnStop::OnStopRequest(0x01ba2850, 0x00000000, NS_OK) Line 1085	C++
 	xul.dll!mozilla::net::nsHTTPCompressConv::OnStopRequest(0x01ba2850, 0x00000000, NS_OK) Line 170	C++
 	xul.dll!mozilla::net::HttpChannelChild::DoOnStopRequest(0x01ba2850, NS_OK, 0x00000000) Line 1128	C++
 	xul.dll!mozilla::net::HttpChannelChild::OnStopRequest(NS_OK, {...}) Line 1057	C++
 	xul.dll!mozilla::net::StopRequestEvent::Run() Line 904	C++
 	xul.dll!mozilla::net::ChannelEventQueue::RunOrEnqueue(0x1f2f9f70, false) Line 181	C++
 	xul.dll!mozilla::net::HttpChannelChild::ProcessOnStopRequest(NS_OK, {...}) Line 929	C++
 	xul.dll!mozilla::net::HttpBackgroundChannelChild::RecvOnStopRequest(NS_OK, {...}) Line 253	C++
 	xul.dll!mozilla::net::PHttpBackgroundChannelChild::OnMessageReceived({...}) Line 172	C++
 	xul.dll!mozilla::ipc::PBackgroundChild::OnMessageReceived({...}) Line 1608	C++
 	xul.dll!mozilla::ipc::MessageChannel::DispatchAsyncMessage({...}) Line 2075	C++
 	xul.dll!mozilla::ipc::MessageChannel::DispatchMessageW({...}) Line 2003	C++
 	xul.dll!mozilla::ipc::MessageChannel::RunMessage({...}) Line 1871	C++
 	xul.dll!mozilla::ipc::MessageChannel::MessageTask::Run() Line 1904	C++
 	xul.dll!nsThread::ProcessNextEvent(false, 0x0133f539) Line 1322	C++
 	xul.dll!NS_ProcessNextEvent(0x01a84100, false) Line 472	C++
 	xul.dll!mozilla::ipc::MessagePump::Run(0x0133f778) Line 96	C++
 	xul.dll!mozilla::ipc::MessagePumpForChildProcess::Run(0x0133f778) Line 302	C++
 	xul.dll!MessageLoop::RunInternal() Line 239	C++
 	xul.dll!MessageLoop::RunHandler() Line 232	C++
 	xul.dll!MessageLoop::Run() Line 212	C++
 	xul.dll!nsBaseAppShell::Run() Line 158	C++
 	xul.dll!nsAppShell::Run() Line 271	C++
 	xul.dll!XRE_RunAppShell() Line 896	C++
 	xul.dll!mozilla::ipc::MessagePumpForChildProcess::Run(0x0133f778) Line 269	C++
 	xul.dll!MessageLoop::RunInternal() Line 239	C++
 	xul.dll!MessageLoop::RunHandler() Line 232	C++
 	xul.dll!MessageLoop::Run() Line 212	C++
 	xul.dll!XRE_InitChildProcess(13, 0x01a03060, 0x0133f850) Line 716	C++
in case that helps:

aURL =
Maybe S-C knows (he wrote the patches in bug 1015466)?
Flags: needinfo?(schien)
The assertion is complaining about an JS script loaded and claim it it not a tracker to document but document found it is a tracker based on previous history.

I hit this assertion some time while testing bug 1357689 and it disappeared with the part 5 of bug 1015466 applied. Maybe there are some other situation that will trigger the same crash stack.

I kinda remember seeing MOZ_LOG that shows nsIParentChannel::NotifyTrackingResource fired after OnStopRequest and might be the same issue as @mayhemer encountered.

Anyway I'll track down this assertion and figure out the root cause.
Assignee: nobody → schien
Flags: needinfo?(schien)
Priority: -- → P3
I'm getting this a lot in testing today. I just visit Reddit and it asserts maybe half the time during page load.
Not be able to reproduce this issue locally, is anyone seeing this assertion recently? I'm thinking about closing this issue as "works for me" if no one hit this assertion for a while.
This is still reproducible in bug 1337783 comment #14 recently.
Closed: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1337783
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.