Bug 83951
| Summary: | [Chromium] CCLayerTreeHostTest racyness from beginTest() | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Daniel Sievers <sievers> |
| Component: | New Bugs | Assignee: | Daniel Sievers <sievers> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Normal | CC: | danakj, enne, jamesr, nduca, schenney |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Daniel Sievers
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().
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Nat Duca
Daniel, can we assign you as owning this bug?
Daniel Sievers
Sure, updated.
Stephen Chenney
https://code.google.com/p/chromium/issues/detail?id=231317