Closed Bug 2009849 Opened 1 day ago Closed 3 hours ago

Sports Illustrated article reloads itself over and over in Firefox

Categories

(Web Compatibility :: Site Reports, defect, P1)

Tracking

(Webcompat Priority:P1, Webcompat Score:9, firefox-esr140 unaffected, firefox147 affected, firefox148 affected, firefox149 fixed)

RESOLVED FIXED
149 Branch
Webcompat Priority P1
Webcompat Score 9
Tracking Status
firefox-esr140 --- unaffected
firefox147 --- affected
firefox148 --- affected
firefox149 --- fixed

People

(Reporter: dholbert, Assigned: jrmuizel, NeedInfo)

References

(Blocks 1 open bug, Regression, )

Details

(Keywords: regression, webcompat:needs-diagnosis, webcompat:site-report, Whiteboard: [webcompat:sightline])

User Story

platform:windows,mac,linux,android
impact:site-broken
configuration:general
affects:all
branch:release
diagnosis-team:webcompat
user-impact-score:2000

Attachments

(3 files)

STR:

  1. Load https://www.si.com/nfl/ben-johnson-blunt-one-liner-handshake-with-matt-lafleur in Firefox (in a fresh profile, with no content blocking extensions installed)

ACTUAL RESULTS:
The page flashes a brief rendering of its content and then goes blank, reloading itself. This repeats over and over.

EXPECTED RESULTS:
No such blank rendering / self-reloading.

I reproduced the issue in Nightly 148 and release 146.0.1 in a fresh profile on Ubuntu 25.10.

The issue doesn't reproduce in another profile where I've got uBlock origin installed (likely because the issue involves some ad-related script that uBlock nerfs).

The issue doesn't reproduce in Chrome, though I did notice that the tab loading throbber does animate for a long time in Chrome (i.e. the page is still considering itself to be loading for quite a while after the content has shown up).

I can reproduce on Android as well (just tested Nightly 148 there).

Severity: -- → S2
User Story: (updated)
Webcompat Priority: --- → P1
Webcompat Score: --- → 10
Priority: -- → P1
Attached video screencast of bug

Performance profile: https://share.firefox.dev/4sDxvd2

Another profile, now with sample frequency dialed up to the max (attempting to sample every 0.01ms): https://share.firefox.dev/3LJIZuT

In the Web Console, I see two copies of this exception, right around when the page reloads each time:

Uncaught (in promise) DOMException: Node.removeChild: The node to be removed is not a child of this node
    r embeds.tsx:45
    l embeds.js:1
    promise callback*u embeds.js:1
    t embeds.js:1
[...]

