New issue
Advanced search Search tips

Issue 642741 link

Starred by 5 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 2
Type: Bug



Sign in to add a comment

|Event.timeStamp - performance.now()| is exactly 2^32 ms - potential clock rollover bug

Project Member Reported by majidvp@chromium.org, Aug 31 2016

Issue description

Originally reported by Ben:

> We see a number of samples where Math.round(Event.timeStamp – performance.now) is almost exactly 2^32 ms. I’m not exactly sure if this is a bug in our systems or if we’re getting funky data from Event.timeStamp.

also:

>It's much more common on Linux (0.1% of all Linux requests). But we see a tiny handful on Windows.

I suspect this may be related to our roll over protection logic which is present in different forms in Windows and Linux.
 
Cc: charliea@chromium.org
Components: Blink>Input
I have a theory for the Windows issue. I think the current rollover protection logic works within a single process but it may not be consistent across different processes. In particular one process my have already registered a rollover and increased its time tick count by 2^32 while another process (spawned later after first rollover) has not and thus their clock will have a constant drift of 2^32 ms. charliea@ any thoughts?

The rollover logic is here:
https://codesearch.chromium.org/chromium/src/base/time/time_win.cc?sq=package:chromium&dr=CSs&l=345

In input event case, timestamp comes from UI process while performance.now() comes from renderer process so this may be possible.

Comment 2 by n...@fb.com, Aug 31 2016

Labels: DevRel-Facebook

Comment 3 by bmau...@fb.com, Feb 4 2017

Any update on this?
Cc: bcwh...@chromium.org
CCing digit@ and mark@, both of whom seem to have done a lot of work on the Linux timer overflow logic.

Can either of you think of any pathological behavior that would cause Math.round(Event.timeStamp – performance.now) to be almost exactly 2^32 ms on a significant number of Linux computers?
Cc: majidvp@chromium.org
Owner: ----
Status: Available (was: Assigned)
digit@ and mark@: any ideas on the linux case? Here is the rollover logic for event timestamps on linux: https://codesearch.chromium.org/chromium/src/ui/events/x/events_x_utils.cc?l=316


I personally don't have any more ideas on the linux side of this issue. 
There is no repro case at the moment so it is hard to try to get to the
bottom of this for me. Marking the issue as available so it may be picked
up by someone else.

Sign in to add a comment