Bug 94254 - [chromium] Do not allow infinite pending frames in CCFrameRateController
Summary: [chromium] Do not allow infinite pending frames in CCFrameRateController
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brian Anderson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-16 14:52 PDT by Brian Anderson
Modified: 2012-09-04 11:37 PDT (History)
7 users (show)

See Also:


Attachments
Patch (169.21 KB, patch)
2012-08-16 15:05 PDT, Brian Anderson
no flags Details | Formatted Diff | Diff
Patch (9.68 KB, patch)
2012-08-16 15:21 PDT, Brian Anderson
no flags Details | Formatted Diff | Diff
Patch (10.65 KB, patch)
2012-08-20 13:25 PDT, Brian Anderson
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from gce-cr-linux-06 (367.75 KB, application/zip)
2012-08-20 15:49 PDT, WebKit Review Bot
no flags Details
Patch (9.79 KB, patch)
2012-08-20 17:36 PDT, Brian Anderson
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from gce-cr-linux-01 (567.72 KB, application/zip)
2012-08-20 18:38 PDT, WebKit Review Bot
no flags Details
Patch (9.79 KB, patch)
2012-08-21 16:23 PDT, Brian Anderson
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from gce-cr-linux-03 (503.19 KB, application/zip)
2012-08-21 17:47 PDT, WebKit Review Bot
no flags Details
Patch (9.77 KB, patch)
2012-08-29 19:12 PDT, Brian Anderson
no flags Details | Formatted Diff | Diff
Patch (8.28 KB, patch)
2012-08-31 10:53 PDT, Brian Anderson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Anderson 2012-08-16 14:52:06 PDT
[chromium] Do not allow infinite pendign frames in CCFrameRateController
Comment 1 Brian Anderson 2012-08-16 15:05:14 PDT
Created attachment 158915 [details]
Patch
Comment 2 Brian Anderson 2012-08-16 15:21:35 PDT
Created attachment 158922 [details]
Patch
Comment 3 Brian Anderson 2012-08-16 15:28:18 PDT
Comment on attachment 158922 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=158922&action=review

Not sure how swap acks are supposed to work for testing.  Should we be seeing them during tests?  They don't show up currently, so I had to add fake swap acks.  The tests seem to rely on being able to submit infinite frames otherwise.

> Source/WebKit/chromium/tests/CCThreadedTest.cpp:155
> +    // run until after the lifetime of its client.

Is there a more automatic way to cancel tasks that outlive the objects it references?

> Source/WebKit/chromium/tests/CCThreadedTest.cpp:182
> +        CCProxy::implThread()->postDelayedTask(adoptPtr(swapAck), 15);

Do we want realistic swap ack delays for testing?  Or should we make this delay shorter/zero?
Comment 4 James Robinson 2012-08-19 12:26:42 PDT
Nat / John - whatcha think?
Comment 5 John Bates 2012-08-20 09:46:57 PDT
Comment on attachment 158922 [details]
Patch

Maybe there should be an assert(maxFramesPending > 0) in CCFrameRateController::setMaxFramesPending?
Comment 6 Brian Anderson 2012-08-20 13:25:17 PDT
Created attachment 159507 [details]
Patch
Comment 7 Brian Anderson 2012-08-20 13:28:08 PDT
Rebased.

Added assert(maxFramesPending > 0) back in to CCFrameRateController::setMaxFramesPending.  (It used to be part of a previous patch.)

Questions from comment #3 still apply.
Comment 8 Nat Duca 2012-08-20 13:29:31 PDT
Comment on attachment 158922 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=158922&action=review

>> Source/WebKit/chromium/tests/CCThreadedTest.cpp:182
>> +        CCProxy::implThread()->postDelayedTask(adoptPtr(swapAck), 15);
> 
> Do we want realistic swap ack delays for testing?  Or should we make this delay shorter/zero?

How about using a CCTimer and a counter of numPending. Any time it ticks, decrement. If numPending still greater than 0, post another tick. Then you dont need a deque or cancel logic.

15 seems fine.
Comment 9 WebKit Review Bot 2012-08-20 15:49:35 PDT
Comment on attachment 159507 [details]
Patch

Attachment 159507 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/13551033

New failing tests:
platform/chromium/virtual/threaded/compositing/visibility/visibility-composited-transforms.html
Comment 10 WebKit Review Bot 2012-08-20 15:49:39 PDT
Created attachment 159548 [details]
Archive of layout-test-results from gce-cr-linux-06

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: gce-cr-linux-06  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Comment 11 Brian Anderson 2012-08-20 17:36:25 PDT
Created attachment 159575 [details]
Patch
Comment 12 Nat Duca 2012-08-20 17:41:30 PDT
Comment on attachment 159575 [details]
Patch

Nice, lgtm
Comment 13 James Robinson 2012-08-20 17:46:38 PDT
Comment on attachment 159575 [details]
Patch

R=me
Comment 14 WebKit Review Bot 2012-08-20 18:38:15 PDT
Comment on attachment 159575 [details]
Patch

Attachment 159575 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/13547248

New failing tests:
platform/chromium/virtual/threaded/compositing/visibility/visibility-composited-transforms.html
Comment 15 WebKit Review Bot 2012-08-20 18:38:19 PDT
Created attachment 159585 [details]
Archive of layout-test-results from gce-cr-linux-01

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: gce-cr-linux-01  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Comment 16 Brian Anderson 2012-08-20 19:13:35 PDT
How do I run this new failing test locally?
platform/chromium/virtual/threaded/compositing/visibility/visibility-composited-transforms.html
Comment 17 Adrienne Walker 2012-08-21 09:28:34 PDT
(In reply to comment #16)
> How do I run this new failing test locally?
> platform/chromium/virtual/threaded/compositing/visibility/visibility-composited-transforms.html

Hmm, it looks like that test timed out.

That test is LayoutTests/compositing/visibility/visibility-composited-transforms.html run with threaded compositing turned on.  I added them as a smoke test for threaded compositing since the normal layout tests only exercise the single-threaded mode.

On Linux, to run this locally, build the DumpRenderTree target and then run 'new-run-webkit-tests --chromium --debug platform/chromium/virtual/threaded/compositing/visibility/visibility-composited-transforms.html'.
Comment 18 Brian Anderson 2012-08-21 13:45:23 PDT
I could not reproduce the visibility-composited-transforms.html timeout/error, either on Windows or Linux, although I do get an unexpected EOF on stdout.

How can I re-run cr-linux on the bots?

Here's the output I get on my local machine:
"
$ new-run-webkit-tests --chromium --debug platform/chromium/virtual/threaded/compositing/visibility/visibility-composited-transforms.html
Using port 'chromium-linux-x86_64'
Test configuration: <lucid, x86_64, debug>
Placing test results in None
Baseline search path: chromium-linux -> chromium-win -> chromium -> mac -> generic
Using Debug build
Pixel tests enabled
Regular timeout: 12000, slow test timeout: 60000
Command line: /mnt/code/chrome0/src/out/Debug/DumpRenderTree -

Found 1 test; running 1, skipping 0.
Running 1 DumpRenderTree over 1 shard.

unexpected EOF of stdout                                                                             
The test ran as expected.
"
Comment 19 Adrienne Walker 2012-08-21 15:30:32 PDT
(In reply to comment #18)
> I could not reproduce the visibility-composited-transforms.html timeout/error, either on Windows or Linux, although I do get an unexpected EOF on stdout.
> 
> How can I re-run cr-linux on the bots?

You could upload another patch and click the ews button.  Alternatively, you could also send off a try job to the linux_layout bot.
Comment 20 Brian Anderson 2012-08-21 16:23:21 PDT
Created attachment 159792 [details]
Patch
Comment 21 WebKit Review Bot 2012-08-21 17:46:59 PDT
Comment on attachment 159792 [details]
Patch

Attachment 159792 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/13569039

New failing tests:
platform/chromium/virtual/threaded/compositing/visibility/visibility-image-layers-dynamic.html
platform/chromium/virtual/threaded/compositing/visibility/visibility-composited-transforms.html
Comment 22 WebKit Review Bot 2012-08-21 17:47:03 PDT
Created attachment 159818 [details]
Archive of layout-test-results from gce-cr-linux-03

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: gce-cr-linux-03  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Comment 23 Eric Seidel (no email) 2012-08-22 15:21:44 PDT
Comment on attachment 158922 [details]
Patch

Cleared review? from obsolete attachment 158922 [details] so that this bug does not appear in http://webkit.org/pending-review.  If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).
Comment 24 Brian Anderson 2012-08-29 19:12:14 PDT
Created attachment 161388 [details]
Patch
Comment 25 WebKit Review Bot 2012-08-30 10:32:29 PDT
Comment on attachment 161388 [details]
Patch

Attachment 161388 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/13682777

New failing tests:
platform/chromium/virtual/threaded/compositing/visibility/visibility-simple-canvas2d-layer.html
platform/chromium/virtual/threaded/compositing/webgl/webgl-no-alpha.html
platform/chromium/virtual/threaded/compositing/visibility/visibility-image-layers-dynamic.html
Comment 26 Brian Anderson 2012-08-31 10:53:32 PDT
Created attachment 161734 [details]
Patch
Comment 27 Brian Anderson 2012-08-31 10:58:26 PDT
The latest patch should eliminate the flakiness. The basic problem was that the implementations of WGC3D used by tests didn't support swap acks.  Instead of faking swap acks in the tests like previous patches, I went ahead and changed CCFrameRateController to not track number of pending frames if swap acks are not supported.
Comment 28 James Robinson 2012-09-04 11:02:45 PDT
Comment on attachment 161734 [details]
Patch

R=me
Comment 29 Brian Anderson 2012-09-04 11:07:45 PDT
Comment on attachment 161734 [details]
Patch

This one should be ready to go.
Comment 30 WebKit Review Bot 2012-09-04 11:37:12 PDT
Comment on attachment 161734 [details]
Patch

Clearing flags on attachment: 161734

Committed r127476: <http://trac.webkit.org/changeset/127476>
Comment 31 WebKit Review Bot 2012-09-04 11:37:17 PDT
All reviewed patches have been landed.  Closing bug.