Seems like that might be associated with the reload (though I don't know if this is an upstream cause vs. a downstream effect of whatever is triggering the reload).

If I watch the URL bar carefully, I can see it ping-ponging back and forth between these two URLs:

https://www.si.com/nfl/rivals-ben-johnson-matt-lafleur-icy-handshake-bears-packers
https://www.si.com/nfl/ben-johnson-savage-line-matt-lafleur-resurfaces-after-bears-send-packers-home

(That's not shown in my earlier screencast, but I am seeing it locally right now at least.)

In Chrome, the URLs in comment 6 load just fine, but I can trigger the navigation from the first URL to the second URL if I scroll down all the way (and dismiss a modal popup that appears at one point).

It looks like maybe there's an intersection observer that navigates to the next news article (maybe just using the DOM pushState API or similar) when you scroll down far enough. I wonder if that intersection observer is being prematurely triggered in Firefox for some reason.

Regression range: https://hg-edge.mozilla.org/integration/autoland/pushloghtml?fromchange=7de8dcc3a2e176149c35bd9c7e83662c6746655e&tochange=9ec7e6a99e488e2df7de24aea690efde6a940aaf

This is a regression from bug 1982924.

As additional confirmation, this is reliably "bad":

mozregression --repo autoland --launch 9ec7e6a99e488e2df7de24aea690efde6a940aaf -a https://www.si.com/nfl/ben-johnson-blunt-one-liner-handshake-with-matt-lafleur

...whereas this is reliably "good" (launching the build for the parent commit):

mozregression --repo autoland --launch 7de8dcc3a2e176149c35bd9c7e83662c6746655e -a https://www.si.com/nfl/ben-johnson-blunt-one-liner-handshake-with-matt-lafleur

Jeff, could you take a look?

(I noticed while bisecting that occasionally "good" builds do have a single reload but typically no more than that; and occasionally "bad" builds do stabilize at some arbitrary point, but you can confirm they're really bad by shift+reloading to nudge them to cycle forever. Given that & given the nature of the regressor, I susepct this is a race condition in Sports Illustrated's JavaScript -- i.e. a site bug, with a flaky dependency on load-ordering or something -- and we happen to come out on the wrong side of the race condition, with the change that bug 1982924 made.)

Flags: needinfo?(jmuizelaar)
Keywords: regression
Regressed by: 1982924
Whiteboard: [webcompat:sightline]

The problem isn't specific to the articles that I've linked here. I see the same issue if I just load https://www.si.com/ and click the first entry under "Top Headlines" (in a fresh profile with no add-ons installed).

(Once we've got this addressed, we should let the new-tab recommendations team know (e.g. ping @Corrie and/or post an update to the thread in https://mozilla.slack.com/archives/C01LH6AM3KJ/p1768255327158919 ), since this is impacting Sports Illustrated recommended-articles that we show on new-tab page -- and I think we may temporarily avoid showing this publisher there, to avoid steering users towards a known-bad experience. Once this is mitigated, the new-tab team can add these articles back into the mix.)

I can't reproduce this.

Flags: needinfo?(jmuizelaar)

In Canada I get a cookie popup, but even when I VPN into the US I don't see it.

I reproduced it now.

I noticed the site is using OneTrust.

Also the reloading is coming from PContent::Msg_NotifyOnHistoryReload

Here's the stack for the reload:

(root) []
start [dyld]
main [/Users/jrmuizel/source/gecko-inbound/ipc/app/MozillaRuntimeMain.cpp:93]
XRE_InitChildProcess []
XRE_InitChildProcess(int, char**, XREChildData const*) [/Users/jrmuizel/source/gecko-inbound/toolkit/xre/nsEmbedFunctions.cpp:594]
MessageLoop::Run() [/Users/jrmuizel/source/gecko-inbound/ipc/chromium/src/base/message_loop.cc:343]
MessageLoop::RunHandler() [/Users/jrmuizel/source/gecko-inbound/ipc/chromium/src/base/message_loop.cc:361]
MessageLoop::RunInternal() [/Users/jrmuizel/source/gecko-inbound/ipc/chromium/src/base/message_loop.cc:368]
XRE_RunAppShell() [/Users/jrmuizel/source/gecko-inbound/toolkit/xre/nsEmbedFunctions.cpp:656]
nsAppShell::Run() [/Users/jrmuizel/source/gecko-inbound/widget/cocoa/nsAppShell.mm:865]
nsBaseAppShell::Run() [/Users/jrmuizel/source/gecko-inbound/widget/nsBaseAppShell.cpp:152]
MessageLoop::Run() [/Users/jrmuizel/source/gecko-inbound/ipc/chromium/src/base/message_loop.cc:343]
MessageLoop::RunHandler() [/Users/jrmuizel/source/gecko-inbound/ipc/chromium/src/base/message_loop.cc:361]
MessageLoop::RunInternal() [/Users/jrmuizel/source/gecko-inbound/ipc/chromium/src/base/message_loop.cc:368]
mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [/Users/jrmuizel/source/gecko-inbound/ipc/glue/MessagePump.cpp:85]
NS_ProcessNextEvent(nsIThread*, bool) [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/nsThreadUtils.cpp:461]
nsThread::ProcessNextEvent(bool, bool*) [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/nsThread.cpp:1164]
mozilla::detail::RunnableFunction<mozilla::TaskController::TaskController()::$_0>::Run() [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/nsThreadUtils.h:549]
mozilla::TaskController::TaskController()::$_0::operator()() const [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/TaskController.cpp:333]
mozilla::TaskController::ProcessPendingMTTask(bool) [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/TaskController.cpp:641]
mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/TaskController.cpp:1190]
mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/TaskController.cpp:1325]
Task IdleRunnableWrapper for TimeoutExecutor Runnable []
mozilla::TaskController::RunTask(mozilla::Task*) [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/TaskController.cpp:207]
mozilla::RunnableTask::Run() [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/TaskController.cpp:705]
IdleRunnableWrapper::Run() [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/nsThreadUtils.cpp:307]
mozilla::dom::TimeoutExecutor::Run() [/Users/jrmuizel/source/gecko-inbound/dom/base/TimeoutExecutor.cpp:234]
mozilla::dom::TimeoutExecutor::MaybeExecute() [/Users/jrmuizel/source/gecko-inbound/dom/base/TimeoutExecutor.cpp:179]
mozilla::dom::TimeoutManager::RunTimeout(mozilla::TimeStamp const&, mozilla::TimeStamp const&, bool) [/Users/jrmuizel/source/gecko-inbound/dom/base/TimeoutManager.cpp:956]
nsGlobalWindowInner::RunTimeoutHandler(mozilla::dom::Timeout*) [/Users/jrmuizel/source/gecko-inbound/dom/base/nsGlobalWindowInner.cpp:6391]
mozilla::dom::CallbackTimeoutHandler::Call(char const*) [/Users/jrmuizel/source/gecko-inbound/dom/base/TimeoutHandler.cpp:169]
setTimeout handler []
mozilla::dom::Function::Call<nsCOMPtr<nsIGlobalObject> >(nsCOMPtr<nsIGlobalObject> const&, nsTArray<JS::Value> const&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObjectBase::ExceptionHandling, JS::Realm*) [/Users/jrmuizel/source/gecko-inbound/obj-opt/dist/include/mozilla/dom/FunctionBinding.h:71]
mozilla::dom::Function::Call(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, nsTArray<JS::Value> const&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&) [/Users/jrmuizel/source/gecko-inbound/obj-opt/dom/bindings/./FunctionBinding.cpp:50]
JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/CallAndConstruct.cpp:119]
js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:685]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:653]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:618]
js::RunScript []
H/</f< [https://www.si.com/nfl/ben-johnson-blunt-one-liner-handshake-with-matt-lafleur line 3 > injectedScript:1:2138]
0xd247fcdf28 []
0xd247bac56c []
js::fun_call(JSContext*, unsigned int, JS::Value*) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/JSFunction.cpp:1107]
js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:685]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:653]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:618]
js::RunScript []
v.prototype.updateGtmMacros/< [https://cdn-ukwest.onetrust.com/scripttemplates/otSDKStub.js:1:17826]
js::Interpret(JSContext*, js::RunState&) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:3272]
js::CallFromStack(JSContext*, JS::CallArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:658]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:653]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:586]
CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:490]
mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::MaybeCrossOriginObjectThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) [/Users/jrmuizel/source/gecko-inbound/dom/bindings/BindingUtils.cpp:3306]
EventTarget.dispatchEvent []
mozilla::dom::EventTarget_Binding::dispatchEvent(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&) [/Users/jrmuizel/source/gecko-inbound/obj-opt/dom/bindings/./EventTargetBinding.cpp:1084]
nsGlobalWindowInner::DispatchEvent(mozilla::dom::Event&, mozilla::dom::CallerType, mozilla::ErrorResult&) [/Users/jrmuizel/source/gecko-inbound/dom/base/nsGlobalWindowInner.cpp:4260]
EventDispatcher::Dispatch []
EventDispatcher::Dispatch consent.onetrust []
mozilla::EventDispatcher::Dispatch(mozilla::dom::EventTarget*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) [/Users/jrmuizel/source/gecko-inbound/dom/events/EventDispatcher.cpp:1252]
mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) [/Users/jrmuizel/source/gecko-inbound/dom/events/EventDispatcher.cpp:605]
mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) [/Users/jrmuizel/source/gecko-inbound/dom/events/EventListenerManager.cpp:1499]
mozilla::EventListenerManager::HandleEventWithListenerArray(mozilla::EventListenerManager::ListenerArray*, nsAtom*, mozilla::EventMessage, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, bool) [/Users/jrmuizel/source/gecko-inbound/dom/events/EventListenerManager.cpp:1594]
EventListener.handleEvent []
mozilla::EventListenerManager::HandleEventSingleListener(mozilla::EventListenerManager::Listener*, nsAtom*, mozilla::WidgetEvent*, mozilla::dom::Event*, mozilla::dom::EventTarget*, bool) [/Users/jrmuizel/source/gecko-inbound/dom/events/EventListenerManager.cpp:1282]
mozilla::dom::EventListener::HandleEvent<mozilla::dom::EventTarget*>(mozilla::dom::EventTarget* const&, mozilla::dom::Event&, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObjectBase::ExceptionHandling, JS::Realm*) [/Users/jrmuizel/source/gecko-inbound/obj-opt/dist/include/mozilla/dom/EventListenerBinding.h:65]
mozilla::dom::EventListener::HandleEvent(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::dom::Event&, mozilla::ErrorResult&) [/Users/jrmuizel/source/gecko-inbound/obj-opt/dom/bindings/./EventListenerBinding.cpp:62]
JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/CallAndConstruct.cpp:119]
js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:685]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:653]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:618]
js::RunScript []
OptanonWrapper/< [https://www.si.com/nfl/ben-johnson-blunt-one-liner-handshake-with-matt-lafleur:79:22]
js::Interpret(JSContext*, js::RunState&) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:3272]
js::CallFromStack(JSContext*, JS::CallArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:658]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:653]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:586]
CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:490]
mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::MaybeCrossOriginObjectThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) [/Users/jrmuizel/source/gecko-inbound/dom/bindings/BindingUtils.cpp:3306]
Location.reload []
mozilla::dom::Location_Binding::reload(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&) [/Users/jrmuizel/source/gecko-inbound/obj-opt/dom/bindings/./LocationBinding.cpp:1072]
mozilla::dom::Location::Reload(JSContext*, bool, nsIPrincipal&, mozilla::ErrorResult&) [/Users/jrmuizel/source/gecko-inbound/dom/base/Location.cpp:599]
nsDocShell::ReloadNavigable(mozilla::Maybe<mozilla::NotNull<JSContext*> >, unsigned int, nsIStructuredCloneContainer*, mozilla::dom::UserNavigationInvolvement, mozilla::dom::NavigationAPIMethodTracker*) [/Users/jrmuizel/source/gecko-inbound/docshell/base/nsDocShell.cpp:4240]
AutoProfilerUntypedMarker::~AutoProfilerUntypedMarker() [/Users/jrmuizel/source/gecko-inbound/obj-opt/dist/include/mozilla/ProfilerMarkers.h:394]
Blocks: onetrust
Webcompat Score: 10 → 9

