New issue
Advanced search Search tips

Issue 814310 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

ParallelDownloadTest.ResumptionLastSliceUnfinished failing on WinAsan

Project Member Reported by thakis@chromium.org, Feb 21 2018

Issue description

https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.clang%2FCrWinAsan%2F339%2F%2B%2Frecipes%2Fsteps%2Fcontent_browsertests%2F0%2Flogs%2FParallelDownloadTest.ResumptionLastSliceUnfinished%2F0


=================================================================
==3536==ERROR: AddressSanitizer: stack-buffer-underflow on address 0x2585eb8f at pc 0x11a0b772 bp 0x2585eaf4 sp 0x2585eae4
READ of size 1 at 0x2585eb8f thread T22
==3536==*** WARNING: Failed to initialize DbgHelp!              ***
==3536==*** Most likely this means that the app is already      ***
==3536==*** using DbgHelp, possibly with incompatible flags.    ***
==3536==*** Due to technical reasons, symbolization might crash ***
==3536==*** or produce wrong results.                           ***
    #0 0x11a0b78c in __asan_memmove c:\b\c\b\crwinasan\src\third_party\llvm\projects\compiler-rt\lib\asan\asan_interceptors_memintrinsics.cc:31
    #1 0xa41b43 in std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign+0xf3 (e:\b\s\w\ir\out\Release\content_browsertests.exe+0x401b43)
    #2 0x74871c6 in content::TestDownloadHttpResponse::GetPatternBytes C:\b\c\b\CrWinAsan\src\content\public\test\test_download_http_response.cc:298
    #3 0x748772c in content::TestDownloadHttpResponse::GetResponseBody C:\b\c\b\CrWinAsan\src\content\public\test\test_download_http_response.cc:333
    #4 0x7487bac in content::TestDownloadHttpResponse::SendResponse C:\b\c\b\CrWinAsan\src\content\public\test\test_download_http_response.cc:358
    #5 0x774ddf8 in net::test_server::EmbeddedTestServer::HandleRequest C:\b\c\b\CrWinAsan\src\net\test\embedded_test_server\embedded_test_server.cc:236
    #6 0x775305d in base::internal::FunctorTraits<void (net::test_server::EmbeddedTestServer::*)(net::test_server::HttpConnection *, std::unique_ptr<net::test_server::HttpRequest,std::default_delete<net::test_server::HttpRequest> >) __attribute__((thiscall)),void>::Invoke<net::test_server::EmbeddedTestServer *,net::test_server::HttpConnection *,std::unique_ptr<net::test_server::HttpRequest,std::default_delete<net::test_server::HttpRequest> > > C:\b\c\b\CrWinAsan\src\base\bind_internal.h:447
    #7 0x7752e45 in base::internal::Invoker<base::internal::BindState<void (net::test_server::EmbeddedTestServer::*)(net::test_server::HttpConnection *, std::unique_ptr<net::test_server::HttpRequest,std::default_delete<net::test_server::HttpRequest> >) __attribute__((thiscall)),base::internal::UnretainedWrapper<net::test_server::EmbeddedTestServer> >,void (net::test_server::HttpConnection *, std::unique_ptr<net::test_server::HttpRequest,std::default_delete<net::test_server::HttpRequest> >)>::Run C:\b\c\b\CrWinAsan\src\base\bind_internal.h:586
    #8 0x7784853 in net::test_server::HttpConnection::ConsumeData C:\b\c\b\CrWinAsan\src\net\test\embedded_test_server\http_connection.cc:46
    #9 0x775082d in net::test_server::EmbeddedTestServer::HandleReadResult C:\b\c\b\CrWinAsan\src\net\test\embedded_test_server\embedded_test_server.cc:446
    #10 0x7750722 in net::test_server::EmbeddedTestServer::OnReadCompleted C:\b\c\b\CrWinAsan\src\net\test\embedded_test_server\embedded_test_server.cc:431
    #11 0xed0a339 in base::internal::Invoker<base::internal::BindState<void (content::PepperDeviceEnumerationHostHelper::*)(unsigned int, const std::vector<ppapi::DeviceRefData,std::allocator<ppapi::DeviceRefData> > &) __attribute__((thiscall)),base::internal::UnretainedWrapper<content::PepperDeviceEnumerationHostHelper>,unsigned int>,void (const std::vector<ppapi::DeviceRefData,std::allocator<ppapi::DeviceRefData> > &)>::Run C:\b\c\b\CrWinAsan\src\base\bind_internal.h:586
    #12 0x84ae08a in net::TCPClientSocket::DidCompleteRead C:\b\c\b\CrWinAsan\src\net\socket\tcp_client_socket.cc:371
    #13 0x8a71787 in base::internal::Invoker<base::internal::BindState<void (net::SOCKS5ClientSocket::*)(const base::RepeatingCallback<void (int)> &, int) __attribute__((thiscall)),base::internal::UnretainedWrapper<net::SOCKS5ClientSocket>,base::RepeatingCallback<void (int)> >,void (int)>::Run C:\b\c\b\CrWinAsan\src\base\bind_internal.h:586
    #14 0x84ab2a0 in net::TCPSocketWin::RetryRead C:\b\c\b\CrWinAsan\src\net\socket\tcp_socket_win.cc:906
    #15 0x8b253c1 in base::internal::Invoker<base::internal::BindState<void (net::HttpProxyClientSocket::*)(int) __attribute__((thiscall)),base::internal::UnretainedWrapper<net::HttpProxyClientSocket> >,void (int)>::Run C:\b\c\b\CrWinAsan\src\base\bind_internal.h:586
    #16 0x84a719e in net::TCPSocketWin::DidSignalRead C:\b\c\b\CrWinAsan\src\net\socket\tcp_socket_win.cc:1012
    #17 0x84a6bb6 in net::TCPSocketWin::Core::ReadDelegate::OnObjectSignaled C:\b\c\b\CrWinAsan\src\net\socket\tcp_socket_win.cc:221
    #18 0x812c388 in base::win::ObjectWatcher::Signal C:\b\c\b\CrWinAsan\src\base\win\object_watcher.cc:110
    #19 0x2bf592f in base::internal::Invoker<base::internal::BindState<void (media::SerialRunner::*)(media::PipelineStatus) __attribute__((thiscall)),base::WeakPtr<media::SerialRunner>,media::PipelineStatus>,void ()>::Run+0x7f (e:\b\s\w\ir\out\Release\content_browsertests.exe+0x25b592f)
    #20 0x8182e71 in base::debug::TaskAnnotator::RunTask C:\b\c\b\CrWinAsan\src\base\debug\task_annotator.cc:55
    #21 0x8205562 in base::internal::IncomingTaskQueue::RunTask C:\b\c\b\CrWinAsan\src\base\message_loop\incoming_task_queue.cc:124
    #22 0x800c66a in base::MessageLoop::RunTask+0x71a (e:\b\s\w\ir\out\Release\content_browsertests.exe+0x79cc66a)
    #23 0x800d7b5 in base::MessageLoop::DeferOrRunPendingTask+0x95 (e:\b\s\w\ir\out\Release\content_browsertests.exe+0x79cd7b5)
    #24 0x800dc31 in base::MessageLoop::DoWork+0x371 (e:\b\s\w\ir\out\Release\content_browsertests.exe+0x79cdc31)
    #25 0x81a4c28 in base::MessagePumpForIO::DoRunLoop C:\b\c\b\CrWinAsan\src\base\message_loop\message_pump_win.cc:475
    #26 0x81a207c in base::MessagePumpWin::Run C:\b\c\b\CrWinAsan\src\base\message_loop\message_pump_win.cc:56
    #27 0x800b8e3 in base::MessageLoop::Run+0x73 (e:\b\s\w\ir\out\Release\content_browsertests.exe+0x79cb8e3)
    #28 0x7fcab80 in base::RunLoop::Run C:\b\c\b\CrWinAsan\src\base\run_loop.cc:133
    #29 0x810055a in base::Thread::Run C:\b\c\b\CrWinAsan\src\base\threading\thread.cc:255
    #30 0x81009f6 in base::Thread::ThreadMain C:\b\c\b\CrWinAsan\src\base\threading\thread.cc:338
    #31 0x7fddcab in base::`anonymous namespace'::ThreadFunc C:\b\c\b\CrWinAsan\src\base\threading\platform_thread_win.cc:91
    #32 0x11a05141 in __asan::AsanThread::ThreadStart c:\b\c\b\crwinasan\src\third_party\llvm\projects\compiler-rt\lib\asan\asan_thread.cc:259
    #33 0x11a03dcd in asan_thread_start c:\b\c\b\crwinasan\src\third_party\llvm\projects\compiler-rt\lib\asan\asan_win.cc:136
    #34 0x76183389 in BaseThreadInitThunk+0x11 (C:\Windows\syswow64\kernel32.dll+0x7dd73389)
    #35 0x77559901 in RtlInitializeExceptionChain+0x62 (C:\Windows\SysWOW64\ntdll.dll+0x7dea9901)
    #36 0x775598d4 in RtlInitializeExceptionChain+0x35 (C:\Windows\SysWOW64\ntdll.dll+0x7dea98d4)
