Closed Bug 1267591 Opened 4 years ago Closed 4 years ago

Investigate log messages about missing loadInfo

Categories

(Core :: DOM: Security, defect)

defect
Not set

Tracking

()

VERIFIED FIXED

People

(Reporter: ckerschb, Assigned: ckerschb)

References

Details

(Whiteboard: [domsecurity-active])

Jason and Ryan brought to my attention that we are getting lots of:

INFO -  [Parent 2516] WARNING: Found channel with no loadinfo, assuming third-party request: file c:/builds/moz2_slave/ash-w32-d-00000000000000000000/build/src/dom/base/ThirdPartyUtil.cpp, line 235

That shouldn't be the case anymore, since all the channel created within Gecko (or at least the ones running on treeherder) should have a loadinfo attached. We should investigate those.

http://archive.mozilla.org/pub/firefox/tinderbox-builds/ash-win32-debug/1461583554/ash_xp_ix-debug_test-mochitest-e10s-2-bm110-tests1-windows-build1.txt.gz
Assignee: nobody → ckerschb
Status: NEW → ASSIGNED
Whiteboard: [domsecurity-active]
The only channels that should have no loadInfo attached are the ones created by addons that are not using the new API yet. To make sure we can add an assertion within nsIOService, which is the one central point that all channels go through.

I looked through the logs provided in comment 0, but I coulnd't reproduce any of these errors. Not on mac nor on linux. Is it Windows specific by any chance? Or probably only e10s specific?

Either way, added some assertions; in a few hours we know more:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=13106b8585e1
Depends on: 1268044
Christoph - this looks like it might just be related to bug 1267058 (likely same root cause of me doing something stupid/wrong in prefetch code for the predictor). Does that seem likely to you?
Flags: needinfo?(ckerschb)
(In reply to Nicholas Hurley [:nwgh][:hurley] from comment #2)
> Christoph - this looks like it might just be related to bug 1267058 (likely
> same root cause of me doing something stupid/wrong in prefetch code for the
> predictor). Does that seem likely to you?

Hey Nick, I don't think it's necessarily related to all of the warnings we are experiencing on treeherder. But either way, we need to update [1] and pass the right arguments for the loadInfo. And we should also call ->AsyncOpen2() instead of ->AsyncOpen(). Please file a bug for updating that and CC me. Or, alternatively you could fix that within Bug 1267058. From a brief look at that bug I am pretty certain that's the same problem.

[1] http://mxr.mozilla.org/mozilla-central/source/netwerk/base/Predictor.cpp#1335
Flags: needinfo?(ckerschb)
I ran a couple of tests locally that were failing from the TRY run from comment 1. Maybe my statement within comment 3 isn't so true after all, and the Predictor code is introducing a lot of those warnings. I see a lot of stacktraces like the one posted underneath.

For now I would like to mark Bug 1267058 blocking this one and then see what's left to fix. 

05:12:15     INFO -  Assertion failure: aLoadInfo, at /builds/slave/try-lx-d-000000000000000000000/build/src/netwerk/base/nsIOService.cpp:809
05:12:50     INFO -  #01: nsIOService::NewChannelFromURIWithProxyFlagsInternal [netwerk/base/nsIOService.cpp:809]
05:12:50     INFO -  #02: nsIOService::NewChannelFromURIWithLoadInfo [netwerk/base/nsIOService.cpp:719]
05:12:50     INFO -  #03: NS_NewChannelInternal [netwerk/base/nsNetUtil.inl:226]
05:12:50     INFO -  #04: mozilla::net::Predictor::Prefetch [xpcom/glue/nsCOMPtr.h:1207]
05:12:50     INFO -  #05: mozilla::net::Predictor::RunPredictions [netwerk/base/Predictor.cpp:1390]
05:12:50     INFO -  #06: mozilla::net::Predictor::PredictForPageload [netwerk/base/Predictor.cpp:1085]
05:12:50     INFO -  #07: mozilla::net::Predictor::Action::OnCacheEntryAvailable [netwerk/base/Predictor.cpp:308]
05:12:50     INFO -  #08: mozilla::net::CacheEntry::InvokeAvailableCallback [netwerk/cache2/CacheEntry.cpp:876]
05:12:50     INFO -  #09: mozilla::net::CacheEntry::InvokeCallback [netwerk/cache2/CacheEntry.cpp:817]
05:12:50     INFO -  #10: mozilla::net::CacheEntry::InvokeCallbacks [netwerk/cache2/CacheEntry.cpp:684]
05:12:50     INFO -  #11: mozilla::net::CacheEntry::InvokeCallbacks [netwerk/cache2/CacheEntry.cpp:625]
05:12:50     INFO -  #12: mozilla::net::CacheEntry::Open [netwerk/cache2/CacheEntry.cpp:347]
05:12:50     INFO -  #13: mozilla::net::CacheEntry::AsyncOpen [netwerk/cache2/CacheEntry.cpp:319]
05:12:50     INFO -  #14: mozilla::net::CacheStorage::AsyncOpenURI [netwerk/cache2/CacheStorage.cpp:112]
05:12:50     INFO -  #15: mozilla::net::Predictor::Predict [xpcom/string/nsTSubstring.h:95]
05:12:50     INFO -  #16: mozilla::net::PredictorPredict [netwerk/base/Predictor.cpp:2163]
05:12:50     INFO -  #17: nsDocShell::InternalLoad [xpcom/glue/nsCOMPtr.h:1154]
05:12:50     INFO -  #18: nsDocShell::LoadURI [docshell/base/nsDocShell.cpp:1555]
05:12:50     INFO -  #19: nsFrameLoader::ReallyStartLoadingInternal [dom/base/nsFrameLoader.cpp:435]
Depends on: 1267058
I suppose by fixing Bug 1267058 and Bug 1268044 those errors disappeared again. Let's make sure:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=351741e3e35e
Ryan, I suppose we can mark this one as fixed, what do you think? (See also TRY run from Comment 5).
Flags: needinfo?(ryanvm)
Redirecting to erahm since he has way better abilities to answer that than I do (real numbers vs. arbitrarily looking through logs).
Flags: needinfo?(ryanvm) → needinfo?(erahm)
Details from the try push (still see it on central as well). This appears to be windows only. It appears to have regressed somewhere in here: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=9f866b72af4a3c4520205d55c60aa74548682c4a&tochange=369a5ee3a2880a4a98df3a00bf3db8d8f36b181b

> 58650 WARNING: no triggering principal available via loadInfo, assuming load is cross-origin: file netwerk/protocol/http/HttpBaseChannel.cpp, line 1406

This warning [1] shows up in the following test suites:

>   8554 - Mochitest 3
>   5347 - W3C Web Platform Tests e10s 4
>   5347 - W3C Web Platform Tests 4
>   3654 - Mochitest 1
>   2793 - Mochitest WebGL gl
>   2751 - W3C Web Platform Tests e10s 7
>   2751 - W3C Web Platform Tests 7
>   2444 - Mochitest 2
>   2325 - W3C Web Platform Tests e10s 8
>   2325 - W3C Web Platform Tests 8
>   2211 - Mochitest 5
>   1787 - Mochitest 4
>   1215 - Mochitest Media mda
>   1211 - Reftest R
>   1155 - Reftest e10s R-e10s
>   1055 - W3C Web Platform Tests e10s 6
>   1055 - W3C Web Platform Tests 6
>   1041 - W3C Web Platform Tests 2
>   1037 - W3C Web Platform Tests e10s 2
>    829 - W3C Web Platform Reftests e10s Wr-e10s
>    829 - W3C Web Platform Reftests Wr
>    769 - W3C Web Platform Tests e10s 1
>    769 - W3C Web Platform Tests 1
>    557 - W3C Web Platform Tests 10
>    557 - W3C Web Platform Tests e10s 10
>    542 - W3C Web Platform Tests e10s 3
>    542 - W3C Web Platform Tests 3
>    254 - Mochitest DevTools Browser Chrome dt8
>    222 - Mochitest DevTools Browser Chrome dt7
>    178 - W3C Web Platform Tests e10s 5
>    178 - W3C Web Platform Tests 5
>    136 - Mochitest Browser Chrome bc3
>     93 - Mochitest DevTools Browser Chrome dt3
>     78 - W3C Web Platform Tests e10s 9
>     78 - W3C Web Platform Tests 9
>     60 - Mochitest e10s WebGL gl
>     58 - Mochitest e10s DevTools Browser Chrome dt8
>     56 - Mochitest Browser Chrome bc7
>     33 - Mochitest DevTools Browser Chrome dt5
>     32 - Mochitest e10s DevTools Browser Chrome dt2
>     27 - Mochitest Browser Chrome bc1
>     26 - Mochitest e10s DevTools Browser Chrome dt1
>      3 - Mochitest DevTools Browser Chrome dt2
>      1 - Mochitest e10s DevTools Browser Chrome dt3

It shows up in 17874 tests. A few of the most prevalent:

>    605 - [e10s] /html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html
>    605 -        /html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html
>    340 -        layout/style/test/test_visited_reftests.html
>    218 - [e10s] /dom/nodes/Document-characterSet-normalization.html
>    218 -        /dom/nodes/Document-characterSet-normalization.html
>    190 -        dom/security/test/csp/test_path_matching.html
>    177 -        docshell/test/navigation/test_sessionhistory.html
>    140 -        dom/base/test/test_bug682592.html
>    140 -        /html/infrastructure/urls/resolving-urls/query-encoding/windows-1251.html
>    140 -        /html/infrastructure/urls/resolving-urls/query-encoding/utf-16le.html

[1] https://hg.mozilla.org/try/annotate/351741e3e35e/netwerk/protocol/http/HttpBaseChannel.cpp#l1406
Flags: needinfo?(erahm)
Sorry I guess that warning is a bit different, I didn't see the warning from third-party in the try run (or on central).

> WARNING: Found channel with no loadinfo, assuming third-party request

vs

> WARNING: no triggering principal available via loadInfo, assuming load is cross-origin
(In reply to Eric Rahm [:erahm] from comment #9)

> > WARNING: Found channel with no loadinfo, assuming third-party request

Thanks Eric. Based on your comment and also based on the Assertions we pushed to try, we can mark this bug as fixed.

> > WARNING: no triggering principal available via loadInfo, assuming load is cross-origin

This warning is slightly different. It warns that we can't query the URI from the triggeringPricnipal, which is e.g. the case if the triggeringPricnipal is the SystemPrincipal. We handle that problem over in Bug 1267754.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
This landed on 5/20: https://hg.mozilla.org/releases/mozilla-beta/rev/bb07b5227ff1
Status: RESOLVED → VERIFIED
Ack sorry, wrong bug.
You need to log in before you can comment on or make changes to this bug.