Closed Bug 1635408 Opened 5 years ago Closed 5 years ago

Abort pending worker tasks at shutdown if they do not change state

Categories

(Firefox :: Remote Settings Client, defect)

defect

Tracking

()

RESOLVED FIXED
Firefox 78
Tracking Status
firefox77 --- fixed
firefox78 --- fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

The worker supports 4 different operations:

  • canonicalStringify
  • importJSONDump
  • checkContentHash
  • checkFileHash

All of them except importJSONDump do not write any data, so we should not wait for them at shutdown; we should just stop doing them and shut down the worker, and propagate the error.

At time of writing, there are no more reports of shutdown hangs relating to importJSONDump after bug 1630766 landed on nightly, other than these 2 crashreports:

https://crash-stats.mozilla.org/report/index/27523fde-2ec8-41fd-bd00-d5aad0200505#tab-metadata
https://crash-stats.mozilla.org/report/index/c18caeb0-919c-4bf0-95da-599160200504#tab-metadata

In both of them, the only tasks the worker is busy with are file/content hash checks.

It's possible that more reports that do reference importJSONDump will surface, but at least for now it seems prudent to deal with the low-hanging fruit of aborting these tasks first.

Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/819c1fb3e554 abort non-critical RemoteSettingsWorker tasks at shutdown, r=leplatrem
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/5db356e1bb94 abort non-critical RemoteSettingsWorker tasks at shutdown, r=leplatrem
Flags: needinfo?(gijskruitbosch+bugs)
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 78

Comment on attachment 9145799 [details]
Bug 1635408 - abort non-critical RemoteSettingsWorker tasks at shutdown, r?leplatrem

Beta/Release Uplift Approval Request

  • User impact if declined: Shutdown hangs leading to shutdown crashes
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: n/a
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is a relatively small JS-only change that improves the shutdown handling of the remote settings worker existing shutdown blocker. We're seeing hundreds of these hangs/crashes on release, and I'd like us to nip those in the bud (and, if there remain significant numbers of 77 crashes, to have time to address them in 78 given it's an ESR cycle). I'd like this to land together with the patch in bug 1636256 (that patch requires this one, but not the other way around). Since the changes in this bug and bug 1636256, the crashes on nightly have reduced to 0, but it's hard to be sure how strong the effect will be on beta/release given the difference in number of users.
  • String changes made/needed: none
Attachment #9145799 - Flags: approval-mozilla-beta?
Blocks: 1636256

Comment on attachment 9145799 [details]
Bug 1635408 - abort non-critical RemoteSettingsWorker tasks at shutdown, r?leplatrem

Approve for 77 beta 7, thanks.

Attachment #9145799 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: