Commit b460a40f authored by Jorge Lucangeli Obes's avatar Jorge Lucangeli Obes Committed by Commit Bot

Update worker tests to avoid hitting memory limits.

https://chromium-review.googlesource.com/c/chromium/src/+/641992,
the fix for crbug.com/752185, causes the following layout tests:

* fast/workers/worker-exception-during-navigation.html
* fast/workers/worker-multi-startup.html
* http/tests/workers/terminate-during-sync-operation-file.html
* http/tests/workers/terminate-during-sync-operation-filesystem.html
* virtual/mojo-loading/http/tests/workers/terminate-during-sync-operation-file.html
* virtual/mojo-loading/http/tests/workers/terminate-during-sync-operation-filesystem.html

to hit per-process memory limits on Linux. Fix by reducing the number
of workers created in the tests from 30 to 20.

See https://bugs.chromium.org/p/chromium/issues/detail?id=752185#c61
for an explanation.

BUG=752185
TEST=Layout tests pass with related change.

Change-Id: Ic0ebaaaad01ce05be5ca88214172d6141f57c2f0
Reviewed-on: https://chromium-review.googlesource.com/685718
Commit-Queue: Jorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
Reviewed-by: default avatarHiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: default avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505032}
parent 309089e7
......@@ -22,16 +22,16 @@ function test() {
}
// Create sufficiently large number of workers in hopes that one of the exceptions they throw will be processed in short time interval in
// which it could case the crash from the bug.
// which it could cause the crash from the bug.
var workers = [];
console.log("Creating the workers.")
for (var i = 0; i < 30; i++) {
for (var i = 0; i < 20; i++) {
setTimeout(function() {
try {
var worker = new Worker('resources/worker-exception.js');
worker.onerror = function(evt) {
// The number of worker exceptions that will be catched is not deterministic,
// so let's make sire the excption is not written to console to have deterministic text output.
// The number of worker exceptions that will be caught is not deterministic,
// so let's make sure the exception is not written to console to have deterministic text output.
evt.preventDefault();
};
workers.push(worker);
......
......@@ -20,15 +20,5 @@ SUCCESS: Worker context initialized
SUCCESS: Worker context initialized
SUCCESS: Worker context initialized
SUCCESS: Worker context initialized
SUCCESS: Worker context initialized
SUCCESS: Worker context initialized
SUCCESS: Worker context initialized
SUCCESS: Worker context initialized
SUCCESS: Worker context initialized
SUCCESS: Worker context initialized
SUCCESS: Worker context initialized
SUCCESS: Worker context initialized
SUCCESS: Worker context initialized
SUCCESS: Worker context initialized
DONE
......@@ -13,7 +13,7 @@ function log(message)
document.getElementById("result").innerHTML += message + "<br>";
}
totalWorkers = 30;
totalWorkers = 20;
replies = 0;
for (var i = 0; i < totalWorkers; i++) {
......
var workersStarted;
var workersClosed;
// 30 workers seemed to cause the crash to happen frequently.
var workers = new Array(30);
// More than 20 workers causes OOM crashes (hitting RLIMIT_DATA memory limits)
// on Linux.
var workers = new Array(20);
function startWorkers(operationName)
{
......
......@@ -23,16 +23,6 @@ Started worker count: 17
Started worker count: 18
Started worker count: 19
Started worker count: 20
Started worker count: 21
Started worker count: 22
Started worker count: 23
Started worker count: 24
Started worker count: 25
Started worker count: 26
Started worker count: 27
Started worker count: 28
Started worker count: 29
Started worker count: 30
Running operation.
Closed worker count: 1
Closed worker count: 2
......@@ -54,15 +44,5 @@ Closed worker count: 17
Closed worker count: 18
Closed worker count: 19
Closed worker count: 20
Closed worker count: 21
Closed worker count: 22
Closed worker count: 23
Closed worker count: 24
Closed worker count: 25
Closed worker count: 26
Closed worker count: 27
Closed worker count: 28
Closed worker count: 29
Closed worker count: 30
DONE
......@@ -23,16 +23,6 @@ Started worker count: 17
Started worker count: 18
Started worker count: 19
Started worker count: 20
Started worker count: 21
Started worker count: 22
Started worker count: 23
Started worker count: 24
Started worker count: 25
Started worker count: 26
Started worker count: 27
Started worker count: 28
Started worker count: 29
Started worker count: 30
Running operation.
Closed worker count: 1
Closed worker count: 2
......@@ -54,15 +44,5 @@ Closed worker count: 17
Closed worker count: 18
Closed worker count: 19
Closed worker count: 20
Closed worker count: 21
Closed worker count: 22
Closed worker count: 23
Closed worker count: 24
Closed worker count: 25
Closed worker count: 26
Closed worker count: 27
Closed worker count: 28
Closed worker count: 29
Closed worker count: 30
DONE
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment