New issue
Advanced search Search tips

Issue 716439 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 692856
Owner: ----
Closed: Apr 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Revalidating scripts breaks execution

Reported by land...@opera.com, Apr 28 2017

Issue description

Chrome Version: 59.0.3063.4
OS: Linux

What steps will reproduce the problem?
(1) Build with dcheck_always_on=true
(2) Load http://ynet.co.il

This issue is quite hard to reproduce since it is timing dependent. We have a pretty good reproduction rate (1 of 5) in our own product but I have not been able to reproduce it in content_shell or chrome.

What is the expected result?
No DCHECK triggered

What happens instead?
DCHECK is triggered with as follows:

[1:1:0425/085701.336136:9675643037286:FATAL:PendingScript.cpp(230)] Check failed: resource()->isLoaded(). 
#0 0x7fb928ed84f7 base::debug::StackTrace::StackTrace()
#1 0x7fb928ef80f7 logging::LogMessage::~LogMessage()
#2 0x7fb92b367e4c blink::PendingScript::getSource()
#3 0x7fb92b398a30 blink::ScriptLoader::execute()
#4 0x7fb92b399c4c blink::ScriptRunner::executeTaskFromQueue()
#5 0x7fb92b399c8b blink::ScriptRunner::executeTask()
#6 0x7fb928ed9a78 base::debug::TaskAnnotator::RunTask()
#7 0x7fb92a7d1a3a blink::scheduler::TaskQueueManager::ProcessTaskFromWorkQueue()
#8 0x7fb92a7d2d0d blink::scheduler::TaskQueueManager::DoWork()
#9 0x7fb928ed9a78 base::debug::TaskAnnotator::RunTask()
#10 0x7fb928f07200 base::MessageLoop::RunTask()
#11 0x7fb928f0917d base::MessageLoop::DeferOrRunPendingTask()
#12 0x7fb928f0a09e base::MessageLoop::DoWork()
#13 0x7fb928f0bcb2 base::MessagePumpDefault::Run()
#14 0x7fb928f0b43f base::MessageLoop::RunHandler()
#15 0x7fb928f31a6b base::RunLoop::Run()
#16 0x7fb92ca6a316 content::RendererMain()
#17 0x7fb928963222 content::RunZygote()
#18 0x7fb92896361b content::RunNamedProcessTypeMain()
#19 0x7fb9289636bd content::ContentMainRunnerImpl::Run()

I have debugged this down to the following scenario:
A script is loaded and is scheduled for execution. Before it is actually run there is another request for it and a revalidation is started (probably due to server http headers). Before the revalidation finishes the execution starts and the DCHECK is fired since the resource is not in "loaded" state anymore.


 

Comment 1 by land...@opera.com, Apr 28 2017

I have submitted a patch for this issue: https://codereview.chromium.org/2845313002/

I don't know if this solution is any good but at least it demonstrates a way to avoid the problems.
This is a duplicate of  Issue 692856 .

Mergedinto: 692856
Status: Duplicate (was: Untriaged)

Sign in to add a comment