Closed Bug 915405 Opened 11 years ago Closed 6 years ago

Get a better install time for FxOS crash reports

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: kairo, Unassigned)

Details

(Whiteboard: [StabilityWeek2013])

Right now, we get the same install time for all devices in crash reports, which makes it hard to get our usual count of installations for crashes - but this could be very useful on B2G as well.

We could use the device activation time instead, which could serve the same purpose, for example from the first time that FTE completes (or starts?) as that's basically the same thing as the "install time" on desktop.

Benjamin said he'll find some engineer to work on this.
Flags: needinfo?(benjamin)
Why do we get the same install time for every device? Can we just fix that?
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #1)
> Why do we get the same install time for every device? Can we just fix that?

The builds are factory-installed on the device and therefore have the same install time because a generic image is being flashed to the devices and the image is identical for all of them. That said, it's also a bogus date right now. I have no idea where we take the install time from, but I figured we can't change the images to be different, so we need to adjust things at the time when the device is actually used the first time.
We store a file in the "Crash Reports" directory named InstallTime${BuildID}:
http://mxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/nsExceptionHandler.cpp#1248

You can see this on your local machine at ~/.mozilla/firefox/Crash\ Reports/InstallTime*. I guess they must run the app before generating the master image? We could either get partners to remove that file as a part of master image prep, or figure out a workaround.
We must not use the device activation time because unlike the typical install time, it will not change with new builds: it is important that this number not remain stable for longer than weeks at a time so that users can't be fingerprinted and tracked via crash-stats.
Flags: needinfo?(benjamin)
Summary: Get device activation time be reported as install time in crash reports → Get a better install time for FxOS crash reports
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #3)
> We store a file in the "Crash Reports" directory named InstallTime${BuildID}:
> http://mxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/
> nsExceptionHandler.cpp#1248
> 
> You can see this on your local machine at ~/.mozilla/firefox/Crash\
> Reports/InstallTime*. I guess they must run the app before generating the
> master image? We could either get partners to remove that file as a part of
> master image prep, or figure out a workaround.

Well, it's set to a bogus value like "1980-01-06 00:09:37", see e.g. bp-ede8a88c-0994-4c7d-8fd6-8749c2130909
From the raw JSON there: "InstallTime": "315965377"

The only thing I can imagine is that the phone boots for the first time with its internal clock set to some epoch value and we write out the InstallTime file at that point. I don't really understand why that is, but if they have this kind of bogus data we could work around it. We could simply say that values before 2000-01-01 are invalid and write a new file if we encounter them.

That being said, it would be nice to find out from a B2G partner what's actually happening here so that we don't make assumptions.
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.