Set release status flags based on info from the regressing bug 1982924

Seems a lot like the problem described in bug 1989311 comment 3

Here's the stack for the initiation of the load of https://cdn-ukwest.onetrust.com/scripttemplates/202502.1.0/otBannerSdk.js

start [dyld]
main [/Users/jrmuizel/source/gecko-inbound/ipc/app/MozillaRuntimeMain.cpp:93]
XRE_InitChildProcess []
XRE_InitChildProcess(int, char**, XREChildData const*) [/Users/jrmuizel/source/gecko-inbound/toolkit/xre/nsEmbedFunctions.cpp:594]
MessageLoop::Run() [/Users/jrmuizel/source/gecko-inbound/ipc/chromium/src/base/message_loop.cc:343]
MessageLoop::RunHandler() [/Users/jrmuizel/source/gecko-inbound/ipc/chromium/src/base/message_loop.cc:361]
MessageLoop::RunInternal() [/Users/jrmuizel/source/gecko-inbound/ipc/chromium/src/base/message_loop.cc:368]
XRE_RunAppShell() [/Users/jrmuizel/source/gecko-inbound/toolkit/xre/nsEmbedFunctions.cpp:656]
nsAppShell::Run() [/Users/jrmuizel/source/gecko-inbound/widget/cocoa/nsAppShell.mm:865]
nsBaseAppShell::Run() [/Users/jrmuizel/source/gecko-inbound/widget/nsBaseAppShell.cpp:152]
MessageLoop::Run() [/Users/jrmuizel/source/gecko-inbound/ipc/chromium/src/base/message_loop.cc:343]
MessageLoop::RunHandler() [/Users/jrmuizel/source/gecko-inbound/ipc/chromium/src/base/message_loop.cc:361]
MessageLoop::RunInternal() [/Users/jrmuizel/source/gecko-inbound/ipc/chromium/src/base/message_loop.cc:368]
mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [/Users/jrmuizel/source/gecko-inbound/ipc/glue/MessagePump.cpp:85]
NS_ProcessNextEvent(nsIThread*, bool) [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/nsThreadUtils.cpp:461]
nsThread::ProcessNextEvent(bool, bool*) [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/nsThread.cpp:1164]
mozilla::detail::RunnableFunction<mozilla::TaskController::TaskController()::$_0>::Run() [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/nsThreadUtils.h:549]
mozilla::TaskController::TaskController()::$_0::operator()() const [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/TaskController.cpp:333]
mozilla::TaskController::ProcessPendingMTTask(bool) [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/TaskController.cpp:641]
mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/TaskController.cpp:1148]
mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/TaskController.cpp:1325]
Task DeprioritizedLoadRunner []
mozilla::TaskController::RunTask(mozilla::Task*) [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/TaskController.cpp:207]
mozilla::RunnableTask::Run() [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/TaskController.cpp:705]
mozilla::dom::BrowsingContext::DeprioritizedLoadRunner::Run() [/Users/jrmuizel/source/gecko-inbound/obj-opt/dist/include/mozilla/dom/BrowsingContext.h:1653]
mozilla::dom::XMLHttpRequestDoneNotifier::Run() [/Users/jrmuizel/source/gecko-inbound/dom/xhr/XMLHttpRequestMainThread.h:835]
mozilla::dom::XMLHttpRequestMainThread::ChangeStateToDoneInternal() [/Users/jrmuizel/source/gecko-inbound/dom/xhr/XMLHttpRequestMainThread.cpp]
mozilla::dom::XMLHttpRequestMainThread::DispatchProgressEvent(mozilla::DOMEventTargetHelper*, mozilla::dom::XMLHttpRequest::ProgressEventType const&, long long, long long) [/Users/jrmuizel/source/gecko-inbound/dom/xhr/XMLHttpRequestMainThread.cpp:1444]
mozilla::dom::EventTarget::DispatchEvent(mozilla::dom::Event&) [/Users/jrmuizel/source/gecko-inbound/dom/events/EventTarget.cpp:215]
mozilla::DOMEventTargetHelper::DispatchEvent(mozilla::dom::Event&, mozilla::dom::CallerType, mozilla::ErrorResult&) [/Users/jrmuizel/source/gecko-inbound/dom/events/DOMEventTargetHelper.cpp:153]
EventDispatcher::Dispatch []
EventDispatcher::Dispatch load []
mozilla::EventDispatcher::Dispatch(mozilla::dom::EventTarget*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) [/Users/jrmuizel/source/gecko-inbound/dom/events/EventDispatcher.cpp:1252]
mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) [/Users/jrmuizel/source/gecko-inbound/dom/events/EventDispatcher.cpp:605]
mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) [/Users/jrmuizel/source/gecko-inbound/dom/events/EventListenerManager.cpp:1499]
mozilla::EventListenerManager::HandleEventWithListenerArray(mozilla::EventListenerManager::ListenerArray*, nsAtom*, mozilla::EventMessage, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, bool) [/Users/jrmuizel/source/gecko-inbound/dom/events/EventListenerManager.cpp:1594]
mozilla::EventListenerManager::HandleEventSingleListener(mozilla::EventListenerManager::Listener*, nsAtom*, mozilla::WidgetEvent*, mozilla::dom::Event*, mozilla::dom::EventTarget*, bool) [/Users/jrmuizel/source/gecko-inbound/dom/events/EventListenerManager.cpp:1288]
EventHandlerNonNull []
mozilla::JSEventHandler::HandleEvent(mozilla::dom::Event*) [/Users/jrmuizel/source/gecko-inbound/dom/events/JSEventHandler.cpp:201]
mozilla::dom::EventHandlerNonNull::Call<nsCOMPtr<mozilla::dom::EventTarget> >(nsCOMPtr<mozilla::dom::EventTarget> const&, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObjectBase::ExceptionHandling, JS::Realm*) [/Users/jrmuizel/source/gecko-inbound/obj-opt/dist/include/mozilla/dom/EventHandlerBinding.h:82]
mozilla::dom::EventHandlerNonNull::Call(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&) [/Users/jrmuizel/source/gecko-inbound/obj-opt/dom/bindings/./EventHandlerBinding.cpp:65]
JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/CallAndConstruct.cpp:119]
js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:685]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:653]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:618]
js::RunScript []
v.prototype.otFetch/s.onload [https://cdn-ukwest.onetrust.com/scripttemplates/otSDKStub.js:1:13140]
js::Interpret(JSContext*, js::RunState&) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:3272]
js::CallFromStack(JSContext*, JS::CallArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:658]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:653]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:572]
CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:490]
js::BoundFunctionObject::call(JSContext*, unsigned int, JS::Value*) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/BoundFunctionObject.cpp:72]
js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:685]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:653]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:618]
js::RunScript []
v.prototype.geoLocationJsonCallback [https://cdn-ukwest.onetrust.com/scripttemplates/otSDKStub.js:1:12096]
v/this.addBannerSDKScript [https://cdn-ukwest.onetrust.com/scripttemplates/otSDKStub.js:1:21194]
e [https://cdn-ukwest.onetrust.com/scripttemplates/otSDKStub.js:1:50]
js::Interpret(JSContext*, js::RunState&) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:3257]
js::ConstructFromStack(JSContext*, JS::CallArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:761]
InternalConstruct(JSContext*, js::AnyConstructArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:714]
CallJSNativeConstructor(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:508]
CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:490]
PromiseConstructor(JSContext*, unsigned int, JS::Value*) [/Users/jrmuizel/source/gecko-inbound/js/src/builtin/Promise.cpp:3258]
js::PromiseObject::create(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, bool) [/Users/jrmuizel/source/gecko-inbound/js/src/builtin/Promise.cpp:3356]
js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:685]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:653]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:618]
js::RunScript []
e/OneTrustStub< [https://cdn-ukwest.onetrust.com/scripttemplates/otSDKStub.js:1:299]
u/t/OneTrustStub [https://cdn-ukwest.onetrust.com/scripttemplates/otSDKStub.js:1:1329]
js::Interpret(JSContext*, js::RunState&) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:3272]
js::CallFromStack(JSContext*, JS::CallArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:658]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:653]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:586]
CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:490]
js::fun_call(JSContext*, unsigned int, JS::Value*) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/JSFunction.cpp:1107]
js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:685]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:653]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:618]
js::RunScript []
v/this.addBannerSDKScript/OneTrustStub</< [https://cdn-ukwest.onetrust.com/scripttemplates/otSDKStub.js:1:23366]
v.prototype.jsonp [https://cdn-ukwest.onetrust.com/scripttemplates/otSDKStub.js:1:13861]
js::Interpret(JSContext*, js::RunState&) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:3272]
js::CallFromStack(JSContext*, JS::CallArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:658]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:653]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:586]
CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) [/Users/jrmuizel/source/gecko-inbound/js/src/vm/Interpreter.cpp:490]
mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) [/Users/jrmuizel/source/gecko-inbound/dom/bindings/BindingUtils.cpp:3306]
Node.appendChild []
mozilla::dom::Node_Binding::appendChild(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&) [/Users/jrmuizel/source/gecko-inbound/obj-opt/dom/bindings/./NodeBinding.cpp:950]
nsINode::AppendChild(nsINode&, mozilla::ErrorResult&) [/Users/jrmuizel/source/gecko-inbound/dom/base/nsINode.h:2404]
nsINode::AppendChildInternal(nsINode&, MutationEffectOnScript, mozilla::ErrorResult&) [/Users/jrmuizel/source/gecko-inbound/dom/base/nsINode.h:2410]
nsINode::InsertBeforeInternal(nsINode&, nsINode*, MutationEffectOnScript, mozilla::ErrorResult&) [/Users/jrmuizel/source/gecko-inbound/dom/base/nsINode.h:2396]
nsINode::ReplaceOrInsertBefore(bool, nsINode*, nsINode*, MutationEffectOnScript, mozilla::ErrorResult&) [/Users/jrmuizel/source/gecko-inbound/dom/base/nsINode.cpp:3152]
nsINode::InsertChildBefore(nsIContent*, nsIContent*, bool, mozilla::ErrorResult&, nsINode*, MutationEffectOnScript) [/Users/jrmuizel/source/gecko-inbound/dom/base/nsINode.cpp:1753]
mozilla::dom::HTMLScriptElement::BindToTree(mozilla::dom::BindContext&, nsINode&) [/Users/jrmuizel/source/gecko-inbound/dom/html/HTMLScriptElement.cpp:68]
mozilla::dom::ScriptElement::MaybeProcessScript(nsCOMPtr<nsIParser>) [/Users/jrmuizel/source/gecko-inbound/dom/script/ScriptElement.cpp:162]
mozilla::dom::ScriptElement::MaybeProcessScript(nsTSubstring<char16_t> const&) [/Users/jrmuizel/source/gecko-inbound/dom/script/ScriptElement.cpp:289]
mozilla::dom::ScriptLoader::ProcessScriptElement(nsIScriptElement*, nsTSubstring<char16_t> const&) [/Users/jrmuizel/source/gecko-inbound/dom/script/ScriptLoader.cpp:1320]
mozilla::dom::ScriptLoader::ProcessExternalScript(nsIScriptElement*, JS::loader::ScriptKind, nsIContent*) [/Users/jrmuizel/source/gecko-inbound/dom/script/ScriptLoader.cpp:1445]
mozilla::dom::ScriptLoader::StartLoad(JS::loader::ScriptLoadRequest*, mozilla::Maybe<nsTAutoStringN<char16_t, (unsigned long)64> > const&) [/Users/jrmuizel/source/gecko-inbound/dom/script/ScriptLoader.cpp:630]
mozilla::dom::ScriptLoader::StartClassicLoad(JS::loader::ScriptLoadRequest*, mozilla::Maybe<nsTAutoStringN<char16_t, (unsigned long)64> > const&) [/Users/jrmuizel/source/gecko-inbound/dom/script/ScriptLoader.cpp:670]
mozilla::dom::ScriptLoader::StartLoadInternal(JS::loader::ScriptLoadRequest*, unsigned int, mozilla::Maybe<nsTAutoStringN<char16_t, (unsigned long)64> > const&) [/Users/jrmuizel/source/gecko-inbound/dom/script/ScriptLoader.cpp:1028]
HttpChannelChild::AsyncOpen []
mozilla::net::HttpChannelChild::AsyncOpen(nsIStreamListener*) [/Users/jrmuizel/source/gecko-inbound/netwerk/protocol/http/HttpChannelChild.cpp:2278]
mozilla::net::HttpChannelChild::AsyncOpenInternal(nsIStreamListener*) [/Users/jrmuizel/source/gecko-inbound/netwerk/protocol/http/HttpChannelChild.cpp:2399]
mozilla::net::HttpChannelChild::ContinueAsyncOpen() [/Users/jrmuizel/source/gecko-inbound/netwerk/protocol/http/HttpChannelChild.cpp:2631]
mozilla::net::nsSocketTransportService::Dispatch(already_AddRefed<nsIRunnable>, nsIEventTarget::DispatchFlags) [/Users/jrmuizel/source/gecko-inbound/netwerk/base/nsSocketTransportService2.cpp:290]
mozilla::ThreadEventTarget::Dispatch(already_AddRefed<nsIRunnable>, nsIEventTarget::DispatchFlags) [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/ThreadEventTarget.cpp:92]
mozilla::ThreadEventQueue::PutEventInternal(RefPtr<nsIRunnable>&, mozilla::EventQueuePriority, mozilla::ThreadEventQueue::NestedSink*) [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/ThreadEventQueue.cpp]
mozilla::detail::EventQueueInternal<(unsigned long)16>::PutEvent(already_AddRefed<nsIRunnable>&&, mozilla::EventQueuePriority, mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&, mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator>*) [/Users/jrmuizel/source/gecko-inbound/xpcom/threads/EventQueue.cpp:68]

