RESOLVED WONTFIX 10906
Parallelize run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=10906
Summary Parallelize run-webkit-tests
mitz
Reported 2006-09-17 13:40:03 PDT
Make run-webkit-tests run one DumpRenderTree instance per processor. Make this the default, but add an option to disable it or limit the number of instances.
Attachments
Just my work in progress on this bug. (19.96 KB, patch)
2009-03-20 16:53 PDT, David Levin
no flags
New work in progress. (66.13 KB, patch)
2009-04-08 10:47 PDT, David Levin
no flags
Eric Seidel (no email)
Comment 1 2006-09-18 00:29:19 PDT
This will require us to fix all the inter-test dependancies. (which is a good thing)
Eric Seidel (no email)
Comment 2 2006-09-18 01:01:50 PDT
This will likely require using threading in the run-webkit-tests perl script: http://www.mathematik.uni-ulm.de/help/perl5/doc/perlthrtut.html
Alexey Proskuryakov
Comment 3 2006-10-31 09:14:42 PST
From an IRC discussion, some of difficulties that needs to be fixed: - several Apache instances; - sharing of icon database, cookies and disk cache; - changing the display profile. Anything else?
Eric Seidel (no email)
Comment 4 2008-07-10 21:52:28 PDT
(In reply to comment #3) > From an IRC discussion, some of difficulties that needs to be fixed: > - several Apache instances; > - sharing of icon database, cookies and disk cache; > - changing the display profile. > > Anything else? I expect that we would implement this by running multiple instances of DRT. Instead of say multiple threads in one DRT. I assume we're all on the same page about that part. :) One running Apache should be enough to serve for all of these DRT instances, no? Icon DB, Cookies, Cache, etc. need to find some way to not be shared, yes. The changing the display profile should ideally be broken out into a separate tool, which knows how to set and reset the display profile. run-webkit-tests could then launch that tool. (Or just launch DRT with a specific set/reset arg). This was probably all said over IRC... but I've said it here just in case my comments are helpful. :)
Jacob Refstrup
Comment 5 2008-07-10 22:35:54 PDT
My initial thoughts for a design were as follows: - The main test loop starts with doing an openDumpTool(); just prior to that we would - if total number of outstanding tests was greater than threshold then wait for an one to finish - then fork another test (essentially just forking the perl program) - when test is done don't update the $tests{result} hash but rather exit with an error code and have the parent use that error code to update $tests{result}. Pros: - relatively simple Cons: - extra (perl) process per test Other ideas: - perhaps use real threads (rather than processes) to avoid overhead; not sure how the SIGPIPE handler would work then.
Mark Rowe (bdash)
Comment 6 2008-07-10 22:38:15 PDT
An extra perl process per test sounds like a large amount of overhead.
Jacob Refstrup
Comment 7 2008-07-10 22:55:38 PDT
(In reply to comment #6) > An extra perl process per test sounds like a large amount of overhead. > It does... Hm. Looking more closely at the current run-webkit-tests I realize that it attempts to keep the current DRT open by default for 1000 tests. So perhaps the best way of doing it is to keep N instances of DRT open for 1000 tests. That will leave one perl process coordinating everything (which is fine) but there's some logic needed to figure out which pipe was broken (in case of one of the DRTs crashing) and we need some select logic to wait for the output to be available.
Jacob Refstrup
Comment 8 2008-07-11 00:36:17 PDT
(In reply to comment #1) > This will require us to fix all the inter-test dependancies. (which is a good > thing) > Are the some examples of inter-test dependencies that I could check out?
Jacob Refstrup
Comment 9 2008-07-11 00:40:48 PDT
(In reply to comment #7) > Looking more closely at the current run-webkit-tests I realize that it attempts > to keep the current DRT open by default for 1000 tests. So perhaps the best way > of doing it is to keep N instances of DRT open for 1000 tests. That will leave > one perl process coordinating everything (which is fine) but there's some logic > needed to figure out which pipe was broken (in case of one of the DRTs > crashing) and we need some select logic to wait for the output to be available. > It looks like if we simply keep track of all the DRT instances and their file-handles and PIDs then we can use waitpid(-1,WNOHANG) in the SIGPIPE handler to figure out which DRT instance failed. The prologue and epilogue stuff will require some serialization -- but right now it looks like it's only windows that use them; and it'd be a great start if just MacOSX and linux could use parallel DRTs. I'll start putting something together... - Jacob
Alexey Proskuryakov
Comment 10 2008-07-11 01:03:25 PDT
(In reply to comment #8) > Are the some examples of inter-test dependencies that I could check out? You can try running the tests with --singly and/or --reverse options, which results in a bunch of failures. I am not aware of any interdependencies that are not caught by this.
mitz
Comment 11 2008-07-11 01:14:58 PDT
(In reply to comment #10) > (In reply to comment #8) > > Are the some examples of inter-test dependencies that I could check out? > > You can try running the tests with --singly and/or --reverse options, which > results in a bunch of failures. I am not aware of any interdependencies that > are not caught by this. > Or --random, if you are very adventurous.
Alexey Proskuryakov
Comment 12 2009-03-09 10:15:24 PDT
*** Bug 24460 has been marked as a duplicate of this bug. ***
David Levin
Comment 13 2009-03-20 16:53:39 PDT
Created attachment 28811 [details] Just my work in progress on this bug. This attachment isn't ready for review. It has several issues that I need to fix but I think it is headed in a nice direction and gives a feel for my current direction on this.
David Levin
Comment 14 2009-04-08 10:47:11 PDT
Created attachment 29339 [details] New work in progress.
David Levin
Comment 15 2009-11-19 15:53:15 PST
Unassigning from myself as I won't have time to work on this in the foreseeable future.
Dirk Pranke
Comment 16 2010-03-26 19:04:06 PDT
We might want to consider marking this as WONTFIX and just switching to new-run-webkit-tests, since that does support running in parallel.
Eric Seidel (no email)
Comment 17 2010-04-08 00:46:01 PDT
Yup. We're very close to having new-run-webkit-tests ready for prime-time. Closing this as WONTFIX.
Note You need to log in before you can comment on or make changes to this bug.