'Reset Firefox' doesn't work if firefox crashes on exit

UNCONFIRMED
Unassigned

Status

()

UNCONFIRMED
4 years ago
3 years ago

People

(Reporter: wlevine, Unassigned)

Tracking

(Blocks: 1 bug)

31 Branch
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0
Build ID: 20140911092608

Steps to reproduce:

I recently got upgraded from Firefox ESR 24.X to Firefox 31.1.0. Several things were not working well after the upgrade. In particular I always get a crash on exit with a message like the following:

WARNING: A phase completion condition is taking too long to complete. Condition: SessionFile: Finish writing the latest sessionstore.js Phase: profile-before-change State: (none)
ERROR: At least one completion condition failed to complete within a reasonable amount of time. Causing a crash to ensure that we do not leave the user with an unresponsive process draining resources. Conditions: [{"name":"SessionFile: Finish writing the latest sessionstore.js","state":"(none)"}] Phase: profile-before-change
WARNING: No crash reporter available
[30803] ###!!! ABORT: file resource://gre/modules/AsyncShutdown.jsm, line 431
[30803] ###!!! ABORT: file resource://gre/modules/AsyncShutdown.jsm, line 431
Segmentation fault

The problems occurred even after I disabled all add-ons.

However, I did not have this problem when I tested with a fresh profile.

So I decided to use the 'Reset Firefox' option to see if I could fix things.

'Reset Firefox' tries to restart the browser, but it runs into the same crash-on-exit bug as before, and so it fails to reset anything. This time we see one additional error message:

1412014804228   addons.manager  ERROR   Exception calling provider shutdown: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://app/modules/experiments/Experiments.jsm :: this.Experiments.PreviousExperimentProvider.prototype<.shutdown :: line 2186"  data: no] Stack trace: this.Experiments.PreviousExperimentProvider.prototype<.shutdown()@resource://app/modules/experiments/Experiments.jsm:2186 < callProvider()@resource://gre/modules/AddonManager.jsm:192 < AMI_unregisterProvider()@resource://gre/modules/AddonManager.jsm:848 < AMP_unregisterProvider()@resource://gre/modules/AddonManager.jsm:2326 < Experiments.Experiments.prototype._unregisterWithAddonManager()@resource://app/modules/experiments/Experiments.jsm:500 < Experiments.Experiments.prototype.uninit<()@resource://app/modules/experiments/Experiments.jsm:446 < TaskImpl_run()@resource://gre/modules/Task.jsm:282 < TaskImpl_handleResultValue()@resource://gre/modules/Task.jsm:338 < TaskImpl_run()@resource://gre/modules/Task.jsm:290 < TaskImpl()@resource://gre/modules/Task.jsm:247 < createAsyncFunction/asyncFunction()@resource://gre/modules/Task.jsm:224 < Spinner.prototype.observe()@resource://gre/modules/AsyncShutdown.jsm:320 < <file:unknown>
WARNING: A phase completion condition is taking too long to complete. Condition: SessionFile: Finish writing the latest sessionstore.js Phase: profile-before-change State: (none)
ERROR: At least one completion condition failed to complete within a reasonable amount of time. Causing a crash to ensure that we do not leave the user with an unresponsive process draining resources. Conditions: [{"name":"SessionFile: Finish writing the latest sessionstore.js","state":"(none)"}] Phase: profile-before-change
WARNING: No crash reporter available
[31782] ###!!! ABORT: file resource://gre/modules/AsyncShutdown.jsm, line 431
[31782] ###!!! ABORT: file resource://gre/modules/AsyncShutdown.jsm, line 431
Segmentation fault


Actual results:

Firefox does not reset my profile


Expected results:

Firefox does reset profile

Comment 1

4 years ago
Yoric, Matt, do you have ideas about what we could do to fix this? This is pretty nasty. :-(
Component: Untriaged → General
Flags: needinfo?(dteller)
Flags: needinfo?(MattN+bmo)
It looks like we should figure out what fixed bug 987323 and uplift it to ESR 31 (which I'm assuming Will is running, and not Release 31). That would fix the root problem. I think we should re-open bug 987323 if we want to pursue that path.

This bug can focus on the ability to reset Firefox if there are shutdown crashes. A possible solution to fix the general problem would be to switch from using an environment variable with a restart to putting something in profiles.ini to indicate that a reset is needed on the next startup. The reason I suggest profiles.ini is because we don't want to add new File I/O on every startup and that file is being read anyways.

Will, some workarounds for you are:
* Use a version of Firefox newer than 31 as bug 987323 supposedly was fixed then.
* If you want to force a reset on 31, you can launch it with two extra line arguments:
firefox.exe -reset-profile -migration
Blocks: 851364
Flags: needinfo?(MattN+bmo)
(Reporter)

Comment 3

4 years ago
Thanks, I will try the second workaround.

If there is any way I can help with bug 987323 please let me know. I will save a copy of my old profile, so I still should be able to reproduce the bug or try to isolate the source of the problem in case that is useful.
I agree with MattN, this bug should focus on making Firefox reset more resilient to crashes. Commenting on the bug 987323.
Flags: needinfo?(dteller)
(Reporter)

Comment 5

3 years ago
Can someone please confirm this bug?
You need to log in before you can comment on or make changes to this bug.