Assertion failure: gNeckoChild, at netwerk/base/Predictor.cpp:1242
Categories
(Core :: Networking, defect, P3)
Tracking
()
People
(Reporter: dholbert, Assigned: kershaw)
References
(Blocks 1 open bug, )
Details
(Keywords: assertion, pernosco, Whiteboard: [necko-triaged][necko-priority-queue])
Attachments
(1 file)
I just happened to hit this fatal assertion, in a local debug build, which I was only running for a few seconds:
[Child 289686, Main Thread] WARNING: NS_ENSURE_TRUE(gNeckoChild != nullptr) failed: file netwerk/protocol/http/HttpChannelChild.cpp:2008
Assertion failure: gNeckoChild, at netwerk/base/Predictor.cpp:1242
I started the build via ./mach run
(with no existing profile, so one was created for me); I visited about:config
, did a Ctrl+P print operation, and by that point this fatal assertion was already in my terminal output; though I didn't get any sort of crash UI or visible breakage in Firefox itself.
Fortunately I captured it in rr
(since I was recording to capture a different bug) and I'll submit it to pernosco.
Reporter | ||
Comment 1•2 years ago
|
||
I'm running an up-to-date debug build, from revision https://hg.mozilla.org/mozilla-central/rev/7ff758e0d08b .
Here's the backtrace (run through fix_stacks.py):
[Child 289686, Main Thread] WARNING: NS_ENSURE_TRUE(gNeckoChild != nullptr) failed: file /scratch/work/builds/mozilla-central/mozilla/netwerk/protocol/http/HttpChannelChild.cpp:2008
Assertion failure: gNeckoChild, at /scratch/work/builds/mozilla-central/mozilla/netwerk/base/Predictor.cpp:1242
#01: mozilla::net::Predictor::LearnNative(nsIURI*, nsIURI*, unsigned int, mozilla::OriginAttributes const&) (/scratch/work/builds/mozilla-central/mozilla/netwerk/base/Predictor.cpp:1242)
#02: mozilla::net::PredictorLearn(nsIURI*, nsIURI*, unsigned int, nsILoadGroup*) (/scratch/work/builds/mozilla-central/mozilla/netwerk/base/Predictor.cpp:1996)
#03: mozilla::dom::FontFaceSetDocumentImpl::StartLoad(gfxUserFontEntry*, unsigned int) (/scratch/work/builds/mozilla-central/mozilla/layout/style/FontFaceSetDocumentImpl.cpp:321)
#04: gfxUserFontEntry::DoLoadNextSrc(bool) (/scratch/work/builds/mozilla-central/mozilla/gfx/thebes/gfxUserFontSet.cpp:547)
#05: gfxUserFontEntry::LoadNextSrc() (/scratch/work/builds/mozilla-central/mozilla/gfx/thebes/gfxUserFontSet.cpp:380)
#06: gfxUserFontEntry::FontLoadFailed(nsIFontLoadCompleteCallback*) (/scratch/work/builds/mozilla-central/mozilla/gfx/thebes/gfxUserFontSet.cpp:0)
#07: gfxUserFontEntry::FontDataDownloadComplete(unsigned int, unsigned char const*, unsigned int, nsresult, nsIFontLoadCompleteCallback*) (/scratch/work/builds/mozilla-central/mozilla/gfx/thebes/gfxUserFontSet.cpp:865)
#08: nsFontFaceLoader::OnStreamComplete(nsIStreamLoader*, nsISupports*, nsresult, unsigned int, unsigned char const*) (/scratch/work/builds/mozilla-central/mozilla/layout/style/nsFontFaceLoader.cpp:299)
#09: mozilla::net::nsStreamLoader::OnStopRequest(nsIRequest*, nsresult) (/scratch/work/builds/mozilla-central/mozilla/netwerk/base/nsStreamLoader.cpp:85)
#10: nsCORSListenerProxy::OnStopRequest(nsIRequest*, nsresult) (/scratch/work/builds/mozilla-central/mozilla/netwerk/protocol/http/nsCORSListenerProxy.cpp:677)
#11: mozilla::net::HttpChannelChild::DoOnStopRequest(nsIRequest*, nsresult) (/scratch/work/builds/mozilla-central/mozilla/netwerk/protocol/http/HttpChannelChild.cpp:1055)
#12: mozilla::net::HttpChannelChild::OnStopRequest(nsresult const&, mozilla::net::ResourceTimingStructArgs const&, mozilla::net::nsHttpHeaderArray const&) (/scratch/work/builds/mozilla-central/mozilla/netwerk/protocol/http/HttpChannelChild.cpp:933)
#13: mozilla::net::HttpChannelChild::ProcessOnStopRequest(nsresult const&, mozilla::net::ResourceTimingStructArgs const&, mozilla::net::nsHttpHeaderArray const&, nsTArray<mozilla::net::ConsoleReportCollected>&&, bool)::$_23::operator()() (/scratch/work/builds/mozilla-central/mozilla/netwerk/protocol/http/HttpChannelChild.cpp:805)
#14: std::_Function_handler<void (), mozilla::net::HttpChannelChild::ProcessOnStopRequest(nsresult const&, mozilla::net::ResourceTimingStructArgs const&, mozilla::net::nsHttpHeaderArray const&, nsTArray<mozilla::net::ConsoleReportCollected>&&, bool)::$_23>::_M_invoke(std::_Any_data const&) (/scratch/work/builds/.mozbuild/sysroot-x86_64-linux-gnu/usr/include/c++/7.5.0/bits/std_function.h:318)
#15: std::function<void ()>::operator()() const (/scratch/work/builds/.mozbuild/sysroot-x86_64-linux-gnu/usr/include/c++/7.5.0/bits/std_function.h:706)
#16: mozilla::net::ChannelFunctionEvent::Run() (/scratch/work/builds/mozilla-central/obj-debug/dist/include/mozilla/net/ChannelEventQueue.h:55)
#17: mozilla::net::ChannelEventQueue::FlushQueue() (/scratch/work/builds/mozilla-central/mozilla/netwerk/ipc/ChannelEventQueue.cpp:95)
#18: mozilla::net::ChannelEventQueue::MaybeFlushQueue() (/scratch/work/builds/mozilla-central/obj-debug/dist/include/mozilla/net/ChannelEventQueue.h:0)
#19: mozilla::net::ChannelEventQueue::CompleteResume() (/scratch/work/builds/mozilla-central/mozilla/netwerk/ipc/ChannelEventQueue.h:0)
#20: mozilla::net::ChannelEventQueue::ResumeInternal()::CompleteResumeRunnable::Run() (/scratch/work/builds/mozilla-central/mozilla/netwerk/ipc/ChannelEventQueue.cpp:153)
#21: mozilla::SchedulerGroup::Runnable::Run() (/scratch/work/builds/mozilla-central/mozilla/xpcom/threads/SchedulerGroup.cpp:140)
#22: mozilla::RunnableTask::Run() (/scratch/work/builds/mozilla-central/mozilla/xpcom/threads/TaskController.cpp:539)
#23: mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) (/scratch/work/builds/mozilla-central/mozilla/xpcom/threads/TaskController.cpp:852)
#24: mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) (/scratch/work/builds/mozilla-central/mozilla/xpcom/threads/TaskController.cpp:684)
#25: mozilla::TaskController::ProcessPendingMTTask(bool) (/scratch/work/builds/mozilla-central/mozilla/xpcom/threads/TaskController.cpp:462)
#26: mozilla::TaskController::InitializeInternal()::$_2::operator()() const (/scratch/work/builds/mozilla-central/mozilla/xpcom/threads/TaskController.cpp:188)
#27: mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_2>::Run() (/scratch/work/builds/mozilla-central/mozilla/xpcom/threads/nsThreadUtils.h:547)
#28: nsThread::ProcessNextEvent(bool, bool*) (/scratch/work/builds/mozilla-central/mozilla/xpcom/threads/nsThread.cpp:1207)
#29: NS_ProcessNextEvent(nsIThread*, bool) (/scratch/work/builds/mozilla-central/mozilla/xpcom/threads/nsThreadUtils.cpp:474)
#30: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) (/scratch/work/builds/mozilla-central/mozilla/ipc/glue/MessagePump.cpp:85)
#31: mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) (/scratch/work/builds/mozilla-central/mozilla/ipc/glue/MessagePump.cpp:269)
#32: MessageLoop::RunInternal() (/scratch/work/builds/mozilla-central/mozilla/ipc/chromium/src/base/message_loop.cc:381)
#33: MessageLoop::RunHandler() (/scratch/work/builds/mozilla-central/mozilla/ipc/chromium/src/base/message_loop.cc:375)
#34: MessageLoop::Run() (/scratch/work/builds/mozilla-central/mozilla/ipc/chromium/src/base/message_loop.cc:356)
#35: nsBaseAppShell::Run() (/scratch/work/builds/mozilla-central/mozilla/widget/nsBaseAppShell.cpp:152)
#36: XRE_RunAppShell() (/scratch/work/builds/mozilla-central/mozilla/toolkit/xre/nsEmbedFunctions.cpp:884)
#37: mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) (/scratch/work/builds/mozilla-central/mozilla/ipc/glue/MessagePump.cpp:235)
#38: MessageLoop::RunInternal() (/scratch/work/builds/mozilla-central/mozilla/ipc/chromium/src/base/message_loop.cc:381)
#39: MessageLoop::RunHandler() (/scratch/work/builds/mozilla-central/mozilla/ipc/chromium/src/base/message_loop.cc:375)
#40: MessageLoop::Run() (/scratch/work/builds/mozilla-central/mozilla/ipc/chromium/src/base/message_loop.cc:356)
#41: XRE_InitChildProcess(int, char**, XREChildData const*) (/scratch/work/builds/mozilla-central/mozilla/toolkit/xre/nsEmbedFunctions.cpp:747)
#42: mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) (/scratch/work/builds/mozilla-central/mozilla/toolkit/xre/Bootstrap.cpp:67)
#43: content_process_main(mozilla::Bootstrap*, int, char**) (/scratch/work/builds/mozilla-central/mozilla/ipc/contentproc/plugin-container.cpp:57)
#44: main (/scratch/work/builds/mozilla-central/mozilla/browser/app/nsBrowserApp.cpp:359)
#45: ??? (/lib/x86_64-linux-gnu/libc.so.6 + 0x29d90)
#46: __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6 + 0x29e40)
#47: ??? (/scratch/work/builds/mozilla-central/obj-debug/dist/bin/firefox + 0x869d9)
#48: ??? (???:???)
Reporter | ||
Comment 2•2 years ago
|
||
Pernosco trace: https://pernos.co/debug/MS3nZ4Bz4afyPsJ4_b1aBg/index.html
Assignee | ||
Comment 3•2 years ago
|
||
Looks like we are trying to do predict during shutdown.
Reporter | ||
Comment 4•2 years ago
|
||
RE shutdown: just to clarify, I didn't explicitly quit/shutdown Firefox here. (Maybe you're referring to a helper process shutting down in the background though.)
Assignee | ||
Updated•1 year ago
|
Comment 5•1 year ago
|
||
Found with m-c 20240102-60c369c930dc (--enable-debug --enable-fuzzing).
This was detected by live site testing. It can be reliably triggered by visiting http://bergfex.at/
with a debug build.
Comment 6•1 year ago
|
||
A Pernosco session is available here: https://pernos.co/debug/YLSMkV4iK3vh_UjiKqNz9g/index.html
Assignee | ||
Comment 7•1 year ago
|
||
We will try to fix this soon.
Comment 8•1 year ago
|
||
I haven't looked at the pernosco trace yet, but PredictorLearnRunnable::Run does an early return if gNeckoChild is null.
It would be good to confirm there isn't something weird going on, but I think the solution will be to just remove the assert
Assignee | ||
Comment 9•1 year ago
|
||
The Pernosco session shows that the content child is about to destroy at that point, so there is not much we can do.
Removing the diagnostic assert seems to be the only way.
Updated•1 year ago
|
Comment 10•1 year ago
|
||
Comment 11•1 year ago
|
||
bugherder |
Updated•1 year ago
|
Description
•