Closed Bug 1700850 Opened 3 years ago Closed 3 years ago

Make `--backgroundtask` temporary profiles truly random

Categories

(Toolkit :: Application Update, defect, P2)

defect

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox86 --- unaffected
firefox87 --- wontfix
firefox88 --- wontfix
firefox89 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files, 1 obsolete file)

Right now, the --backgroundtask temporary profile name is deterministic. This clashes across installations, and only works if we always delete the profile on exit, which is fragile. This ticket tracks injecting the installation hash (for easy identification) and some randomness (for concurrent background tasks) into the profile path.

The Bugbug bot thinks this bug is a defect, but please change it back in case of error.

Type: task → defect

Set release status flags based on info from the regressing bug 1667276

Severity: -- → S2
Priority: -- → P2

It's very unlikely that this would make a difference, since creating
the service does not immediately look for a profile. But it's also
not clear to me why I originally placed it after the service was
created, and it's not impossible that the service creation would look
for XRE_PROFILE_PATH (which is how we communicate the desired
profile to the profile service), so let's create the profile before
the service.

Assignee: nobody → nalexander
Status: NEW → ASSIGNED

When --backgroundtask TASK invocations exit, they try to remove
their temporary profile directory. This mostly works, except there
are some very late writes to the profile directory including
Telemetry.ShutdownTime.txt and the security_state directory. This
commit accommodates by moving the profile directory removal even
later. It might be possible to instead avoid these very late writes,
but that is hard in general, and is more likely to depend on the exact
code invoked by the background task itself.

It's not clear to me how I/O imposition and/or late write checking
will interact with this: guidance appreciated!

Depends on D110310

When --backgroundtask TASK invocations exit, they try to remove
their temporary profile directory. This mostly works, except there
are some very late writes to the profile directory including
Telemetry.ShutdownTime.txt and the security_state directory. This
commit accommodates by moving the profile directory removal even
later. It might be possible to instead avoid these very late writes,
but that is hard in general, and is more likely to depend on the exact
code invoked by the background task itself.

It's not clear to me how I/O imposition and/or late write checking
will interact with this: guidance appreciated!

Depends on D110310

Attachment #9213256 - Attachment is obsolete: true
Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3825a9d1a1e0
Pre: Create backgroundtask temporary profile before profile service. r=mossop
https://hg.mozilla.org/integration/autoland/rev/77f3a6691c8d
Part 1: Make temporary background profiles per-installation and unique. r=bytesized,mossop
https://hg.mozilla.org/integration/autoland/rev/fe8189e76358
Part 2: Remove temporary background profile directories very late. r=dthayer
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
Regressions: 1703179
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: