Closed
Bug 881991
Opened 12 years ago
Closed 12 years ago
Duplicate aborted sessions being inserted
Categories
(Firefox Health Report Graveyard :: Client: Desktop, defect)
Firefox Health Report Graveyard
Client: Desktop
Tracking
(firefox21 affected, firefox22 affected, firefox23 verified, firefox24 fixed)
RESOLVED
FIXED
Firefox 24
People
(Reporter: gps, Assigned: gps)
Details
Attachments
(1 file)
5.39 KB,
patch
|
rnewman
:
review+
akeybl
:
approval-mozilla-aurora+
akeybl
:
approval-mozilla-beta-
|
Details | Diff | Splinter Review |
I was chatting with Brendan about FHR oddities today and we were looking at some example payloads. One of the things I noticed is that it appears we're inserting duplicate aborted sessions into the database.
We have code to detect previously-inserted sessions. I suspect an off-by-one bug.
![]() |
Assignee | |
Comment 1•12 years ago
|
||
I reckon the < should be <= in the following:
https://hg.mozilla.org/mozilla-central/file/default/services/healthreport/providers.jsm#l614
The test also appears to be a bit wonky.
Updated•12 years ago
|
Flags: needinfo?(rnewman)
![]() |
Assignee | |
Comment 2•12 years ago
|
||
This patch boils down to converting a < to <= and fixing the test to use
day.get("main").length instead of day.size. While I was here, I also
refactored the test slightly to make it more readable. That accounts for
the bulk of the diff. If you want me to remove the tidying, I
understand.
I will request this patch be uplifted as high as I can get it, as it
undermines our ability to track sessions properly.
Attachment #761570 -
Flags: review?(rnewman)
![]() |
Assignee | |
Updated•12 years ago
|
Assignee: nobody → gps
Updated•12 years ago
|
Attachment #761570 -
Flags: review?(rnewman) → review+
![]() |
Assignee | |
Comment 3•12 years ago
|
||
Status: NEW → ASSIGNED
Target Milestone: --- → Firefox 24
![]() |
Assignee | |
Comment 4•12 years ago
|
||
Comment on attachment 761570 [details] [diff] [review]
Properly detect already inserted sessions
[Approval Request Comment]
Bug caused by (feature/regressing bug #): FHR
User impact if declined: FHR data for sessions won't be properly recorded if Firefox isn't shut down properly. This will prevent Mozilla from knowing what percentage of sessions aren't shut down properly.
Testing completed (on m-c, etc.): Just landed. It should probably bake for a few days.
Risk to taking this patch (and alternatives if risky): Low risk. It is a pretty obvious off-by-1 bug.
String or IDL/UUID changes made by this patch: None
Attachment #761570 -
Flags: approval-mozilla-beta?
Attachment #761570 -
Flags: approval-mozilla-aurora?
![]() |
||
Comment 5•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
![]() |
||
Updated•12 years ago
|
![]() |
||
Comment 6•12 years ago
|
||
Comment on attachment 761570 [details] [diff] [review]
Properly detect already inserted sessions
Too late for 22 (we're on our final beta)
Attachment #761570 -
Flags: approval-mozilla-beta?
Attachment #761570 -
Flags: approval-mozilla-beta-
Attachment #761570 -
Flags: approval-mozilla-aurora?
Attachment #761570 -
Flags: approval-mozilla-aurora+
![]() |
Assignee | |
Comment 7•12 years ago
|
||
![]() |
Assignee | |
Comment 9•12 years ago
|
||
(In reply to Anthony Hughes, Mozilla QA (:ashughes) from comment #8)
> Gregory, is there anything you need from QA here?
The existing test coverage should be largely good. Although, the test was faulty before, so maybe I'm over valuing them.
A spot check that sessions are still recorded properly in FHR would be nice. The real verification will be to comb through a sample of payloads from the wild and verify the issue goes away.
![]() |
||
Comment 10•12 years ago
|
||
(In reply to Alex Keybl [:akeybl] from comment #6)
> Comment on attachment 761570 [details] [diff] [review]
> Properly detect already inserted sessions
>
> Too late for 22 (we're on our final beta)
Alex -- there is absolutely no chance of another beta?
![]() |
||
Comment 11•12 years ago
|
||
Gregory, is there a place where the data in the health report is explained? I'm looking at session data (org.mozilla.appSessions.current and the multiple org.mozilla.appSessions.previous entries) trying to verify this bug and I have no idea what the data there means.
Flags: needinfo?(gps)
![]() |
Assignee | |
Comment 12•12 years ago
|
||
http://docs.services.mozilla.com/healthreport/index.html
If those docs aren't good enough, please file a new bug to update the docs!
Flags: needinfo?(gps)
Comment 13•12 years ago
|
||
I tested this on FF 23b1 Win 7 x64.
If the FF is closed normally, the session seems to be recorded properly.
I might not understand the issue correctly, but killing the FF process with "activeTicks": 23, "totalTime": 139 added in "org.mozilla.appSessions.previous":
"abortedActiveTicks": 7, "abortedTotalTime": 31
Any thoughts?
QA Contact: ioana.budnar → paul.silaghi
![]() |
Assignee | |
Comment 14•12 years ago
|
||
(In reply to Paul Silaghi [QA] from comment #13)
> I tested this on FF 23b1 Win 7 x64.
> If the FF is closed normally, the session seems to be recorded properly.
> I might not understand the issue correctly, but killing the FF process with
> "activeTicks": 23, "totalTime": 139 added in
> "org.mozilla.appSessions.previous":
> "abortedActiveTicks": 7, "abortedTotalTime": 31
> Any thoughts?
This is expected behavior. On startup, FHR looks at the "current" session (which at startup is really the previous session). It looks for a flag set during shutdown that basically is the equivalent of "did the session shut down correctly." If the session shut down correctly, it marks it as clean. If not, it's marked as aborted. The previous session is then added to a new preference as a serialized JSON object and the current session's preferences are wiped away.
Comment 15•12 years ago
|
||
(In reply to Gregory Szorc [:gps] from comment #14)
> If not, it's marked as aborted. The previous session is then added to a new
> preference as a serialized JSON object and the current session's preferences
> are wiped away.
Ok, but I'm talking about the differences between values:
current session: "activeTicks": 23, "totalTime": 139
is recorded as aborted with: "abortedActiveTicks": 7, "abortedTotalTime": 31
Shouldn't be the same?
![]() |
Assignee | |
Comment 17•12 years ago
|
||
Changes to preferences aren't persisted to disk immediately. Instead, preferences are flushed to disk periodically. If the process crashes, increments to the tick count and total time count preferences may be lost and appear reverted to an earlier state.
This is one reason we want to switch how session data is recorded (bug 841561).
Flags: needinfo?(gps)
![]() |
||
Comment 18•12 years ago
|
||
Thanks Gregory, I guess that means we can safely mark this verified fixed. I'm not sure there's much more we can do in terms of QA. Please add switch the status flag back to fixed and add the verifyme keyword if you think of something.
Keywords: verifyme
Updated•12 years ago
|
Flags: needinfo?(rnewman)
Updated•7 years ago
|
Product: Firefox Health Report → Firefox Health Report Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•