Closed
Bug 1375549
Opened 7 years ago
Closed 7 years ago
When the Firefox process doesn't exit apply the update anyway and don't relaunch the callback application
Categories
(Toolkit :: Application Update, defect)
Toolkit
Application Update
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: robert.strong.bugs, Assigned: robert.strong.bugs)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
robert.strong.bugs
:
review+
|
Details | Diff | Splinter Review |
As stated in bug 1375242 comment #7 when the Firefox process doesn't exit and we try to perform an update trying to relaunch Firefox is not successful. Though this won't fix the root of the problem which is Firefox not exiting it might be a good thing to not try relaunching Firefox when this happens.
Assignee | ||
Comment 1•7 years ago
|
||
The update should still be applied otherwise the client won't be able to update to a version that contains fixes to Firefox that are preventing it from exiting.
Summary: Consider not relaunching Firefox if the Firefox process doesn't exit → When the Firefox process doesn't exit apply the update anyway and don't relaunch the callback application
Assignee | ||
Comment 2•7 years ago
|
||
I'll make sure this passes try before landing.
I didn't add tests for the pid successfully exiting since those are already handled by the AppApply* tests.
Assignee: nobody → robert.strong.bugs
Status: NEW → ASSIGNED
Attachment #8880962 -
Flags: review?(mhowell)
Assignee | ||
Comment 3•7 years ago
|
||
Assignee | ||
Comment 4•7 years ago
|
||
While working on this I considered adding whether the process didn't exit per the updater to telemetry but there isn't a decent way to do this at this time. I'll likely add it in a followup bug.
Comment 5•7 years ago
|
||
Comment on attachment 8880962 [details] [diff] [review]
patch rev1
Review of attachment 8880962 [details] [diff] [review]:
-----------------------------------------------------------------
Simple enough change, can't think of anything it would break that wouldn't already have to be broken, and there's a test added, I'm happy.
::: toolkit/mozapps/update/updater/updater.cpp
@@ +2119,5 @@
> + // pid is still present.
> + if (pid > 0) {
> + HANDLE parent = OpenProcess(SYNCHRONIZE, false, (DWORD) pid);
> + if (parent) {
> + return;
Wouldn't hurt to close the handle.
@@ +3024,5 @@
> if (result != WAIT_OBJECT_0) {
> + // Continue to update since the callback application sometimes doesn't
> + // exit (see bug 1375242) so any fixes to the callback application will
> + // be applied instead of leaving the client in a broken state.
> + LOG(("The callback process didn't exit! Continuing with update."));
It's really the parent process we're waiting for here, not the callback. It happens that those are the same binary (though I don't think we explicitly require or even say that anywhere), but they are distinct processes, so talking about the callback here could get confusing.
Attachment #8880962 -
Flags: review?(mhowell) → review+
Assignee | ||
Comment 6•7 years ago
|
||
(In reply to Matt Howell [:mhowell] from comment #5)
> Comment on attachment 8880962 [details] [diff] [review]
> patch rev1
>
> Review of attachment 8880962 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Simple enough change, can't think of anything it would break that wouldn't
> already have to be broken, and there's a test added, I'm happy.
>
> ::: toolkit/mozapps/update/updater/updater.cpp
> @@ +2119,5 @@
> > + // pid is still present.
> > + if (pid > 0) {
> > + HANDLE parent = OpenProcess(SYNCHRONIZE, false, (DWORD) pid);
> > + if (parent) {
> > + return;
>
> Wouldn't hurt to close the handle.
doh!
>
> @@ +3024,5 @@
> > if (result != WAIT_OBJECT_0) {
> > + // Continue to update since the callback application sometimes doesn't
> > + // exit (see bug 1375242) so any fixes to the callback application will
> > + // be applied instead of leaving the client in a broken state.
> > + LOG(("The callback process didn't exit! Continuing with update."));
>
> It's really the parent process we're waiting for here, not the callback. It
> happens that those are the same binary (though I don't think we explicitly
> require or even say that anywhere), but they are distinct processes, so
> talking about the callback here could get confusing.
Thanks for the review and will do.
Assignee | ||
Comment 7•7 years ago
|
||
carrying forward r+
Attachment #8880962 -
Attachment is obsolete: true
Attachment #8880990 -
Flags: review+
Pushed by rstrong@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cdf241f97c71
When the Firefox process doesn't exit apply the update anyway and don't relaunch the callback application. r=mhowell
I don't know whether it was applied in today update, but when I clicked "Restart...", I went to Task Manager - there were two Firefox processes, one exited, second remained and I had to kill this so update could proceed.
Assignee | ||
Comment 10•7 years ago
|
||
It wasn't and this should merge into Nightly in a couple of days. It will be in the build the day after this bug is marked fixed.
This bug also has no affect on the firefox process not exiting which is outside of app update's control though app update will hopefully not launch an additional firefox process when firefox is experiencing the problem where it doesn't exitproperly. The firefox process not exiting will be handled in bug 1375242.
Comment 11•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Assignee | ||
Comment 12•7 years ago
|
||
For those following along, this patch has now landed and will be in tomorrow's build. So, updating when already using tomorrow's build or a build after tomorrow's build will have this new behavior.
Comment 13•7 years ago
|
||
It will be hard to tell whether it works like it should, because in today build all processes exit after closing Nightly ;).
Comment 14•7 years ago
|
||
Today processes didn't exit and update still couldn't proceed.
Assignee | ||
Comment 15•7 years ago
|
||
It might be that firefox startup didn't run due to the process not restarting. Instead of restarting just exit then make sure there are no firefox.exe processes and then launch Firefox. Whatever the case, this is about as much as can be done from the updater side for the firefox.exe process not exiting.
Comment 16•7 years ago
|
||
But as always, I killed firefox processes and update proceed.
Assignee | ||
Comment 17•7 years ago
|
||
Right and understood. That is the firefox.exe process not exiting. That should be discussed in the bug regarding that.
Comment 18•7 years ago
|
||
I don't know where to write, here or here: https://bugzilla.mozilla.org/show_bug.cgi?id=1376612
but still Nightly can't normally update. It is not fixed!
Assignee | ||
Comment 19•7 years ago
|
||
This is a best effort to update anyways even without bug 1375242 fixed. I am not at all surprised that update anyways for everyone and bug 1375242 will need to be fixed for the root cause preventing you from updating to be fixed. As shown by bug 1375242 comment#27 this did make it so that client was able to update even without bug 1375242 fixed.
So yes, this bug is fixed!
Comment 20•7 years ago
|
||
I don't know, but I see there:
"Window opened updating files
Window closed nightly did not start 2 processes open
Started nightly 3rd opened nightly did not start
Ended processes
Started nightly opened normally" - so just like me Bob had to kill processes so that update could proceed.
Comment 21•7 years ago
|
||
It seems to be after update process...
We will see tomorrow ;).
Assignee | ||
Comment 22•7 years ago
|
||
The issues regarding having to kill the process is bug 1375242 and has nothing to do with this bug. In the case of Bob it updated without killing the process and after he killed the process he was able to launch. Once again, this bug has nothing to do with the Firefox process having to be killed, etc.
Comment 23•7 years ago
|
||
Then I don't understand the aim of this bug 1375549 if still user can not use Nightly unless he manually kills processes, but ok, I'm not browsers specialist and it's not important.
Assignee | ||
Comment 24•7 years ago
|
||
It is so the update process proceeds when it can so when someone experiences bug 1375242 that at least they get updated to the latest version available. This way when someone fixes bug 1375242 they will be updated to a version that contains the fix for bug 1375242.
Comment 25•7 years ago
|
||
See Bug 1374043 "Systematic Nightly 56 crash on exit (+ update hang)"
I firmly believe that bug 1374043 is contributing to the 'Nightly updating issues',
seen since 2017-06-15, on Windows Nightly 64 bit builds.
That bug is 'long and convoluted'.
Part of the 'issue' is that there are no 'Firefox crash reports'
JUST a 'Windows Crash' (when you close Nightly).
Possible duplicates of that bug include:
Bug 1373918 "Nightly is crashing at close"
and
Bug 1376762 "Firefox Nightly (56) 20170615+ crashes on exit (Windows 7 & 10 64bit)"
The latter, is a concise report - and has a Regression pointing to Bug 1372375
DJ-Leith
Assignee | ||
Comment 26•7 years ago
|
||
Quite possible but commenting in this bug regarding the Firefox process having problems isn't going to do anyone any good. Bug 1375242 is the bug you should be commenting on.
Comment 27•7 years ago
|
||
(In reply to Robert Strong [:rstrong] (use needinfo to contact me) from comment #24)
> It is so the update process proceeds when it can so when someone experiences
> bug 1375242 that at least they get updated to the latest version available.
> This way when someone fixes bug 1375242 they will be updated to a version
> that contains the fix for bug 1375242.
But to launch Nightly to update to the version which fixes bug 1375242, user still has to kill processes? This is what I do every time for last days to update.
If I don't kill processes, the update won't proceed. If Bob doesn't kill processes, Nightly won't launch. I see no practical difference.
Nevermind, I won't understand that.
Assignee | ||
Comment 28•7 years ago
|
||
(In reply to tkdubiel from comment #27)
> (In reply to Robert Strong [:rstrong] (use needinfo to contact me) from
> comment #24)
> > It is so the update process proceeds when it can so when someone experiences
> > bug 1375242 that at least they get updated to the latest version available.
> > This way when someone fixes bug 1375242 they will be updated to a version
> > that contains the fix for bug 1375242.
>
> But to launch Nightly to update to the version which fixes bug 1375242, user
> still has to kill processes? This is what I do every time for last days to
> update.
> If I don't kill processes, the update won't proceed. If Bob doesn't kill
> processes, Nightly won't launch. I see no practical difference.
> Nevermind, I won't understand that.
(In reply to Robert Strong [:rstrong] (use needinfo to contact me) from comment #22)
> The issues regarding having to kill the process is bug 1375242 and has
> nothing to do with this bug. In the case of Bob it updated without killing
> the process and after he killed the process he was able to launch. Once
> again, this bug has nothing to do with the Firefox process having to be
> killed, etc.
Comment 29•7 years ago
|
||
:-)
Comment 30•7 years ago
|
||
Today Nightly started updating about 30 seconds after clicking "Restart...". Another 20 seconds was taken by Nightly to install updates. After all it updated (with difficulties, but as said earlier, no possibility to launch Nightly unless you kill all its processes).
Assignee | ||
Updated•7 years ago
|
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•