Closed Bug 1858290 Opened 1 year ago Closed 1 year ago

Drop in default agent telemetry after Default Agent background task migration

Categories

(Toolkit :: Default Browser Agent, defect, P2)

Unspecified
Windows
defect

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- affected

People

(Reporter: nrishel, Assigned: nrishel)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fidedi])

Attachments

(2 files)

There was a drop in telemetry after migrating the Default Agent to Firefox Background Tasks, seen in both Nightly and Beta builds.

Attachment #9357741 - Attachment description: Bug 1858290 - Detach pingsender process from Default Agent Background Task. r=nalexander → Bug 1858290 - Prevent background task `setTimeout` overflow. r=nalexander
Pushed by nrishel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/39145ab8550f Prevent background task `setTimeout` overflow. r=nalexander,bytesized https://hg.mozilla.org/integration/autoland/rev/db70bbc48ef5 Post: Detach pingsender process from Default Agent Background Task. r=nalexander
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch

We believe the issue remains as we're able to reproduce applications launched from the background task being closed with the background task. This could explain why our telemetry isn't sending, if pingsender closes with the background task then telemetry would race shutdown.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

-backgroundtask switch will set LauncherFlags::eWaitForBrowser:
https://searchfox.org/mozilla-central/rev/7d77ff808f8407a3e4fc0911779da446c050f9ee/browser/app/winlauncher/LauncherProcessWin.cpp#153,161

if LauncherFlags::eWaitForBrowser is set, the launcher process will create a job object and assign the browser process to the job object. So when the background task exits, all processes in the job object will be killed:
https://searchfox.org/mozilla-central/rev/7d77ff808f8407a3e4fc0911779da446c050f9ee/browser/app/winlauncher/LauncherProcessWin.cpp#486-487

We will have to break away from the job when executing pingsender and the browser from Default Agent Notification.

That is, CREATE_BREAKAWAY_FROM_JOB flag is required here and here.

Please also fix this comment because we need JOB_OBJECT_LIMIT_BREAKAWAY_OK for a different reason.

Bug 1859445 will fix this.

Depends on: 1859445
Blocks: 1859923
Whiteboard: [fidedi]
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: