Closed Bug 967203 Opened 10 years ago Closed 10 years ago

Telemetry doesn't save pending pings on shutdown

Categories

(Toolkit :: Telemetry, defect, P1)

x86
All
defect

Tracking

()

RESOLVED FIXED
mozilla30
Tracking Status
firefox29 --- fixed
firefox30 --- fixed

People

(Reporter: rvitillo, Assigned: rvitillo)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Telemetry submissions are decreasing after fixing Bug 839794. It seems that pending pings are not saved properly on shutdown ("profile-before-change2") by TelemetryFile.savePingToFile due to the following error: "OS.File has been shut down." The error is not triggered by the xpcshell tests though.
Assignee: nobody → rvitillo
Status: NEW → ASSIGNED
Attachment #8369669 - Flags: review?(dteller)
Comment on attachment 8369669 [details] [diff] [review]
Bug 967203 - Telemetry doesn't save pending pings on shutdown, v1

Review of attachment 8369669 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/components/telemetry/TelemetryPing.jsm
@@ +894,5 @@
>        Telemetry.canRecord = false;
>        return;
>      }
> +
> +    AsyncShutdown.profileBeforeChange.addBlocker(

Telemetry uses profile-before-change2 specifically because many components use profile-before-change to collect their data.

You should rather add a phase sendTelemetry to AsyncShutdown, backed by notification profile-before-change2, and use this phase here.

@@ +901,5 @@
> +        this.uninstall();
> +        if (Telemetry.canSend) {
> +          return this.savePendingPings();
> +        } else {
> +          return Promise.resolve();

If we don't have to wait for anything, just don't return anything.
Attachment #8369669 - Flags: review?(dteller) → feedback+
Attachment #8369669 - Attachment is obsolete: true
Attachment #8370089 - Flags: review?(dteller)
Comment on attachment 8370089 [details] [diff] [review]
Telemetry doesn't save pending pings on shutdown, v2

Review of attachment 8370089 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good.
Attachment #8370089 - Flags: review?(dteller) → review+
https://hg.mozilla.org/mozilla-central/rev/77095ca6e53b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla29
Target Milestone: mozilla29 → mozilla30
Comment on attachment 8370089 [details] [diff] [review]
Telemetry doesn't save pending pings on shutdown, v2

[Approval Request Comment]
The patch has landed a week ago and is needed to restore Telemetry's data collection.
Attachment #8370089 - Flags: approval-mozilla-aurora?
Attachment #8370089 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Keywords: verifyme
Can this fix be tested manually? If so can you offer some steps in order to check that this issue is fixed?
Flags: needinfo?(rvitillo)
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: