Closed Bug 1671715 Opened 4 years ago Closed 4 years ago

Firefox requests 'Reboot Now' to complete install on some systems

Categories

(Firefox :: Installer, defect, P1)

Unspecified
Windows
defect

Tracking

()

VERIFIED FIXED
83 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox81 --- unaffected
firefox82 + verified
firefox83 --- verified

People

(Reporter: aryx, Assigned: molly)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached file install.log

On a Windows 8.1 machine, installing Firefox 82.0 RC 2 and 83.0a1 into a new folder requires a reboot to complete. The issue does not reproduce on a Windows 10 machine.

The full .exe installers are used (en-US) versions, both 32-bit and 64-bit reproduce the issue.

The installation dialog shows "A Little Housekeeping…" for several seconds.

The installation folder is outside C:\Program Files

After the install and before the reboot, there is a firefox.exe.moz-upgrade file in the install folder which is gone after the reboot.

Flags: needinfo?(mhowell)

I think I see what happened here. Patch (with explanation) forthcoming.

Assignee: nobody → mhowell
Status: NEW → ASSIGNED
Flags: needinfo?(mhowell)
Priority: -- → P1

My patch for bug 1665195 included a REBOOTOK flag because I wanted to make
sure the UpdateLogs directory would get deleted even if doing so failed at the
moment. What I didn't realize is that the RmDir instruction will set the reboot
flag if removing the directory fails for any reason whatsoever, even if it's
just because the directory wasn't empty, in which case rebooting wouldn't help.
For some reason I thought there was a check for that condition, but having now
had a look in the NSIS source, there is not.

There's no easy way to check for ourselves whether the directory is empty or
not, so to avoid a spurious reboot prompt from either the installer or the
uninstaller, this patch just gives up on the REBOOTOK flag.

Thank you for the quick fix.

Is it possible to estimate how often this affects people installing Firefox or under which conditions?

Flags: needinfo?(mhowell)

This would affect anyone running a full installer (not the stub installer) which has the bug 1665195 patch on any Windows version, provided they have at least one other Firefox installation in a directory other than the one that they just installed into (that is, having one existing installation which you are paving over wouldn't trigger this, there has to be a different one). So, not any of the default or common cases, but I don't think we have the data to come up with a real estimate.

When this happens, the installation has succeeded and will work correctly after the reboot.

Flags: needinfo?(mhowell)
Pushed by mhowell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d03fca46d6fe
Don't try to reboot if cleaning up UpdateLogs fails. r=agashlin
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Flags: needinfo?(rtestard)

Do you think this is worth including in a 82.0.1?

Full installer + multiple firefox installs sounds like a corner case, plus a prompt to reboot doesn't seem horribly bad, so I'm tempted to call this wontfix for 82 and let it ride to 83.

Assuming volumes are similar in next 4 weeks than the last 4 this would imply about 1M installs in next 4 weeks for full installs of up to date Firefox version, non silent with an already existing installation. What we cannot detect is if the directory is different I think.
So worst case 1M it seems but most of these would reinstall to a similar directory I would assume so unlikely to hit the error?
https://sql.telemetry.mozilla.org/queries/75761/source

I'd say not worth a dot release just for this given these come at a cost to existing users and this provides a path to success after reboot.

Flags: needinfo?(rtestard)

Sounds like this may be a good/safe thing to take as a ridealong, please request uplift to release when you get a chance.

Flags: needinfo?(mhowell)

Comment on attachment 9182139 [details]
Bug 1671715 - Don't try to reboot if cleaning up UpdateLogs fails. r=agashlin

Beta/Release Uplift Approval Request

  • User impact if declined: Unnecessary reboot prompts at the end of an installation, under certain limited circumstances (see earlier comments).
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is very low risk, especially by installer patch standards, because all we've done is remove a potential reboot request if we fail to clean up a certain directory. That means this directory may not be properly uninstalled now, but it would at least be left empty, and anyway that's an easy tradeoff to make to prevent these prompts.
  • String changes made/needed:
Flags: needinfo?(mhowell)
Attachment #9182139 - Flags: approval-mozilla-release?

Comment on attachment 9182139 [details]
Bug 1671715 - Don't try to reboot if cleaning up UpdateLogs fails. r=agashlin

approved for 82.0.1

Attachment #9182139 - Flags: approval-mozilla-release? → approval-mozilla-release+
Flags: qe-verify+

I reproduced this issue a few days ago (did not had any steps for it) and today as well using the information from this bug on Windows 10 64bit, Windows 8.1 32bit and Windows 7 64bit using old Firefox builds. Verified that using latest Dot Release 82.0.1 across the same platforms as previously mentioned the restart message is not displayed on install and uninstall (I got this on uninstall as well in the past).
Thanks for reporting and fixing this, it was super annoying for us as QA. \o/

Status: RESOLVED → VERIFIED
Flags: qe-verify+
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: