Closed Bug 1554422 Opened 5 years ago Closed 5 years ago

Content process stuck in seemingly infinite loop setting cookies

Categories

(Core :: Networking: Cookies, defect, P1)

defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox69 --- affected

People

(Reporter: bugzilla, Assigned: bugzilla)

Details

(Whiteboard: [necko-triaged])

Sorry, I didn't have the profiler running at the time and my browser was too messed up to be able to change that, but I was able to sample some stacks using Process Explorer.

Today's Nightly.

STR:

  1. Open a tab in the "Shopping" container and go to mets.com;
  2. Go to the menu at the top of the page and hover over TICKETS;
  3. Click My Mets Tickets;

Watch as Firefox becomes unresponsive and the CPU utilization of the main threads of both the browser process and the content process become pinned. Parent process memory consumption steadily increases (when I finally killed it, the parent was consuming in excess of 12GiB). The only way to recover from this is to forcibly kill the spinning content process.

It might be very well possible that the site is causing some of this, but given that this is kind of a DoS, we might want to do something about it. I'll try to capture a full profile if I can, but in the meantime, here are the stacks I captured from Process Explorer:

Parent Process:

xul.dll!mozilla::net::IsSpecialProtocol+0xe4
xul.dll!mozilla::net::nsStandardURL::SetSpecWithEncoding+0x1ff
xul.dll!mozilla::net::nsStandardURL::TemplatedMutator<mozilla::net::nsStandardURL>::Init+0xc0
xul.dll!mozilla::net::NewURI+0x266
xul.dll!mozilla::net::nsIOService::NewURI+0x15f
xul.dll!NS_NewURI+0xad
xul.dll!mozilla::ipc::PrincipalInfoToPrincipal+0x8b
xul.dll!mozilla::net::CookieSettings::Deserialize+0x7a
xul.dll!mozilla::ipc::LoadInfoArgsToLoadInfo+0x38b
xul.dll!mozilla::net::CookieServiceParent::RecvSetCookieString+0x7e
xul.dll!mozilla::net::PCookieServiceParent::OnMessageReceived+0xcde
xul.dll!mozilla::dom::PContentParent::OnMessageReceived+0x1bf
xul.dll!mozilla::ipc::MessageChannel::DispatchMessage+0x1b9
xul.dll!mozilla::ipc::MessageChannel::MessageTask::Run+0x4f
xul.dll!nsThread::ProcessNextEvent+0xb25
xul.dll!NS_ProcessNextEvent+0x41
xul.dll!mozilla::ipc::MessagePump::Run+0x109
xul.dll!MessageLoop::RunHandler+0x28
xul.dll!MessageLoop::Run+0x51
xul.dll!nsBaseAppShell::Run+0x28
xul.dll!nsAppShell::Run+0xd1
xul.dll!nsAppStartup::Run+0x22
xul.dll!XREMain::XRE_mainRun+0x632
xul.dll!XREMain::XRE_main+0x383
xul.dll!XRE_main+0x9c
firefox.exe!NS_internal_main+0x151
firefox.exe!wmain+0x215
firefox.exe!__scrt_common_main_seh+0x10c
KERNEL32.DLL!BaseThreadInitThunk+0x14
ntdll.dll!RtlUserThreadStart+0x21

Content Process:

xul.dll!nsTArray_Impl<mozilla::net::CookiePermissionData,nsTArrayInfallibleAllocator>::AppendElement<mozilla::net::CookiePermissionData,nsTArrayInfallibleAllocator>+0x24
xul.dll!mozilla::net::CookieSettings::Serialize+0xf0
xul.dll!mozilla::ipc::LoadInfoToLoadInfoArgs+0xcdb
xul.dll!mozilla::net::CookieServiceChild::SetCookieStringInternal+0x486
xul.dll!mozilla::net::CookieServiceChild::SetCookieString+0x20
xul.dll!mozilla::dom::Document::SetCookie+0x199
xul.dll!mozilla::dom::Document_Binding::set_cookie+0xc2
xul.dll!mozilla::dom::binding_detail::GenericSetter<mozilla::dom::binding_detail::NormalThisPolicy>+0x11b
xul.dll!js::InternalCallOrConstruct+0x21b
xul.dll!js::CallSetter+0x184
xul.dll!SetExistingProperty+0x4f2
xul.dll!js::NativeSetProperty<js::Qualified>+0x35e
xul.dll!js::SetPropertyIgnoringNamedGetter+0x127
xul.dll!mozilla::dom::DOMProxyHandler::set+0x107
xul.dll!js::Proxy::set+0xe1
xul.dll!Interpret+0x6d81
xul.dll!js::RunScript+0x26a
xul.dll!js::InternalCallOrConstruct+0x405
xul.dll!js::Call+0xd4
xul.dll!JS::Call+0x1a9
xul.dll!mozilla::dom::Function::Call+0x155
xul.dll!nsGlobalWindowInner::RunTimeoutHandler+0x28a
xul.dll!mozilla::dom::TimeoutManager::RunTimeout+0x4c6
xul.dll!mozilla::dom::TimeoutExecutor::MaybeExecute+0x12c
xul.dll!mozilla::dom::TimeoutExecutor::Notify+0x13
xul.dll!nsTimerImpl::Fire+0x3a0
xul.dll!nsTimerEvent::Run+0x44
xul.dll!mozilla::ThrottledEventQueue::Inner::ExecuteRunnable+0xcf
xul.dll!mozilla::ThrottledEventQueue::Inner::Executor::Run+0xd
xul.dll!mozilla::SchedulerGroup::Runnable::Run+0x2f
xul.dll!nsThread::ProcessNextEvent+0xb25
xul.dll!NS_ProcessNextEvent+0x41
xul.dll!mozilla::ipc::MessagePump::Run+0x109
xul.dll!MessageLoop::RunHandler+0x28
xul.dll!MessageLoop::Run+0x51
xul.dll!nsBaseAppShell::Run+0x28
xul.dll!nsAppShell::Run+0xd1
xul.dll!XRE_RunAppShell+0x45
xul.dll!MessageLoop::RunHandler+0x28
xul.dll!MessageLoop::Run+0x51
xul.dll!XRE_InitChildProcess+0x690
firefox.exe!content_process_main+0x9a
firefox.exe!NS_internal_main+0x29a
firefox.exe!wmain+0x215
firefox.exe!__scrt_common_main_seh+0x10c
KERNEL32.DLL!BaseThreadInitThunk+0x14
ntdll.dll!RtlUserThreadStart+0x21

I tried taking a profile with the Gecko Profiler, but the parent process is hung so badly that it cannot service the request.

So far I am 0 for 2 in reproducing this since bug 1547813 has landed. I'm going to leave this open until I have a few more repro attempts under my belt to verify.

Honza, can you take a look?

Flags: needinfo?(honzab.moz)
Priority: -- → P1
Whiteboard: [necko-triaged]

Aaron, according comment 2 I will reassign to you. Feel free to bounce back.

Assignee: nobody → aklotz

ni? myself to try this again when I get a chance.

Flags: needinfo?(aklotz)
Flags: needinfo?(honzab.moz)

This seems to be working for me now, so I'm going to dupe this over to bug 1547813.

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(aklotz)
Resolution: --- → DUPLICATE

How was bug 1547813 related to this, out of curiosity?

Flags: needinfo?(aklotz)

I cannot recall, I think somebody on Slack pointed me to that bug. Feel free to change this bug's resolution to WORKSFORME if it doesn't make sense.

Flags: needinfo?(aklotz)
Resolution: DUPLICATE → WORKSFORME
You need to log in before you can comment on or make changes to this bug.