Bug 159754 - Repeatedly creating and destroying workers that enqueue DFG plans can outpace the DFG worklist, which then causes VM shutdown to stall, which then causes memory growth
Summary: Repeatedly creating and destroying workers that enqueue DFG plans can outpace...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-13 22:06 PDT by Filip Pizlo
Modified: 2018-06-15 10:32 PDT (History)
11 users (show)

See Also:


Attachments
the change is small but the test is huge (1.26 MB, patch)
2016-07-13 22:12 PDT, Filip Pizlo
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-yosemite-wk2 (1.13 MB, application/zip)
2016-07-13 22:45 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews101 for mac-yosemite (985.07 KB, application/zip)
2016-07-13 23:01 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews125 for ios-simulator-wk2 (650.72 KB, application/zip)
2016-07-13 23:11 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews112 for mac-yosemite (1.71 MB, application/zip)
2016-07-13 23:13 PDT, Build Bot
no flags Details
the patch (1.26 MB, patch)
2016-07-13 23:32 PDT, Filip Pizlo
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-yosemite (791.73 KB, application/zip)
2016-07-14 00:20 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews107 for mac-yosemite-wk2 (898.86 KB, application/zip)
2016-07-14 00:23 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews114 for mac-yosemite (1.43 MB, application/zip)
2016-07-14 00:32 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews122 for ios-simulator-wk2 (610.12 KB, application/zip)
2016-07-14 00:42 PDT, Build Bot
no flags Details
the patch (1.37 MB, patch)
2016-07-14 00:58 PDT, Filip Pizlo
ggaren: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews116 for mac-yosemite (1.55 MB, application/zip)
2016-07-14 01:45 PDT, Build Bot
no flags Details
patch for landing (1.38 MB, patch)
2016-07-14 12:58 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
patch for landing (1.38 MB, patch)
2016-07-14 13:28 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
performance (78.27 KB, text/plain)
2016-07-14 13:29 PDT, Filip Pizlo
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2016-07-13 22:06:35 PDT
Patch forthcoming
Comment 1 Filip Pizlo 2016-07-13 22:12:16 PDT
Created attachment 283597 [details]
the change is small but the test is huge
Comment 2 Build Bot 2016-07-13 22:45:25 PDT
Comment on attachment 283597 [details]
the change is small but the test is huge

Attachment 283597 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1678247

New failing tests:
workers/bomb.html
webgl/1.0.2/conformance/typedarrays/typed-arrays-in-workers.html
http/tests/fetch/caching-with-different-options.html
Comment 3 Build Bot 2016-07-13 22:45:29 PDT
Created attachment 283600 [details]
Archive of layout-test-results from ews104 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 4 Build Bot 2016-07-13 23:01:38 PDT
Comment on attachment 283597 [details]
the change is small but the test is huge

Attachment 283597 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1678308

New failing tests:
webgl/1.0.2/conformance/typedarrays/typed-arrays-in-workers.html
workers/bomb.html
Comment 5 Build Bot 2016-07-13 23:01:41 PDT
Created attachment 283602 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 6 Build Bot 2016-07-13 23:11:22 PDT
Comment on attachment 283597 [details]
the change is small but the test is huge

Attachment 283597 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1678312

New failing tests:
workers/bomb.html
imported/w3c/web-platform-tests/streams/readable-streams/bad-underlying-sources.https.html
imported/w3c/web-platform-tests/XMLHttpRequest/open-user-password-non-same-origin.htm
Comment 7 Build Bot 2016-07-13 23:11:25 PDT
Created attachment 283603 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.5
Comment 8 Build Bot 2016-07-13 23:13:19 PDT
Comment on attachment 283597 [details]
the change is small but the test is huge

Attachment 283597 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1678319

New failing tests:
webgl/1.0.2/conformance/context/context-release-with-workers.html
Comment 9 Build Bot 2016-07-13 23:13:22 PDT
Created attachment 283604 [details]
Archive of layout-test-results from ews112 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 10 Filip Pizlo 2016-07-13 23:31:57 PDT
Oh man, such a perfect score!
Comment 11 Filip Pizlo 2016-07-13 23:32:42 PDT
Created attachment 283606 [details]
the patch

Should fix those crashes.  It was a latent bug!  We'd leave cancelled plans in m_readyPlans!
Comment 12 Build Bot 2016-07-14 00:20:03 PDT
Comment on attachment 283606 [details]
the patch

Attachment 283606 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1678616

New failing tests:
workers/bomb.html
Comment 13 Build Bot 2016-07-14 00:20:07 PDT
Created attachment 283613 [details]
Archive of layout-test-results from ews103 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 14 Build Bot 2016-07-14 00:23:16 PDT
Comment on attachment 283606 [details]
the patch

