Bug 125885

Summary: Botwatcher's dashboard ceases to update itself after a while
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: Tools / TestsAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dino, mrowe, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
test case for timeout failure
none
proposed fix none

Description Alexey Proskuryakov 2013-12-17 16:39:10 PST
<http://trac.webkit.org/changeset/159659> switched from setInterval to setTimeout, and the code now assumes that _updateQueues is called too early if and only if it's because a platform was unhidden.

But looks like JS timers can now fire too early sometimes, in which case we never re-schedule the timeout, and the view becomes dead forever.

I'm not quite sure when this happens. This could legitimately happen due to NTP adjustment, or there may be a bug with timer coalescing.
Comment 1 Alexey Proskuryakov 2013-12-17 16:41:16 PST
Created attachment 219471 [details]
test case for timeout failure

For future reference, this is a standalone test that shows how current dashboard update code fails. I can easily reproduce this by keeping the test open for a few minutes (and if there are multiple instances open, they always fail simultaneously). I'm testing on Mavericks.
Comment 2 Alexey Proskuryakov 2013-12-17 16:46:26 PST
Created attachment 219474 [details]
proposed fix
Comment 3 WebKit Commit Bot 2013-12-17 19:22:36 PST
Comment on attachment 219474 [details]
proposed fix

Clearing flags on attachment: 219474

Committed r160744: <http://trac.webkit.org/changeset/160744>
Comment 4 WebKit Commit Bot 2013-12-17 19:22:38 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Alexey Proskuryakov 2013-12-18 09:42:15 PST
Note that this removes the behavior of immediately fetching when showing a previously hidden view. Maybe we should restore this, but we need to look carefully into the possibility of two updates running simultaneously, and what consequences that would have.