Closed Bug 1595572 Opened 6 years ago Closed 6 years ago

Assertion failure: false (Unknown request), at netwerk/base/NetworkConnectivityService.cpp:295

Categories

(Core :: Networking, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: petr.sumbera, Assigned: valentin)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0

Steps to reproduce:

I'm getting following assertion with (and only with) enable proxy:

Assertion failure: false (Unknown request), at /builds/psumbera/FIREFOX-2/netwerk/base/NetworkConnectivityService.cpp:295
#01: mozilla::net::NetworkConnectivityService::OnStopRequest(nsIRequest*, nsresult)[/opt/firefox/lib/firefox/libxul.so +0x4d10e53]
Couldn't convert chrome URL: chrome://branding/locale/brand.properties
#02: mozilla::net::nsHttpChannel::ContinueOnStopRequest(nsresult, bool, bool)[/opt/firefox/lib/firefox/libxul.so +0x50551c2]
#03: mozilla::net::nsHttpChannel::ContinueOnStopRequestAfterAuthRetry(nsresult, bool, bool, bool, mozilla::net::nsHttpTransaction*)[/opt/firefox/lib/firefox/libxul.so +0x5055874]
#04: mozilla::net::nsHttpChannel::OnStopRequest(nsIRequest*, nsresult)[/opt/firefox/lib/firefox/libxul.so +0x5056566]
#05: nsInputStreamPump::OnStateStop()[/opt/firefox/lib/firefox/libxul.so +0x4d735f6]
#06: nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*)[/opt/firefox/lib/firefox/libxul.so +0x4d85204]
#07: nsInputStreamReadyEvent::Run()[/opt/firefox/lib/firefox/libxul.so +0x4be1ff4]
#08: nsThread::ProcessNextEvent(bool, bool*)[/opt/firefox/lib/firefox/libxul.so +0x4c5a100]
#09: NS_ProcessNextEvent(nsIThread*, bool)[/opt/firefox/lib/firefox/libxul.so +0x4c480a2]
#10: nsThread::Shutdown()[/opt/firefox/lib/firefox/libxul.so +0x4c55d2a]
#11: nsThreadPool::Shutdown()[/opt/firefox/lib/firefox/libxul.so +0x4c47b76]
#12: mozilla::detail::RunnableMethodImpl<nsCOMPtr<nsIThreadPool>, nsresult (nsIThreadPool::)(), true, (mozilla::RunnableKind)0>::Run()[/opt/firefox/lib/firefox/libxul.so +0x4c24733]
#13: nsThread::ProcessNextEvent(bool, bool
)[/opt/firefox/lib/firefox/libxul.so +0x4c5a100]
#14: NS_ProcessNextEvent(nsIThread*, bool)[/opt/firefox/lib/firefox/libxul.so +0x4c480a2]
#15: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*)[/opt/firefox/lib/firefox/libxul.so +0x5166fab]
#16: MessageLoop::RunInternal()[/opt/firefox/lib/firefox/libxul.so +0x5113632]
#17: MessageLoop::Run()[/opt/firefox/lib/firefox/libxul.so +0x5113b4e]
#18: nsBaseAppShell::Run()[/opt/firefox/lib/firefox/libxul.so +0x81f2d37]
#19: nsAppStartup::Run()[/opt/firefox/lib/firefox/libxul.so +0x954a6f7]
#20: XREMain::XRE_mainRun()[/opt/firefox/lib/firefox/libxul.so +0x966c0b3]
#21: XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&)[/opt/firefox/lib/firefox/libxul.so +0x966d8ee]
#22: XRE_main(int, char**, mozilla::BootstrapConfig const&)[/opt/firefox/lib/firefox/libxul.so +0x966dc4f]
#23: mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&)[/opt/firefox/lib/firefox/libxul.so +0x966fc9f]
#24: do_main(int, char**, char**)[/opt/firefox/lib/firefox/firefox +0x2642d]
#25: main[/opt/firefox/lib/firefox/firefox +0x264f7]
#26: _start[/opt/firefox/lib/firefox/firefox +0x259a3]

This is seen on Solaris OS (both SPARC and Intel). It's regression. About month ago it was working.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Networking
Product: Firefox → Core

(In reply to Petr Sumbera from comment #1)

This is seen on Solaris OS (both SPARC and Intel). It's regression. About month ago it was working.

Could you help us figure out exactly when it stopped working with this tool? https://mozilla.github.io/mozregression/install.html
Thanks!

Flags: needinfo?(petr.sumbera)

I'm afraid that the tool will not work on Solaris.

I was trying to bisect it manually and the first bad commit seemed to be:

changeset:   477021:0d39f4b9fe60
user:        Valentin Gosu <valentin.gosu@gmail.com>
date:        Wed Jun 05 21:39:12 2019 +0100
description:
        Bug 1556911 - Don't instantiate NetworkConnectivityService off-main-thread r=dragana

Though I'm not entirely sure I didn't make any mistake (there might had been another issue which sided me away).

I also tried to comment out problematic assertion:

--- a/netwerk/base/NetworkConnectivityService.cpp       Fri Jan 24 16:32:58 2020 +0100
+++ b/netwerk/base/NetworkConnectivityService.cpp       Mon Jan 27 15:39:47 2020 +0100
@@ -288,7 +288,7 @@
     mIPv6 = status;
     mIPv6Channel = nullptr;
   } else {
-    MOZ_ASSERT(false, "Unknown request");
+//    MOZ_ASSERT(false, "Unknown request");
   }

   if (!mIPv6Channel && !mIPv4Channel) {

And with that everything seemed to work.

Flags: needinfo?(petr.sumbera)

In a corner case race we might receive a notification from the wrong channel.

  • mIPv4Channel is loading and calls nsHttpChannel::DoAuthRetry(NS_OK)
  • RecheckDNS() is called and mIPv4Channel gets replaced
    we call Cancel for the old channel
  • nsHttpChannel::ContinueDoAuthRetry is called, which calls OnStopRequest
    for the old channel
  • We hit the assertion because we get the call for the wrong channel
Assignee: nobody → valentin.gosu
Priority: -- → P2
Whiteboard: [necko-triaged]
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/4268b79eb7bb Remove NetworkConnectivityService.cpp MOZ_ASSERT("unknown request") r=kershaw
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: