New issue
Advanced search Search tips

Issue 768980 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

ExecuteScriptAsync fails to timeout on long-running script

Project Member Reported by robertogden@chromium.org, Sep 26 2017

Issue description

Chrome Version: 61.0.3163.100
OS: Linux64

What steps will reproduce the problem?
(1) Call ExecuteScriptAsync with 'var arr = {}; arr.length = 2**53 - 1; Array.prototype.splice.call(arr, 0, 0, null);'

OR

(1) Change https://cs.chromium.org/chromium/src/chrome/test/chromedriver/js/execute_async_script_test.html?l=94&rcl=43dc91d8aca8d4620d2a2b4a857c744ff44c0a2b to use the above script instead of an empty script
(2) Open the test page, note the test hangs indefinitely.

Note: The given test script hangs Chrome when run from the console and is taken from Test262, https://github.com/tc39/test262/blob/master/test/built-ins/Array/prototype/splice/throws-if-integer-limit-exceeded.js

What is the expected result?
Timeout after the given timeout value.

What happens instead?
Test hangs forever

 
Thanks for reporting the issue!

It is consistently reproducible on the current stable Chrome browser v61.0.3163.100 with Chromedriver v2.32 .

Attaching the chromedriver verbose log for further investigation.
chromedriver.log
32.2 KB View Download
Cc: johnchen@chromium.org
Status: WontFix (was: Untriaged)
The JavaScript code given in the repro is a synchronous script, not an async one, since it runs a large amount of code with scheduling any async activities. The timeout mechanism only works with async scripts. Also, due to the single-threaded nature of JavaScript, the async script must not block the CPU for a long time, but must schedule all its activities as short async operations.

Here is an example async script that runs infinite amount of work, the type that the timeout is intended to work with:

var i=0; function doWork(){i++; setTimeout(doWork,0);} doWork();

Sign in to add a comment