Closed Bug 1625727 Opened 4 years ago Closed 4 years ago

Remove unnecessary fallback initialization for null loadinfos

Categories

(Core :: DOM: Security, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: ckerschb, Assigned: ckerschb)

Details

(Whiteboard: [domsecurity-active])

Attachments

(2 files)

These days all channels have a loadinfo object attached and hence we should remove unnecessary default initializers where a loadinfo could have been null in the old days.

Pushed by mozilla@christophkerschbaumer.com:
https://hg.mozilla.org/integration/autoland/rev/278b86784e72
Remove unnecessary fallback initialization for null loadinfos, r=baku

Backed out changeset 278b86784e72 (bug 1625727) for LoadInfo related wpt crashes

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=web%2Cplatform%2Ctests&fromchange=acb3f6f0a64e5e31daee85c5e991b4ed2a69d721&tochange=238a37af3863f840c68b00ad137eef6f39f49292&selectedJob=295330754

Backout link: https://hg.mozilla.org/integration/autoland/rev/238a37af3863f840c68b00ad137eef6f39f49292

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=295330754&repo=autoland&lineNumber=3023

[task 2020-03-30T09:37:14.827Z] 09:37:14     INFO - TEST-START | /fetch/api/redirect/redirect-referrer.any.html
[task 2020-03-30T09:37:14.830Z] 09:37:14     INFO - Closing window 71
[task 2020-03-30T09:37:17.725Z] 09:37:17     INFO - ................................
[task 2020-03-30T09:37:17.725Z] 09:37:17     INFO - TEST-OK | /fetch/api/redirect/redirect-referrer.any.html | took 2896ms
[task 2020-03-30T09:37:17.725Z] 09:37:17     INFO - TEST-START | /fetch/api/redirect/redirect-schemes.html
[task 2020-03-30T09:37:17.729Z] 09:37:17     INFO - Closing window 75
[task 2020-03-30T09:37:18.914Z] 09:37:18     INFO - Browser not responding, setting status to CRASH
[task 2020-03-30T09:37:20.188Z] 09:37:20     INFO - mozcrash Downloading symbols from: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/d0cYrfSmQ6WfqVqv3aS49A/artifacts/public/build/target.crashreporter-symbols.zip
[task 2020-03-30T09:37:23.174Z] 09:37:23     INFO - mozcrash Copy/paste: /builds/worker/fetches/minidump_stackwalk/minidump_stackwalk /tmp/tmpTzv3TR/2420f98f-a482-d65c-b19c-851baa26ff53.dmp /tmp/tmpijw3ZA
[task 2020-03-30T09:37:26.194Z] 09:37:26     INFO - mozcrash Saved minidump as /builds/worker/workspace/build/blobber_upload_dir/2420f98f-a482-d65c-b19c-851baa26ff53.dmp
[task 2020-03-30T09:37:26.194Z] 09:37:26     INFO - mozcrash Saved app info as /builds/worker/workspace/build/blobber_upload_dir/2420f98f-a482-d65c-b19c-851baa26ff53.extra
[task 2020-03-30T09:37:26.318Z] 09:37:26     INFO - PROCESS-CRASH | /fetch/api/redirect/redirect-schemes.html | application crashed [@ mozilla::ipc::LoadInfoToChildLoadInfoForwarder(nsILoadInfo*, mozilla::net::ChildLoadInfoForwarderArgs*)]
[task 2020-03-30T09:37:26.318Z] 09:37:26     INFO - Crash dump filename: /tmp/tmpTzv3TR/2420f98f-a482-d65c-b19c-851baa26ff53.dmp
[task 2020-03-30T09:37:26.318Z] 09:37:26     INFO - Operating system: Android
[task 2020-03-30T09:37:26.318Z] 09:37:26     INFO -                   0.0.0 Linux 3.10.0+ #260 SMP PREEMPT Fri May 19 12:48:14 PDT 2017 x86_64
[task 2020-03-30T09:37:26.318Z] 09:37:26     INFO - CPU: amd64
[task 2020-03-30T09:37:26.318Z] 09:37:26     INFO -      family 6 model 6 stepping 3
[task 2020-03-30T09:37:26.318Z] 09:37:26     INFO -      4 CPUs
[task 2020-03-30T09:37:26.318Z] 09:37:26     INFO - 
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO - GPU: UNKNOWN
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO - 
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO - Crash reason:  SIGSEGV /SEGV_MAPERR
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO - Crash address: 0x0
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO - Process uptime: not available
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO - 
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO - Thread 11 (crashed)
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -  0  libxul.so!mozilla::ipc::LoadInfoToChildLoadInfoForwarder(nsILoadInfo*, mozilla::net::ChildLoadInfoForwarderArgs*) [BackgroundUtils.cpp:278b86784e72c8e7d4f7e2d24ce981b97fc45383 : 880 + 0x0]
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -     rax = 0xe9aab51c74fb9737   rdx = 0x00007df129da1dc0
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -     rcx = 0x00007df129da1dc0   rbx = 0x00007df129da1848
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -     rsi = 0x00007df129da1848   rdi = 0x0000000000000000
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -     rbp = 0x00007df129da17c0   rsp = 0x00007df129da0c10
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -      r8 = 0x00000000000005a4    r9 = 0x0000000000000000
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -     r10 = 0x0000000000000000   r11 = 0x0000000000000000
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -     r12 = 0x00007df11ad72800   r13 = 0x0000000000000000
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -     r14 = 0x00007df129da1848   r15 = 0x0000000000000000
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -     rip = 0x00007df121f2301b
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -     Found by: given as instruction pointer in context
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -  1  libxul.so!mozilla::net::HttpChannelChild::OnRedirectVerifyCallback(nsresult) [HttpChannelChild.cpp:278b86784e72c8e7d4f7e2d24ce981b97fc45383 : 2257 + 0xb]
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -     rbp = 0x00007df129da1eb0   rsp = 0x00007df129da17d0
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -     rip = 0x00007df121d93d74
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -     Found by: previous frame's frame pointer
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -  2  libxul.so!non-virtual thunk to mozilla::net::HttpChannelChild::OnRedirectVerifyCallback(nsresult) [HttpChannelChild.cpp:278b86784e72c8e7d4f7e2d24ce981b97fc45383 : 0 + 0x10]
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -     rbp = 0x00007df129da1ec0   rsp = 0x00007df129da1ec0
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -     rip = 0x00007df121d95780
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -     Found by: previous frame's frame pointer
[task 2020-03-30T09:37:26.319Z] 09:37:26     INFO -  3  libxul.so!mozilla::net::nsAsyncVerifyRedirectCallbackEvent::Run() [nsAsyncRedirectVerifyHelper.cpp:278b86784e72c8e7d4f7e2d24ce981b97fc45383 : 40 + 0xd]
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     rbp = 0x00007df129da1ee0   rsp = 0x00007df129da1ed0
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     rip = 0x00007df121ab690f
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     Found by: previous frame's frame pointer
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -  4  libxul.so!mozilla::SchedulerGroup::Runnable::Run() [SchedulerGroup.cpp:278b86784e72c8e7d4f7e2d24ce981b97fc45383 : 282 + 0x9]
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     rbp = 0x00007df129da1f00   rsp = 0x00007df129da1ef0
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     rip = 0x00007df1219e7878
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     Found by: previous frame's frame pointer
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -  5  libxul.so!nsThread::ProcessNextEvent(bool, bool*) [nsThread.cpp:278b86784e72c8e7d4f7e2d24ce981b97fc45383 : 1220 + 0xa]
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     rbp = 0x00007df129da2410   rsp = 0x00007df129da1f10
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     rip = 0x00007df1219f6bbc
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     Found by: previous frame's frame pointer
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -  6  libxul.so!NS_ProcessNextEvent(nsIThread*, bool) [nsThreadUtils.cpp:278b86784e72c8e7d4f7e2d24ce981b97fc45383 : 481 + 0xd]
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     rbp = 0x00007df129da2440   rsp = 0x00007df129da2420
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     rip = 0x00007df1219f96c8
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     Found by: previous frame's frame pointer
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -  7  libxul.so!mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [MessagePump.cpp:278b86784e72c8e7d4f7e2d24ce981b97fc45383 : 87 + 0x7]
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     rbp = 0x00007df129da2480   rsp = 0x00007df129da2450
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     rip = 0x00007df121f42adb
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     Found by: previous frame's frame pointer
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -  8  libxul.so!MessageLoop::Run() [message_loop.cc:278b86784e72c8e7d4f7e2d24ce981b97fc45383 : 290 + 0xc]
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     rbp = 0x00007df129da24b0   rsp = 0x00007df129da2490
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     rip = 0x00007df121f02636
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     Found by: previous frame's frame pointer
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -  9  libxul.so!nsBaseAppShell::Run() [nsBaseAppShell.cpp:278b86784e72c8e7d4f7e2d24ce981b97fc45383 : 137 + 0xd]
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     rbp = 0x00007df129da24d0   rsp = 0x00007df129da24c0
[task 2020-03-30T09:37:26.320Z] 09:37:26     INFO -     rip = 0x00007df123fa19e9
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     Found by: previous frame's frame pointer
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO - 10  libxul.so!XRE_RunAppShell() [nsEmbedFunctions.cpp:278b86784e72c8e7d4f7e2d24ce981b97fc45383 : 909 + 0x6]
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     rbp = 0x00007df129da2500   rsp = 0x00007df129da24e0
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     rip = 0x00007df1250beab4
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     Found by: previous frame's frame pointer
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO - 11  libxul.so!MessageLoop::Run() [message_loop.cc:278b86784e72c8e7d4f7e2d24ce981b97fc45383 : 290 + 0xc]
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     rbp = 0x00007df129da2530   rsp = 0x00007df129da2510
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     rip = 0x00007df121f02636
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     Found by: previous frame's frame pointer
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO - 12  libxul.so!XRE_InitChildProcess(int, char**, XREChildData const*) [nsEmbedFunctions.cpp:278b86784e72c8e7d4f7e2d24ce981b97fc45383 : 740 + 0x8]
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     rbp = 0x00007df129da2750   rsp = 0x00007df129da2540
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     rip = 0x00007df1250be915
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     Found by: previous frame's frame pointer
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO - 13  libmozglue.so!Java_org_mozilla_gecko_mozglue_GeckoLoader_nativeRun [APKOpen.cpp:278b86784e72c8e7d4f7e2d24ce981b97fc45383 : 418 + 0x8]
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     rbp = 0x00007df129da27e0   rsp = 0x00007df129da2760
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     rip = 0x00007df1290d134e
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     Found by: previous frame's frame pointer
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO - 14  base.odex + 0xa84553
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     rbp = 0x00007df129da28b8   rsp = 0x00007df129da27f0
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     rip = 0x00007df12a828553
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     Found by: previous frame's frame pointer
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO - 15  0x7df129da2c50
[task 2020-03-30T09:37:26.321Z] 09:37:26     INFO -     rbp = 0x00007df129da2c50   rsp = 0x00007df129da28c8
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     rip = 0x00007df129da2c50
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     Found by: previous frame's frame pointer
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO - 16  dalvik-LinearAlloc (deleted) + 0x67b8
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     rbp = 0x00007df129da2c50   rsp = 0x00007df129da28d0
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     rip = 0x00007df1471dc7b8
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     Found by: stack scanning
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO - 17  base.odex + 0x88289b
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     rbp = 0x00007df129da2c50   rsp = 0x00007df129da28e8
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     rip = 0x00007df12a62689b
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     Found by: stack scanning
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO - 18  libart.so + 0x14546d
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     rbp = 0x00007df129da2c50   rsp = 0x00007df129da2900
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     rip = 0x00007df14265146d
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     Found by: stack scanning
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO - 19  dalvik-main space (deleted) + 0xa2c00
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     rbp = 0x00007df129da2c50   rsp = 0x00007df129da2918
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     rip = 0x0000000012ca2c00
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     Found by: stack scanning
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO - 20  base.odex + 0x803d88
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     rbp = 0x00007df129da2c50   rsp = 0x00007df129da2920
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     rip = 0x00007df12a5a7d88
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     Found by: stack scanning
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO - 21  system@framework@boot-framework.art + 0x2deba0
[task 2020-03-30T09:37:26.322Z] 09:37:26     INFO -     rbp = 0x00007df129da2c50   rsp = 0x00007df129da2950
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO -     rip = 0x000000007157eba0
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO -     Found by: stack scanning
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO - 22  dalvik-LinearAlloc (deleted) + 0x67b8
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO -     rbp = 0x00007df129da2c50   rsp = 0x00007df129da2970
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO -     rip = 0x00007df1471dc7b8
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO -     Found by: stack scanning
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO - 23  base.odex + 0x84bdfc
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO -     rbp = 0x00007df129da2c50   rsp = 0x00007df129da2988
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO -     rip = 0x00007df12a5efdfc
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO -     Found by: stack scanning
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO - 24  libart.so + 0x310b80
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO -     rbp = 0x00007df129da2c50   rsp = 0x00007df129da2990
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO -     rip = 0x00007df14281cb80
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO -     Found by: stack scanning
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO - 25  boot.oat + 0x263b8
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO -     rbp = 0x00007df129da2c50   rsp = 0x00007df129da2998
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO -     rip = 0x000000007196d3b8
[task 2020-03-30T09:37:26.323Z] 09:37:26     INFO -     Found by: stack scanning
...
...
Flags: needinfo?(ckerschb)

(In reply to Bogdan Tara[:bogdan_tara | bogdant] from comment #3)

Backed out changeset 278b86784e72 (bug 1625727) for LoadInfo related wpt crashes

Huh, how can we have a null loadinfo ever? Looking into it - thanks!

Flags: needinfo?(ckerschb)

Valentin, as discussed on slack it seems that redirecting to about:blank [1] causes mRedirectChannel to be null here [2] which in turn causes newChannel to be null and hence we can't query a loadinfo at this point.

As discussed, there could be some underlying problem which is probably worth investigating. Since you offered your help I let you do a first investigation, but please feel free to offload things to me in case there is more work to do because I think it's worth eliminating all these loadinfo null checks and default initializations.

[1] https://searchfox.org/mozilla-central/source/testing/web-platform/tests/fetch/api/redirect/redirect-schemes.html#14
[2] https://searchfox.org/mozilla-central/rev/9c6e7500c0015a2c60be7b1b888261d95095ce27/netwerk/protocol/http/HttpChannelChild.cpp#2252

Flags: needinfo?(valentin.gosu)

Can we just back this out and reopen autoland?

I've looked into it, and that seems to be expected.
For about blank we create a new channel here which doesn't implement nsIChildChannel.

Flags: needinfo?(valentin.gosu)
Pushed by mozilla@christophkerschbaumer.com:
https://hg.mozilla.org/integration/autoland/rev/82cca73adf8b
Only pass ChildLoadInfoForwarderArgs when mRedirectChannelChild implements nsIChannel r=ckerschb,kershaw
https://hg.mozilla.org/integration/autoland/rev/0c147cf768fd
Remove unnecessary fallback initialization for null loadinfos, r=baku
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: