Closed Bug 1004476 Opened 10 years ago Closed 3 years ago

Firefox 29: browser hangs on restart with browser.cache.disk.enable' FALSE.

Categories

(Firefox :: Settings UI, defect)

29 Branch
x86
All
defect
Not set
critical

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: alex.satellite, Unassigned)

Details

(Keywords: hang)

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Firefox/24.0 (Beta/Release)
Build ID: 20140421162246

Steps to reproduce:

1) The browser is installed from the official Mozilla tarball into /opt directory on my Debian Wheezy (stable) box. The system is 32 bit. Java version: 7u45.
2) There is no profile at all. A fresh start.
3) Install NoScript or Adblock as an example addon, the browser asks to restart. Restart.
4) You may not do anything, just close Firefox with X button. (after installing NoScript I do some tweaking in its settings, but it's not necessary I guess).
5) Fire up Firefox again => a dialog appears "Firefox cannot start. It is already running".
6) Use htop to see that there are multiple instances of Firefox already running.


Actual results:

Firefox spawns multiple instances/processes of itself not allowing to start the browser after installing of any addon that requires browser restart.


Expected results:

Firefox should have restarted successfully as it always did.
Severity: normal → major
Component: Untriaged → Extension Compatibility
OS: Windows XP → Linux
I was unable to reproduce on Linux (BUT I am using Ubuntu 12.04) I tried with Mozilla Fx29 (and also with Canonical 30.0a2 (2014-04-09) )


> 5) Fire up Firefox again => a dialog appears "Firefox cannot start. It is already running".
That would likely indicate a problem at closedown 
See this help article 
https://support.mozilla.org/en-US/kb/firefox-already-running-not-responding

> 6) Use htop to see that there are multiple instances of Firefox already running.
If you have Firefox already running you will not normally be able to start it up.
(Without using a new profile and the -no-remote argument)
Wait will the processes close down if left a few minutes.
If not then kill the processes
Will Firefox then start ok ?

Note many addons that require a restart offer the option to restart as they install. 
That includes the NoScript addon from  https://addons.mozilla.org/firefox/addon/noscript/  

As a general point try to NOT close Firefox using the X button. Use the menu options of Firefox instead.
On the new Firefox 29 that is using the new menu button on the top right followed by the new quit button. 
Give Firefox a few minutes to close down in an orderly manner.

Unless of others are able to reproduce the issue you may do better to open a support question on this issue rather than trying to file this bug. 

To open  support question please use the following link https://support.mozilla.org/en-US/questions/new/desktop/fix-problems/form?search=Firefox+hangs+after+installing+addons+%28Bug+1004476+%29&step=aaq-question 
When doing so please try to follow the prompts to include full troubleshooting information, note there is a  green button that semi automates the task.
Thank you very much. I've opened a support question.
Are others able to reproduce ? 

The support discussion question is  https://support.mozilla.org/en-US/questions/997918
Ok, here is a little investigation upon the issue. Could be a regression with automatic history cleaning when closing Firefox. So, I'm editing this bug as a "Preferences" category.
I've found an article with a temporary fix: https://bugzilla.mozilla.org/show_bug.cgi?id=1004476
The fix is to disable automatic history cleaning. 'privacy.sanitize.sanitizeOnShutdown' is the culprit I guess. Tried again without this option and everything is OK now. The browser closes and doesn't hang anymore. Hope it would help you reproduce this issue.

Thank you.
Component: Extension Compatibility → Preferences
A little update: I tried again to reproduce the issue.

1) unpacked Firefox-29.tar.bz2 into /opt dir
2) launched it, went to about:config
3) switched on 'privacy.sanitize.sanitizeOnShutdown'
4) installed NoScript for e.g. It asked to restart. Restarted
5) switch off 'browser.cache.disk.enable'
6) closed Firefox and tried to open it again... And there it was again!

I guess now that something wrong with sanitizing history while disk cache is disabled. Maybe it's got to do with some Linux Kernel memory handling. I dunno. Gonna try it in Windows XP (never did actually as I prefer Linux).
UPDATE:

I've also successfully reproduced it under WinXP SP3, 32-bit. No antivirus. Almost fresh installation.

You even DON'T NEED ANY EXTENSION to be installed. Here are the steps. REAL STEP BY STEP GUIDE. Exactly what I did:

1) There should be no profile at all (including any other hidden folder where Mozilla can reside like Application Data, Local Settings etc.); 2) Install Firefox 29 (en-US); 3) Launch it, open Settings. Here is what I always do after installing FF: http://uaimage.com/image/ca0b73dc;
4) Then open about:config and set one after another these options:

browser.tabs.closeWindowWithLastTab = false; browser.sessionhistory.max_entries = 10; browser.sessionstore.max_tabs_undo = 3; browser.sessionstore.resume_from_crash = false; browser.bookmarks.max_backups = 1; browser.cache.disk.enable = false; network.dns.disableIPv6 = true; geo.enabled = false; browser.urlbar.trimURLs = false

That's all. Close Firefox and try to open it again.

That's all I do to reproduce it in WinXP and Debian Wheezy. Sorry I didn't write about these steps at first.
I think a bundle of disabling 'browser.cache.disk.enable' and enabling 'privacy.sanitize.sanitizeOnShutdown' does the job. I can be mistaken though.
I can apparently reproduce the problem that you are seeing. 
That may not match the bug title however.

The problem I can reproduce is Firefox hangs on exit if browser.cache.disk.enable = false   

STR
1.)  Open a recent Nightly in safe mode and in a clean profile. (An empty Folder was used)
2.)  Disable all plugins. (Using about:addons)
3.)  Use about:config to set pref browser.cache.disk.enable = false.
4.)  Close Firefox Nightly using its new menu and close button.
5.)  Leave a few minutes for a chance to close down in an orderly manner.
6.)  Observe that Firefox is still shown as a running process.
7.)  Attempt to start Firefox - it will not - not surprising given 6 above.
8.)  Kill the Firefox process by some means. (I used Ubuntu System Monitor)
9.)  Attempt to start Firefox again, it starts ok now.
10.) Close Firefox again. - Same problem as in 6 above.  

I used 64bit Ubuntu 12.04 and a Mozilla Nightly.

I presume I can reproduce in Windows7 and in Fx29 but I have not yet tried that. I will have a go later, and then go for a regression range.
Sorry. I spoke too soon I am NOT able to  reproduce this.


 (In reply to John Hesling [:John99] from comment #9)
> I can apparently reproduce the problem that you are seeing.
What if you disable 'browser.cache.disk.enable' and enable 'privacy.sanitize.sanitizeOnShutdown' ?
History cleaning settings should look like that: http://uaimage.com/image/ca0b73dc
Then go to about:config and set 'browser.cache.disk.enable' to FALSE.

That's how I reproduce it every time.
OS: Linux → All
Sorry, have no time investigating anymore upon this issue. I'll just leave the link with the same complaints here: https://input.mozilla.org/en-US/?q=close&date_end=2014-05-04&date_start=2014-04-27

Good luck, Mozilla.
Without STR possibly consider as duplicate of bug 970923.
OK, mark it as a duplicate. I guess it's the same issue. Sorry if I didn't search for a dup properly before posting.
See also Bug1005487 comment38 potential fix in Beta Fx30b8 now
Yes, actually the title of my bug report is irrelevant as it turned out to be. It has nothing to do with addons. By the way, the problem still exists in FF 30. There is a new bug report here: https://bugzilla.mozilla.org/show_bug.cgi?id=1023964
  (In reply to alex.satellite from comment #17)
> the problem still exists
> in FF 30. There is a new bug report here:
> https://bugzilla.mozilla.org/show_bug.cgi?id=1023964

And as you will be aware for that bug 1023964 comment 8
> Running Firefox as administrator is one possible "solution", 
>there seems to be another one: disabling the G-Data Exploit Protection.

So possibly the other bug may be related to third party software rather than to Firefox directly.

Is your issue as reported in https://support.mozilla.org/questions/997918 still ongoing ?
Yes, unfortunately. The issue is still there on my Debian Linux box. Haven't tried it in Windows yet actually.
Sstill see this issue?
Severity: major → critical
Flags: needinfo?(alex.satellite)
Keywords: hang
Summary: Firefox 29: problem after installing any addon that requires browser restart (browser hangs) → Firefox 29: browser hangs on restart with browser.cache.disk.enable' FALSE.
Well, it happened randomly when the browser was set to 'Clear history when Firefox closes' and when I closed the browser with an X button. But when I closed it from the menu File -> Quit, or simply by pressing Ctrl+Q, there was no such issue.
This behavior appeared really long ago... since that 29 version, if my memory serves me correctly, and it doesn't go away since then.

I figured it out a long time ago actually. Sorry, I didn't post here any details since there are tons of similar bugs, duplicates etc., with people suggesting strange help and asking irrelevant questions. I just got bored. I'm using now Chrome and Vivaldi because I need a fast and relatively light browser. They do not hang or get slow when working with Flash and other media and/or heavily scripted websites.

Anyway, thank you, Mozilla, I used to spend many years working in FF effectively.
Flags: needinfo?(alex.satellite)
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.