New issue
Advanced search Search tips

Issue 836680 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 789111
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Layout Test http/tests/devtools/service-workers/service-workers-navigation-preload.js is flaky

Project Member Reported by horo@chromium.org, Apr 25 2018

Issue description

The following layout test sometimes crashes on Debug build
http/tests/devtools/service-workers/service-workers-navigation-preload.js

Probable cause:
https://test-results.appspot.com/data/layout_results/WebKit_Linux_Trusty__dbg_/11914/layout-test-results/http/tests/devtools/service-workers/service-workers-navigation-preload-stderr.txt

[13803:13803:0424/182352.292613:FATAL:ref_counted.h(83)] Check failed: CalledOnValidSequence(). 
#0 0x7ffa48d0972d base::debug::StackTrace::StackTrace()
#1 0x7ffa48a3453c base::debug::StackTrace::StackTrace()
#2 0x7ffa48aa5eea logging::LogMessage::~LogMessage()
#3 0x7ffa3e1d7194 base::subtle::RefCountedBase::Release()
#4 0x7ffa3e1d6fff base::RefCounted<>::Release()
#5 0x7ffa3e1d6fd5 scoped_refptr<>::Release()
#6 0x7ffa3e1d67ca scoped_refptr<>::~scoped_refptr()
#7 0x7ffa3e1fac03 network::ResourceResponseInfo::~ResourceResponseInfo()
#8 0x7ffa444ba565 network::ResourceResponseHead::~ResourceResponseHead()
#9 0x7ffa453af065 std::__1::__tuple_leaf<>::~__tuple_leaf()
#10 0x7ffa46094ac3 _ZNSt3__112__tuple_implINS_15__tuple_indicesIJLm0ELm1EEEEJ4GURLN7network20ResourceResponseHeadEEED2Ev
#11 0x7ffa46094a95 _ZNSt3__15tupleIJ4GURLN7network20ResourceResponseHeadEEED2Ev
#12 0x7ffa46094a63 _ZN4base8internal9BindStateIPFvRK4GURLRKN7network20ResourceResponseHeadERKNSt3__14pairIiiEERKNS9_12basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEEEJS2_S6_EED2Ev
#13 0x7ffa46094a27 _ZN4base8internal9BindStateIPFvRK4GURLRKN7network20ResourceResponseHeadERKNSt3__14pairIiiEERKNS9_12basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEEEJS2_S6_EE7DestroyEPKNS0_13BindStateBaseE
#14 0x7ffa489e5a35 base::internal::BindStateBaseRefCountTraits::Destruct()
#15 0x7ffa489e6758 base::RefCountedThreadSafe<>::Release()
#16 0x7ffa489e6715 scoped_refptr<>::Release()
#17 0x7ffa489e614a scoped_refptr<>::~scoped_refptr()
#18 0x7ffa489e5f65 base::internal::CallbackBase::~CallbackBase()
#19 0x7ffa441e6055 base::OnceCallback<>::~OnceCallback()
#20 0x7ffa441e4a35 base::RepeatingCallback<>::~RepeatingCallback()
#21 0x7ffa46090cb7 _ZNO4base17RepeatingCallbackIFvRKNSt3__14pairIiiEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEE3RunES5_SD_
#22 0x7ffa46090c10 _ZN4base8internal13FunctorTraitsINS_17RepeatingCallbackIFvRKNSt3__14pairIiiEERKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEEvE6InvokeISH_JS5_SD_EEEvOT_DpOT0_
#23 0x7ffa46090afd _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoINS_17RepeatingCallbackIFvRKNSt3__14pairIiiEERKNS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEJS7_SF_EEEvOT_DpOT0_
#24 0x7ffa46090aad _ZN4base8internal7InvokerINS0_9BindStateINS_17RepeatingCallbackIFvRKNSt3__14pairIiiEERKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEEEJS6_SE_EEEFvvEE7RunImplISI_NS4_5tupleIJS6_SE_EEEJLm0ELm1EEEEvOT_OT0_NS4_16integer_sequenceImJXspT1_EEEE
#25 0x7ffa460909c9 _ZN4base8internal7InvokerINS0_9BindStateINS_17RepeatingCallbackIFvRKNSt3__14pairIiiEERKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEEEJS6_SE_EEEFvvEE7RunOnceEPNS0_13BindStateBaseE
#26 0x7ffa489e31de _ZNO4base12OnceCallbackIFvvEE3RunEv
#27 0x7ffa48a35a02 base::debug::TaskAnnotator::RunTask()
#28 0x7ffa48ac5069 base::internal::IncomingTaskQueue::RunTask()
#29 0x7ffa48ace147 base::MessageLoop::RunTask()
#30 0x7ffa48ace3b8 base::MessageLoop::DeferOrRunPendingTask()
#31 0x7ffa48ace6e9 base::MessageLoop::DoWork()
#32 0x7ffa48ad286c base::MessagePumpGlib::HandleDispatch()
#33 0x7ffa48ad2fc1 base::(anonymous namespace)::WorkSourceDispatch()
#34 0x7ffa2ee59e04 g_main_context_dispatch
#35 0x7ffa2ee5a048 <unknown>
#36 0x7ffa2ee5a0ec g_main_context_iteration
#37 0x7ffa48ad295f base::MessagePumpGlib::Run()
#38 0x7ffa48acd93b base::MessageLoop::Run()
#39 0x7ffa48b76fed base::RunLoop::Run()
#40 0x7ffa45507581 content::BrowserMainLoop::MainMessageLoopRun()
#41 0x7ffa45507292 content::BrowserMainLoop::RunMainMessageLoopParts()
#42 0x7ffa4550e930 content::BrowserMainRunnerImpl::Run()
#43 0x000001460251 (anonymous namespace)::RunOneTest()
#44 0x00000145fe06 (anonymous namespace)::RunTests()
#45 0x00000145f889 LayoutTestBrowserMain()
#46 0x00000145d90a content::ShellMainDelegate::RunProcess()
#47 0x7ffa471fc23c content::RunNamedProcessTypeMain()
#48 0x7ffa471ffc54 content::ContentMainRunnerImpl::Run()
#49 0x7ffa471f2f95 content::ContentServiceManagerMainDelegate::RunEmbedderProcess()
#50 0x7ffa3cc20e9c service_manager::Main()
#51 0x7ffa471f91a5 content::ContentMain()
#52 0x000000622153 main
#53 0x7ffa2bda1f45 __libc_start_main
#54 0x00000062202a _start

 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 25 2018

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

commit 6cdec9f2c927988dd6f9a55b3cc878130b1935c5
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Wed Apr 25 10:50:19 2018

Make a deep copy of ResourceResponseHead to send NavigationPreload info to DevTools

HttpRawRequestResponseInfo in ResourceResponseInfo is not thread safe.
So if the shared ResourceResponseInfo is deleted on the UI thread,
DCHECK(CalledOnValidSequence()) in RefCountedBase::Release() fails.

To avoid this, this CL makes a deep copy of ResourceResponseHead before passing
it cross-thread.

This CL also introduces |devtools_enabled_| in DelegatingURLLoaderClient to avoid
unnecessary operations.

Bug:  836680 
Change-Id: I5cee9b2da8b6183b660e8fc6375d9ee7ab2da343
Reviewed-on: https://chromium-review.googlesource.com/1027390
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553505}
[modify] https://crrev.com/6cdec9f2c927988dd6f9a55b3cc878130b1935c5/content/browser/service_worker/service_worker_fetch_dispatcher.cc

Comment 2 by horo@chromium.org, Apr 26 2018

https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webkit_tests&tests=service-workers-navigation-preload

Humm..
The crash issue was fixed.
But the test is still flaky.

https://test-results.appspot.com/data/layout_results/WebKit_Linux_Trusty__dbg_/11933/layout-test-results/http/tests/devtools/service-workers/service-workers-navigation-preload-actual.txt
---------------
Tests the navigation request related events are available in the DevTools

Error: Uncaught (in promise) Error: Service Worker registration error: SecurityError: Failed to register a ServiceWorker: No URL is associated with the caller's document.
---------------

Comment 3 by horo@chromium.org, Apr 26 2018

Cc: falken@chromium.org
falken@
Do you have any idea about the "Failed to register" error?

Comment 4 by falken@chromium.org, Apr 26 2018

looks the same as issue 789111

Comment 5 by horo@chromium.org, Apr 26 2018

Mergedinto: 789111
Status: Duplicate (was: Assigned)
I think so too.

Sign in to add a comment