Closed Bug 971420 Opened 10 years ago Closed 8 years ago

Error: TelemetryStopwatch when open about:healthreport

Categories

(Firefox Health Report Graveyard :: Client: Desktop, defect, P3)

x86_64
Windows 7
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: alice0775, Unassigned, Mentored)

Details

(Keywords: regression, Whiteboard: [lang=js])

Timestamp: 2014/02/12 11:25:50
Error: TelemetryStopwatch: key "HEALTHREPORT_COLLECT_CONSTANT_DATA_MS" was already initialized
Source File: resource://gre/modules/TelemetryStopwatch.jsm
Line: 53
Timestamp: 2014/02/12 11:25:50
Error: TelemetryStopwatch: key "HEALTHREPORT_POST_COLLECT_CHECKPOINT_MS" was already initialized
Source File: resource://gre/modules/TelemetryStopwatch.jsm
Line: 53
Timestamp: 2014/02/12 11:25:51
Error: TelemetryStopwatch: key "HEALTHREPORT_GENERATE_JSON_PAYLOAD_MS" was already initialized
Source File: resource://gre/modules/TelemetryStopwatch.jsm
Line: 53

And number of addons and plugins are reproted 0.
Regression window(m-i)
Good:
http://hg.mozilla.org/integration/mozilla-inbound/rev/a41fdfce8810
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 ID:20140130113333
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/c78f9d502f0f
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 ID:20140130113949
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=a41fdfce8810&tochange=c78f9d502f0f

Regressed by:
c78f9d502f0f	Georg Fritzsche — Bug 928575 - Overhaul FHR data collection for extensions and plugins for desktop. r=gps
Blocks: 928575
Keywords: regression
About number of addons and plugins are reproted 0. 
It is Bug 966871 .

So, this bug only about the error indication.
No longer blocks: 928575
Keywords: regression
Version: 29 Branch → Trunk
This is because the telemetry-stopwatch only expects one measurement per session and we're loading the FHR data multiple times per session. This needs to be a histogram of some sort if we're going to have multiple measurements per session.

Not a high priority: gps/gfritzsche; either of you want to be a mentor for this bug?
Component: Telemetry → Client: Desktop
Keywords: regression
Priority: -- → P3
Product: Toolkit → Firefox Health Report
I thought you could take multiple measurements per session and each one was recorded discretely! The docs for the "aObj" argument (http://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/TelemetryStopwatch.jsm?from=TelemetryStopwatch.jsm#20) seem to indicate this.

I think the problem is we aren't locking around collectMeasurements().
I read http://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/TelemetryStopwatch.jsm?from=TelemetryStopwatch.jsm#34 to mean the exact opposite thing. Maybe vladan can clarify.
Flags: needinfo?(vdjeric)
This isn't a Telemetry restriction, it's just the way TelemetryStopwatch.jsm works.

You can take multiple measurements with TelemetryStopwatch.jsm in the same session, but each call to TelemetryStopwatch.start(<id>) needs to be followed by a call to TelemetryStopwatch.cancel(<id>) or TelemetryStopwatch.finish(<id>).

It doesn't really make sense to have two consecutive .start() calls for the same histogram ID because it wouldn't be clear which starting times are associated with which end times.
Flags: needinfo?(vdjeric)
So apparently we have overlapping tasks (and hence TelemetryStopWatches) running from collectMeasurements() and getJSONPayload()?
Is this actually expected to happen in some scenario and we are fine with locking or some other ordering mechanism?
Is there an "aObj" context param to start() and stop() which we can use?
(In reply to Benjamin Smedberg  [:bsmedberg] from comment #8)
> Is there an "aObj" context param to start() and stop() which we can use?

There is: http://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/TelemetryStopwatch.jsm#29
Sorry, that question was for gfritzsche whether in our use case there was a good context object we could use... I should learn to use NEEDINFO!
Flags: needinfo?(georg.fritzsche)
We should ensure collectAndObtainJSONPayload() can't be called concurrently. Stash the promise from the task and have concurrent calls return the in-progress promise.
Flags: needinfo?(georg.fritzsche)
That definitely sounds better, i should be fine mentoring it.

Alice0775, are there specific steps needed to reproduce this?
Whiteboard: [mentor=gfritzsche][lang=JS]
Hi, I am interested in working on this bug. So please can u assign this bug to me?

Thanks in Advance,

Regards,
A. Anup
I think this bug is not the best one for you right now, let's check out bug 847072 later.
Mentor: georg.fritzsche
Whiteboard: [mentor=gfritzsche][lang=JS] → [lang=JS]
Whiteboard: [lang=JS] → [lang=js]
FHR is going away per bug 1209088, closing.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Product: Firefox Health Report → Firefox Health Report Graveyard
You need to log in before you can comment on or make changes to this bug.