Closed Bug 1887783 Opened 2 years ago Closed 1 year ago

Assertion failure: !mODATarget, at /builds/worker/checkouts/gecko/netwerk/protocol/http/HttpChannelChild.cpp:3103

Categories

(Core :: Networking, defect, P2)

defect

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox-esr128 --- wontfix
firefox126 --- wontfix
firefox130 --- wontfix
firefox131 --- wontfix
firefox132 --- fixed

People

(Reporter: tsmith, Assigned: smayya)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, pernosco, Whiteboard: [necko-triaged][necko-priority-queue])

Attachments

(2 files)

Found with m-c 20240323-341c752f9f93 (--enable-debug --enable-fuzzing)

This was found by visiting a live website with a debug build.

STR:

  • Launch browser and visit site

This issue was triggered by visiting http://rtbhouse.com/.

Assertion failure: !mODATarget, at /builds/worker/checkouts/gecko/netwerk/protocol/http/HttpChannelChild.cpp:3103

#0 0x7f80d9215bef in mozilla::net::HttpChannelChild::RetargetDeliveryTo(nsISerialEventTarget*) /builds/worker/checkouts/gecko/netwerk/protocol/http/HttpChannelChild.cpp:3103:5
#1 0x7f80de47d654 in nsFontFaceLoader::OnStartRequest(nsIRequest*) /builds/worker/checkouts/gecko/layout/style/nsFontFaceLoader.cpp:340:15
#2 0x7f80de47d7b8 in non-virtual thunk to nsFontFaceLoader::OnStartRequest(nsIRequest*) /builds/worker/checkouts/gecko/layout/style/nsFontFaceLoader.cpp
#3 0x7f80d8d247a7 in mozilla::net::nsStreamLoader::OnStartRequest(nsIRequest*) /builds/worker/checkouts/gecko/netwerk/base/nsStreamLoader.cpp:71:23
#4 0x7f80d9b03b3d in operator() /builds/worker/checkouts/gecko/uriloader/preload/FetchPreloader.cpp:319:40
#5 0x7f80d9b03b3d in matchN<mozilla::Variant<mozilla::FetchPreloader::Cache::StartRequest, mozilla::FetchPreloader::Cache::DataAvailable, mozilla::FetchPreloader::Cache::StopRequest> &, (lambda at /builds/worker/checkouts/gecko/uriloader/preload/FetchPreloader.cpp:318:9), (lambda at /builds/worker/checkouts/gecko/uriloader/preload/FetchPreloader.cpp:321:9), (lambda at /builds/worker/checkouts/gecko/uriloader/preload/FetchPreloader.cpp:337:9)> /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:309:16
#6 0x7f80d9b03b3d in matchN<mozilla::Variant<mozilla::FetchPreloader::Cache::StartRequest, mozilla::FetchPreloader::Cache::DataAvailable, mozilla::FetchPreloader::Cache::StopRequest> &, (lambda at /builds/worker/checkouts/gecko/uriloader/preload/FetchPreloader.cpp:318:9), (lambda at /builds/worker/checkouts/gecko/uriloader/preload/FetchPreloader.cpp:321:9), (lambda at /builds/worker/checkouts/gecko/uriloader/preload/FetchPreloader.cpp:337:9)> /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:902:12
#7 0x7f80d9b03b3d in match<(lambda at /builds/worker/checkouts/gecko/uriloader/preload/FetchPreloader.cpp:318:9), (lambda at /builds/worker/checkouts/gecko/uriloader/preload/FetchPreloader.cpp:321:9), (lambda at /builds/worker/checkouts/gecko/uriloader/preload/FetchPreloader.cpp:337:9)> /builds/worker/workspace/obj-build/dist/include/mozilla/Variant.h:857:12
#8 0x7f80d9b03b3d in mozilla::FetchPreloader::Cache::Consume(nsCOMPtr<nsIStreamListener>) /builds/worker/checkouts/gecko/uriloader/preload/FetchPreloader.cpp:317:24
#9 0x7f80d9b0a5a1 in auto decltype(auto) mozilla::detail::RunnableMethodArguments<nsCOMPtr<nsIStreamListener>>::apply<mozilla::FetchPreloader::Cache, void (mozilla::FetchPreloader::Cache::*)(nsCOMPtr<nsIStreamListener>)>(mozilla::FetchPreloader::Cache*, void (mozilla::FetchPreloader::Cache::*)(nsCOMPtr<nsIStreamListener>))::'lambda'(auto&&...)::operator()<StoreRefPtrPassByPtr<nsIStreamListener>&>(auto&&...) const /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1085:18
#10 0x7f80d9b0a411 in __invoke_impl<void, (lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9), StoreRefPtrPassByPtr<nsIStreamListener> &> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h:60:14
#11 0x7f80d9b0a411 in __invoke<(lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9), StoreRefPtrPassByPtr<nsIStreamListener> &> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h:95:14
#12 0x7f80d9b0a411 in __apply_impl<(lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9), std::tuple<StoreRefPtrPassByPtr<nsIStreamListener> > &, 0UL> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple:1678:14
#13 0x7f80d9b0a411 in apply<(lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9), std::tuple<StoreRefPtrPassByPtr<nsIStreamListener> > &> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple:1687:14
#14 0x7f80d9b0a411 in apply<mozilla::FetchPreloader::Cache, void (mozilla::FetchPreloader::Cache::*)(nsCOMPtr<nsIStreamListener>)> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1083:12
#15 0x7f80d9b0a411 in mozilla::detail::RunnableMethodImpl<mozilla::FetchPreloader::Cache*, void (mozilla::FetchPreloader::Cache::*)(nsCOMPtr<nsIStreamListener>), true, (mozilla::RunnableKind)0, nsCOMPtr<nsIStreamListener>>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1134:13
#16 0x7f80d8a60eb7 in mozilla::RunnableTask::Run() /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:578:16
#17 0x7f80d8a56526 in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:905:26
#18 0x7f80d8a54d07 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:728:15
#19 0x7f80d8a55185 in mozilla::TaskController::ProcessPendingMTTask(bool) /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:514:36
#20 0x7f80d8a64e56 in operator() /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:232:37
#21 0x7f80d8a64e56 in mozilla::detail::RunnableFunction<mozilla::TaskController::TaskController()::$_0>::Run() /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.h:548:5
#22 0x7f80d8a7a132 in nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1199:16
#23 0x7f80d8a8127d in NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:480:10
#24 0x7f80d976c815 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:85:21
#25 0x7f80d96825d1 in RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:363:3
#26 0x7f80d96825d1 in MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:345:3
#27 0x7f80de0d6c88 in nsBaseAppShell::Run() /builds/worker/checkouts/gecko/widget/nsBaseAppShell.cpp:148:27
#28 0x7f80de19a568 in nsAppShell::Run() /builds/worker/checkouts/gecko/widget/gtk/nsAppShell.cpp:470:33
#29 0x7f80dffd92db in XRE_RunAppShell() /builds/worker/checkouts/gecko/toolkit/xre/nsEmbedFunctions.cpp:712:20
#30 0x7f80d976d6f6 in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:235:9
#31 0x7f80d96825d1 in RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:363:3
#32 0x7f80d96825d1 in MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:345:3
#33 0x7f80dffd8b42 in XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/checkouts/gecko/toolkit/xre/nsEmbedFunctions.cpp:647:34
#34 0x55d213ebd496 in content_process_main /builds/worker/checkouts/gecko/browser/app/../../ipc/contentproc/plugin-container.cpp:57:28
#35 0x55d213ebd496 in main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:375:18
#36 0x7f80ed7b5d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#37 0x7f80ed7b5e3f in __libc_start_main csu/../csu/libc-start.c:392:3
#38 0x55d213e931c8 in _start (/home/worker/build/firefox-bin+0x591c8) (BuildId: a1283dbcf46acdb95cefb397ba6c469dbdcc677d)

A Pernosco session is available here: https://pernos.co/debug/QkFV5z4NMcglULUI6ulARg/index.html

Keywords: pernosco
Assignee: nobody → smayya
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]

Discussed this problem in detail with Valentin.
The problem here is that the OnStartRequest in this function is called asynchronously after MayBeRetarget. This leads to the above assertion.

The current code assumes OnStartRequest is always called synchronously. However, there are cases like in FetchPreLoader where OnStartRequest is buffered and executed asynchronously at a later point in time.
In that case the listener re-targeting should take the precedence.
Hence, the current behavior seems right. We need to update the assertion to accommodate this corner case. We just need to ensure that we are not retargeting during ODA.

See Also: → 1917901
Whiteboard: [necko-triaged] → [necko-triaged][necko-priority-queue]
Pushed by smayya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/96f12423c832 ensure we are not retargeting during OnDataAvailable. r=necko-reviewers,valentin
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
See Also: → 1919416
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: