Bug 83951 - [Chromium] CCLayerTreeHostTest racyness from beginTest()
Summary: [Chromium] CCLayerTreeHostTest racyness from beginTest()
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Daniel Sievers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-13 15:45 PDT by Daniel Sievers
Modified: 2013-04-15 07:04 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Sievers 2012-04-13 15:45:36 PDT
For example, putting a sleep() before the call to postSetNeedsCommitToMainThread() in CCLayerTreeHostTestScrollMultipleRedraw's beginTest() causes it to fail.
I think it's because setScrollable() having been called earlier races with the second 'needs commit' task, while the test expects a certain number of commits (and even a draw without commit).

Also some tests might do other modifications to the tree that implicitly cause a 'needs commit' to be posted.

Why do tests use postSetNeeds*ToMainThread() inside beginTest() which already runs on the main thread. Does that cause more potential for races?

What if a test does this

void beginTest()
{
   // modify tree, causes set needs commit and eventually triggers beginCommitOnCCThread()
   //...
A: // set some other internal state X
}

virtual void beginCommitOnCCThread()
{
B:  // does something that relies on state X
}

Can A race with B?

Maybe we need some safety barriers in the test harness for beginTest().
Comment 1 Nat Duca 2012-04-16 20:51:46 PDT
Daniel, can we assign you as owning this bug?
Comment 2 Daniel Sievers 2012-04-17 11:20:36 PDT
Sure, updated.