That explains the connection to the change in timing of DeprioritizedLoadRunner in bug 1982924

Ksenia, confirmed that setting dom.timeout.defer_during_load appears to fix this.

That makes sense because we see code like:

      setTimeout(
        function () {
          n &&
          s &&
          window.dispatchEvent(n),
          r &&
          window.dispatchEvent(r)
        }
      )

and the dispatchEvent ends up getting reordered with code that installs the listener for consent.onetrust

  co.prototype.OnConsentChanged = function (e) {
      var t = e.toString();
      ao.consentChangedEventMap[t] ||
      (
        ao.consentChangedEventMap[t] = !0,
        window.addEventListener('consent.onetrust', e)
      )
    }

We can try adding *.si.com to dom.timeout.defer_during_load.force-disable remotely

Depends on: 1956326

Randal, can you own getting the pref changes in code and deployed?

Flags: needinfo?(rjesup)
Regressed by: 1270059

Ksenia, confirmed that setting dom.timeout.defer_during_load appears to fix the
infinite reloading.

That makes sense because we see code like:

  setTimeout(
    function () {
      n &&
      s &&
      window.dispatchEvent(n),
      r &&
      window.dispatchEvent(r)
    }
  )

and the dispatchEvent ends up getting reordered with code that installs the listener for consent.onetrust

co.prototype.OnConsentChanged = function (e) {
var t = e.toString();
ao.consentChangedEventMap[t] ||
(
ao.consentChangedEventMap[t] = !0,
window.addEventListener('consent.onetrust', e)
)
}

so that it fires after the listener has been installed instead of
before.

Assignee: nobody → jmuizelaar
Status: NEW → ASSIGNED

The pref flip has been deployed

Status: ASSIGNED → RESOLVED
Closed: 3 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch

The patch landed in nightly and beta is affected.
:jrmuizel, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

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

Attachment

General

Created:
Updated:
Size: