New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 785418 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
EstimatedDays: ----
NextAction: 2019-07-09
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

NetworkService: Some DownloadContentTest are flaky due to wierd -21 error code

Project Member Reported by qin...@chromium.org, Nov 15 2017

Issue description

I ran DownloadContentTest.ResumeRestoredDownload_NoFile on my linux box today, and found it failed sometimes when DownloadResponseHandler::OnComplete() was called with a -21 network error code, before OnReceiveResponse() was ever called.

-21 is NETWORK_CHANGED.

Any one has any idea about this? There doesn't seems to be any other code after creating the URLLoader and URLLoaderClient in resource_downloader.cc

FYI, mojo.fyi linux bot doesn't fail on this test.
 

Comment 1 by mmenke@chromium.org, Nov 15 2017

Cc: xunji...@chromium.org pauljensen@chromium.org
Not sure if we use a real NCN or not in browser_tests, normally.  We are using a real one in NetworkService unittests, now, though.

[+pauljensen]:  Don't suppose you know?  I don't see a MockNCN being created in the browsertest fixture, but I could be missing something.

Comment 2 by mmenke@chromium.org, Nov 15 2017

Sorry, that should be "we are using one in browsertests with the network service enabled."

Comment 3 by qin...@chromium.org, Nov 15 2017

The only difference between these flaky tests and the other tests is that they are creating a ranged request (ResumeRestoredDownload_xxxx), rather than starting from offset 0.

if a test starts from 0, it seems fine

Comment 4 Deleted

Comment 5 Deleted

@qinmin: I'm surprised you're seeing ERR_NETWORK_CHANGED.  Was your network changing?  e.g. were you plugging/unplugging Ethernet or leaving/joining WiFi networks?  Can you run "ip monitor" from the command line to see what changes appear.  If you're using a linux desktop there should be almost no network changes on a regular basis.

@mmenke: There are a few ways to disable the real NCN:
  net::test::ScopedMockNetworkChangeNotifier
  net::test::MockNetworkChangeNotifier
  net::NetworkChangeNotifier::DisableForTest
  net::NetworkChangeNotifier::CreateMock
Various individual tests use one of these to disable the NCN.  I think only net_unittests disables the real NCN for the whole test suite.

Generally our bots shouldn't encounter network changes (the Android bots don't have any active network AFAIK).  I'd like to figure out why qinmin@ experienced a network change before working on disabling the NCN for his tests.

Cc: -rdsmith@chromium.org
Labels: Pri-3
NextAction: 2019-07-09
Downgrading P2s that haven't been modified in more than 6 months, which have no component or owner.

Sign in to add a comment