Investigate negative durations for pre-account ping
Categories
(Toolkit :: Telemetry, task, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox68 | --- | fixed |
People
(Reporter: janerik, Assigned: janerik)
References
Details
Attachments
(2 files)
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
2.36 KB,
text/plain
|
chutten
:
data-review+
|
Details |
During validation of the early ecosystem ping ("pre-account" ping), I noted that we see negative durations in the pings.
The duration should be the time between 2 pings (or since session start). It should therefore never be negative. It is though.
We should try to find out what is happening and determine if it is a bug in our implementation of time accounting, invalid values we get from the OS or otherwise bogus data.
Comment 1•7 years ago
|
||
Bugbug thinks this bug is a task, but please change it back in case of error.
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Comment 2•7 years ago
|
||
One thing to note: so far occurring on Windows only.
| Assignee | ||
Comment 3•7 years ago
|
||
For the lack of any good answer, I'll at least document the current state:
That's the duration calculation in EcosystemPing.jsm.
let now = Policy.monotonicNow();
let duration = Math.round((now - this._lastSendTime) / 1000);
this._lastSendTime = now;
this._lastSendtime defaults to 0 at initialization.
monotonicNow is a bit misnamed and is a monotonic increasing count of milliseconds since process start.
monotonicNow is implemented as TimeStamp::NowLoRes() - TimeStamp::ProcessCreation() (see the implementation here).
For the duration becoming negative (and wee see values like -9466577789) one of these has to happen:
- We get a large
nowand store it into_lastSendTime. In the next round we get a smallnowand subtract the large value, resulting in a negative value - We get a negative
nowand store it into_lastSendTime. In the next round we get a largenowand subtract the large value, resulting in an even larger negative value
Possible next steps:
- We could do an analysis on the main ping and its session lengths to check if we see this or wait until we have IDs in the pre-account ping
- We could report
lastSendTimeandnowas raw values in the ping to see what's happening
| Assignee | ||
Comment 4•7 years ago
|
||
| Assignee | ||
Comment 5•7 years ago
|
||
Attaching a patch to get the old and new timestamps, so we might take a look and check what values we are actually seeing.
Next step would be to find someone responsible for TimeStamp and get them to help.
| Assignee | ||
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
Comment 9•7 years ago
|
||
| bugherder | ||
Description
•