Address 0x2585eb8f is located in stack of thread T22 at offset 15 in frame
    #0 0x7486f6f in content::TestDownloadHttpResponse::GetPatternBytes C:\b\c\b\CrWinAsan\src\content\public\test\test_download_http_response.cc:289
  This frame has 2 object(s):
    [16, 24) 'data' (line 294) <== Memory access at offset 15 underflows this variable
    [48, 72) 'string_to_append' (line 298)
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp, SEH and C++ exceptions *are* supported)
Thread T22 created by T0 here:
    #0 0x11a03ed2 in __asan_wrap_CreateThread c:\b\c\b\crwinasan\src\third_party\llvm\projects\compiler-rt\lib\asan\asan_win.cc:146
    #1 0x7fdd4cc in base::`anonymous namespace'::CreateThreadInternal C:\b\c\b\CrWinAsan\src\base\threading\platform_thread_win.cc:130
    #2 0x7fdd3a3 in base::PlatformThread::CreateWithPriority C:\b\c\b\CrWinAsan\src\base\threading\platform_thread_win.cc:209
    #3 0x80ffb9b in base::Thread::StartWithOptions C:\b\c\b\CrWinAsan\src\base\threading\thread.cc:112
    #4 0x774b813 in net::test_server::EmbeddedTestServer::StartAcceptingConnections C:\b\c\b\CrWinAsan\src\net\test\embedded_test_server\embedded_test_server.cc:176
    #5 0x774a1ef in net::test_server::EmbeddedTestServer::Start C:\b\c\b\CrWinAsan\src\net\test\embedded_test_server\embedded_test_server.cc:93
    #6 0xcd7c79 in content::`anonymous namespace'::DownloadContentTest::SetUpOnMainThread C:\b\c\b\CrWinAsan\src\content\browser\download\download_browsertest.cc:725
    #7 0x74ad39f in content::BrowserTestBase::ProxyRunTestOnMainThreadLoop C:\b\c\b\CrWinAsan\src\content\public\test\browser_test_base.cc:344
    #8 0x75af9d7 in content::ShellBrowserMainParts::PreMainMessageLoopRun C:\b\c\b\CrWinAsan\src\content\shell\browser\shell_browser_main_parts.cc:208
    #9 0x3838458 in content::BrowserMainLoop::PreMainMessageLoopRun+0x168 (e:\b\s\w\ir\out\Release\content_browsertests.exe+0x31f8458)
    #10 0x4681e87 in content::StartupTaskRunner::RunAllTasksNow C:\b\c\b\CrWinAsan\src\content\browser\startup_task_runner.cc:45
    #11 0x3832fa3 in content::BrowserMainLoop::CreateStartupTasks C:\b\c\b\CrWinAsan\src\content\browser\browser_main_loop.cc:986
    #12 0x384253f in content::BrowserMainRunnerImpl::Initialize C:\b\c\b\CrWinAsan\src\content\browser\browser_main_runner.cc:139
    #13 0xf6b3829 in ShellBrowserMain C:\b\c\b\CrWinAsan\src\content\shell\browser\shell_browser_main.cc:23
    #14 0xf6b0b27 in content::ShellMainDelegate::RunProcess C:\b\c\b\CrWinAsan\src\content\shell\app\shell_main_delegate.cc:322
    #15 0x34aef7a in content::RunNamedProcessTypeMain C:\b\c\b\CrWinAsan\src\content\app\content_main_runner.cc:410
    #16 0x34b0388 in content::ContentMainRunnerImpl::Run C:\b\c\b\CrWinAsan\src\content\app\content_main_runner.cc:713
    #17 0xb5547dc in service_manager::Main C:\b\c\b\CrWinAsan\src\services\service_manager\embedder\main.cc:456
    #18 0x34aedc5 in content::ContentMain C:\b\c\b\CrWinAsan\src\content\app\content_main.cc:19
    #19 0x74ac767 in content::BrowserTestBase::SetUp C:\b\c\b\CrWinAsan\src\content\public\test\browser_test_base.cc:309
    #20 0x743d947 in content::ContentBrowserTest::SetUp C:\b\c\b\CrWinAsan\src\content\public\test\content_browser_test.cc:89
    #21 0x1bb6fb1 in testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void> C:\b\c\b\CrWinAsan\src\third_party\googletest\src\googletest\src\gtest.cc:2451
    #22 0x1bb6ac1 in testing::Test::Run C:\b\c\b\CrWinAsan\src\third_party\googletest\src\googletest\src\gtest.cc:2463
    #23 0x1bb8e4c in testing::TestInfo::Run C:\b\c\b\CrWinAsan\src\third_party\googletest\src\googletest\src\gtest.cc:2645
    #24 0x1bb9eed in testing::TestCase::Run C:\b\c\b\CrWinAsan\src\third_party\googletest\src\googletest\src\gtest.cc:2763
    #25 0x1bca58a in testing::internal::UnitTestImpl::RunAllTests C:\b\c\b\CrWinAsan\src\third_party\googletest\src\googletest\src\gtest.cc:4638
    #26 0x1bc9d01 in testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool> C:\b\c\b\CrWinAsan\src\third_party\googletest\src\googletest\src\gtest.cc:2451
    #27 0x1bc99f9 in testing::UnitTest::Run C:\b\c\b\CrWinAsan\src\third_party\googletest\src\googletest\src\gtest.cc:4250
    #28 0x753032e in base::TestSuite::Run C:\b\c\b\CrWinAsan\src\base\test\test_suite.cc:272
    #29 0xf698aad in content::ContentTestLauncherDelegate::RunTestSuite C:\b\c\b\CrWinAsan\src\content\test\content_test_launcher.cc:108
    #30 0x74b126c in content::LaunchTests+0x3fc (e:\b\s\w\ir\out\Release\content_browsertests.exe+0x6e7126c)
    #31 0xf698976 in main C:\b\c\b\CrWinAsan\src\content\test\content_test_launcher.cc:138
    #32 0x11a1f679 in __scrt_common_main_seh f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283
    #33 0x76183389 in BaseThreadInitThunk+0x11 (C:\Windows\syswow64\kernel32.dll+0x7dd73389)
    #34 0x77559901 in RtlInitializeExceptionChain+0x62 (C:\Windows\SysWOW64\ntdll.dll+0x7dea9901)
    #35 0x775598d4 in RtlInitializeExceptionChain+0x35 (C:\Windows\SysWOW64\ntdll.dll+0x7dea98d4)
SUMMARY: AddressSanitizer: stack-buffer-underflow c:\b\c\b\crwinasan\src\third_party\llvm\projects\compiler-rt\lib\asan\asan_interceptors_memintrinsics.cc:31 in __asan_memmove
Shadow bytes around the buggy address:
  0x34b0bd20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x34b0bd30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x34b0bd40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x34b0bd50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x34b0bd60: f1 f1 01 f3 00 00 00 00 00 00 00 00 00 00 00 00
=>0x34b0bd70: f1[f1]00 f2 f2 f2 00 00 00 f3 f3 f3 f3 f3 00 00
  0x34b0bd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x34b0bd90: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f8 f8
  0x34b0bda0: f8 f2 f2 f2 f2 f2 00 00 00 f2 f2 f2 f2 f2 00 00
  0x34b0bdb0: 00 f2 f2 f2 f2 f2 f8 f8 f8 f2 f2 f2 f2 f2 00 00
  0x34b0bdc0: 00 f2 f2 f2 f2 f2 f8 f2 f8 f8 f2 f2 f8 f2 f8 f3
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==3536==ABORTING


Looks like this is a new test from https://chromium-review.googlesource.com/c/chromium/src/+/910688
 
Thanks for reporting, this is probably caused by windows network layer flush all the data at once in embedded test server. 

Disabling now.
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 21 2018

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

commit 959bc37c5d5aa34c9b8d8833fe761a488180c444
Author: Xing Liu <xingliu@chromium.org>
Date: Wed Feb 21 19:39:59 2018

Disable ParallelDownloadTest.ResumptionLastSliceUnfinished on Windows.

Disable a failing test on Windows.

TBR=dtrainor@chromium.org,qinmin@chromium.org

Bug:  814310 
Change-Id: I7cb5678afef7b69b83fa03111bcb3c2a2c298f5e
Reviewed-on: https://chromium-review.googlesource.com/929427
Reviewed-by: Xing Liu <xingliu@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538187}
[modify] https://crrev.com/959bc37c5d5aa34c9b8d8833fe761a488180c444/content/browser/download/download_browsertest.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Mar 28 2018

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

commit 37350273e8213270ad14c74bd5571ee207fcfd0a
Author: Xing Liu <xingliu@chromium.org>
Date: Wed Mar 28 00:41:19 2018

Send network data in small buffers in TestDownloadHttpResponse.

Currently TestDownloadHttpResponse may potentially load large memory
into stack, which causes stack underflow on some mobile builders. This
CL makes it send data in 64KB buffer. It's also more realistic than
sending all data in one large buffer.

We also currently wraps all states into a callback which may
recursively call itself to send data after test_server::HttpResponse is
deleted in EmbeddedTestServer::HandleRequest.

This CL no longer uses callback but creates a shim
test_server::HttpResponse for embeded test server, and make
TestDownloadHttpResponse's life time controlled by the test handler
instead of embedded test server.

TBR=sky@chromium.org

Bug:  814310 ,817801
Change-Id: I9ddad06479af36091d615add6d2ec16e3b4451b2
Reviewed-on: https://chromium-review.googlesource.com/974287
Commit-Queue: Xing Liu <xingliu@chromium.org>
Reviewed-by: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546338}
[modify] https://crrev.com/37350273e8213270ad14c74bd5571ee207fcfd0a/content/browser/download/download_browsertest.cc
[modify] https://crrev.com/37350273e8213270ad14c74bd5571ee207fcfd0a/content/public/test/OWNERS
[modify] https://crrev.com/37350273e8213270ad14c74bd5571ee207fcfd0a/content/public/test/test_download_http_response.cc
[modify] https://crrev.com/37350273e8213270ad14c74bd5571ee207fcfd0a/content/public/test/test_download_http_response.h

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 6 2018

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

commit e116df9a40a7e3902e42851dd411ab3e9a1a4169
Author: Xing Liu <xingliu@chromium.org>
Date: Fri Apr 06 22:11:58 2018

Enable ParallelDownloadTest.ResumptionLastSliceUnfinished

The stack underflow flakiness issue should have been fixed, this CL
enables the test on Win and Android.

TBR=dtrainor@chromium.org, qinmin@chromium.org

Bug:  814310 ,817801
Change-Id: I9de3845fdc53f637580a0b6a427026df9b465f7b
Reviewed-on: https://chromium-review.googlesource.com/999959
Reviewed-by: Min Qin <qinmin@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548945}
[modify] https://crrev.com/e116df9a40a7e3902e42851dd411ab3e9a1a4169/content/browser/download/download_browsertest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment