New issue
Advanced search Search tips

Issue 854762 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Jun 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

SocketApiTest.SocketUDPExtension test crashes under MSan

Project Member Reported by r...@chromium.org, Jun 20 2018

Issue description

Here's the stack trace:

    #6 0x00000ebf1593 in extensions::SocketExtensionWithDnsLookupFunction::StartDnsLookup(net::HostPortPair const&) extensions/browser/api/socket/socket_api.cc:0:39
    #7 0x00000ebff3ac in extensions::SocketSendToFunction::AsyncWorkStart() extensions/browser/api/socket/socket_api.cc:706:3
    #8 0x000012f9e902 in Run base/callback.h:96:12
    #9 0x000012f9e902 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:101:0
    #10 0x00001303b1b5 in base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:319:25
    #11 0x00001303cd74 in DeferOrRunPendingTask base/message_loop/message_loop.cc:329:5
    #12 0x00001303cd74 in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:373:0
    #13 0x00001333d894 in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_libevent.cc:210:31
    #14 0x00001310c7f1 in base::RunLoop::Run() base/run_loop.cc:102:14
    #15 0x00000c2f25ff in content::BrowserProcessSubThread::IOThreadRun(base::RunLoop*) content/browser/browser_process_sub_thread.cc:178:11
    #16 0x000013203490 in base::Thread::ThreadMain() base/threading/thread.cc:337:3

First failing buidl: https://ci.chromium.org/buildbot/chromium.clang/ToTLinuxMSan/2991

https://chromium-review.googlesource.com/c/chromium/src/+/1096075 seems related to NetworkService, so maybe it's related. I don't understand what's MSan specific about this yet, though.
 

Comment 1 by mmenke@chromium.org, Jun 20 2018

Probably MSan is so slow that we do something with MSan enabled that we normally don't have time to do with it disabled.  I'll disable the test with the network service enabled.

Comment 2 by r...@chromium.org, Jun 20 2018

It's a crash, which shouldn't happen even if MSan is slowing things down drastically.

Comment 3 by mmenke@chromium.org, Jun 20 2018

So suppose we have a test that does Foo asynchronously...The critical path of the test normally completes so quickly, we don't reach the point where we do Foo.  MSan, however, slows the critical path down sufficiently that we reach the point where to do Foo, which always causes a crash.

MSan isn't causing the crash, it's causing us to give the code causing the crash long enough to run and crash.
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/02732adb3eb8516631d86fa010ad7f235d73b008

commit 02732adb3eb8516631d86fa010ad7f235d73b008
Author: Matt Menke <mmenke@chromium.org>
Date: Wed Jun 20 21:31:54 2018

Disable SocketApiTest.SocketUDPExtension with the NetworkService enabled

It flakily reaches a point of execution where extensions try to
do a host resolution using the RequestContext, which isn't set up when
the network service is enabled.

TBR=jam@chromium.org

Bug:  854762 
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: I5883a5620b953ca40fd582d39b96ea29f4f988e9
Reviewed-on: https://chromium-review.googlesource.com/1108737
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569027}
[modify] https://crrev.com/02732adb3eb8516631d86fa010ad7f235d73b008/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter

Comment 5 by mmenke@chromium.org, Jun 20 2018

Status: Fixed (was: Untriaged)

Comment 6 by r...@chromium.org, Jun 20 2018

Why is the bug fixed? Is it impossible for this timing issue to manifest in production?

Comment 7 by mmenke@chromium.org, Jun 20 2018

The network service is not used in production.  The test only failed in the test fixture when the network service was enabled.  Keeping an extra open bug for this particular issue when we have dozens of consumers to convert to a new API that doesn't exist yet also seems not a productive use of time.

Comment 8 by mmenke@chromium.org, Jun 20 2018

To explain further:  HostResolver itself is deprecated, in favor of a Mojo API that's still being worked on.  Certain consumers who try to use it when the network service is enabled crash.  We need to update them to the new API once we have it.

We will, at some point, need to audit existing consumers, and possibly make the old API inaccessible.  This bug provides no benefit to that, and it actually provides an extra step - anyone converting an API found in the audit would need to find this bug, realize it's related to the code he's working on, and mark this bug as fixed, as opposed to just filing a new one for that particular consumer.

Comment 9 by r...@chromium.org, Jun 20 2018

Makes sense. Thanks for the explanation and the quick fix!

Sign in to add a comment