Attachment 283606 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1678621

New failing tests:
workers/bomb.html
Comment 15 Build Bot 2016-07-14 00:23:19 PDT
Created attachment 283616 [details]
Archive of layout-test-results from ews107 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 16 Build Bot 2016-07-14 00:32:53 PDT
Comment on attachment 283606 [details]
the patch

Attachment 283606 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1678632

New failing tests:
workers/bomb.html
Comment 17 Build Bot 2016-07-14 00:32:58 PDT
Created attachment 283618 [details]
Archive of layout-test-results from ews114 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 18 Build Bot 2016-07-14 00:42:43 PDT
Comment on attachment 283606 [details]
the patch

Attachment 283606 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1678647

New failing tests:
workers/bomb.html
Comment 19 Build Bot 2016-07-14 00:42:48 PDT
Created attachment 283619 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.5
Comment 20 Filip Pizlo 2016-07-14 00:58:30 PDT
Created attachment 283622 [details]
the patch
Comment 21 Build Bot 2016-07-14 01:45:27 PDT
Comment on attachment 283622 [details]
the patch

Attachment 283622 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1678923

New failing tests:
workers/bomb.html
Comment 22 Build Bot 2016-07-14 01:45:31 PDT
Created attachment 283625 [details]
Archive of layout-test-results from ews116 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 23 Geoffrey Garen 2016-07-14 09:37:15 PDT
Comment on attachment 283622 [details]
the patch

r=me if you fix the bot failure.

Regressions: Unexpected timeouts (1)
  workers/bomb.html [ Timeout ]

Can we make this test less aggressive? Otherwise, I guess we have to skip it in debug builds.
Comment 24 Filip Pizlo 2016-07-14 12:04:04 PDT
(In reply to comment #23)
> Comment on attachment 283622 [details]
> the patch
> 
> r=me if you fix the bot failure.
> 
> Regressions: Unexpected timeouts (1)
>   workers/bomb.html [ Timeout ]
> 
> Can we make this test less aggressive? Otherwise, I guess we have to skip it
> in debug builds.

I think we have to skip it in debug builds.  This test won't trigger the bug unless you run it for about as long as I'm running it for.

Alexey and I have been chatting about how to incorporate such tests.  I want this test to grow larger - for example it doesn't yet create V8-v6 workers - because that will catch more bugs.  Like, we might get some interesting worker-related GC bugs if we throw v8-splay into the mix.  That means that the test will probably run too long to make sense for run-webkit-tests even in release mode.  Probably we want this test to run on a bot, but we don't currently have a bot for long-running stress tests.  We will have to think about how best to do this.  I was thinking that in the short-term we might have to skip this test altogether, but leave it checked in.  We can run it manually from time to time.  As we accumulate more such tests, hopefully we'll think of a good process for them.

I bet we'll need more such tests once we do SharedArrayBuffer and concurrent JS.  I remember that I had a collection of regression tests for Fiji that didn't fit well into continuous integration because you had to run them for half an hour to be sure that everything was fine.  They all had to do with races between user-started threads.  The gnarliest races involved the VM's handling of thread start/stop, which is sort of what workers/bomb.html is testing.
Comment 25 Filip Pizlo 2016-07-14 12:58:01 PDT
Created attachment 283670 [details]
patch for landing
Comment 26 Filip Pizlo 2016-07-14 13:28:24 PDT
Created attachment 283673 [details]
patch for landing
Comment 27 Filip Pizlo 2016-07-14 13:29:02 PDT
Created attachment 283674 [details]
performance

It's neutral.  I was worried it would hurt because I removed the Compiled state from Plan, but it seems that state was 100% useless.
Comment 28 Filip Pizlo 2016-07-18 13:32:45 PDT
Landed in https://trac.webkit.org/changeset/203370
Comment 29 Carlos Alberto Lopez Perez 2016-07-21 10:18:53 PDT
I have marked workers/bomb.html as slow for GTK/EFL in https://trac.webkit.org/changeset/203509 as it was timing out constantly. It takes 15-20 seconds to pass which is too much for standard tests.

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#tests=workers%2Fbomb.html

Maybe it should be marked as slow on the general test expectations file? Seems it also takes a lot on mac -- On a macpro that I have at hand here it takes 13 seconds.
Comment 30 Claudio Saavedra 2017-05-29 10:38:02 PDT
Did the same for WPE, fwiw. http://trac.webkit.org/changeset/217539
Comment 31 Michael Catanzaro 2018-06-15 10:32:35 PDT
It's timing out for GTK even when marked slow. We'll just need to skip it.