Open Bug 721277 Opened 12 years ago Updated 2 years ago

browser.cache.disk.parent_directory setting does not work from about:config

Categories

(Core :: Networking: Cache, defect, P5)

x86_64
Linux
defect

Tracking

()

People

(Reporter: Anthony.Lanni, Unassigned)

Details

(Whiteboard: [necko-would-take])

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0.1) Gecko/20120103 Firefox/9.0.1
Build ID: 20120103162304

Steps to reproduce:

went to about:config.  Created new preference called 'browser.cache.disk.parent_directory': Status=locked, Type=string, Value=/usr/pic1/firefox-cache-alanni.  closed and reopened about:config to make sure it stuck. 

I'm running Linux: Red Hat Enterprise Linux 6.  I see the same thing in RHEL5 and Windows 7 (with a different value for the pref, obviously).  Happens in Firefox 7, too (have not tested in 8).


Actual results:

I restarted firefox and checked again: setting persists properly.  About:cache reports the cache directory as (and I see files showing up in) /usr/home/alanni/.mozilla/firefox/0gduajh0.default/Cache.

browser.cache.disk.parent_directory setting does not show up in the prefs.js file on linux, either.  (it does in Windows 7, but still has no effect.)


Expected results:

Cache files should show up in the directory specified in the value of browser.cache.disk.parent_directory.  That preference should be written out to the prefs.js file.

thx
anthony
Has this ever worked? I found an old bug (bug 349591) for Firefox 1.5 stating it doesn't work...
Yes, it was working fine in the 3.x versions: possibly 2.x as well (hard to remember that far back).  Worked in Seamonkey and Mozilla suite, as well.

Was using both this preference and *browser.cache.directory* (which was set to the same dir + "/Cache"), and it worked great.

thx
anthony
Component: Untriaged → Networking: Cache
Product: Firefox → Core
QA Contact: untriaged → networking.cache
Can't reproduce on Firefox ESR 10.0.3/FreeBSD and Firefox trunk under Windows XP, browser.cache.disk.parent_directory works fine. Can you provide full 
about:config output like
Information about the Cache Service
Memory cache device
Number of entries: 	1
Maximum storage size: 	18432 KiB
Storage in use: 	9 KiB
Inactive storage: 	9 KiB
List Cache Entries
Disk cache device
Number of entries: 	48
Maximum storage size: 	870400 KiB
Storage in use: 	409 KiB
Cache Directory: 	/usr/test/cache/Cache
List Cache Entries
Offline cache device
Number of entries: 	0
Maximum storage size: 	512000 KiB
Storage in use: 	0 KiB
Cache Directory: 	/root/.mozilla/firefox/xnud8mkn.default/OfflineCache
Whiteboard: closeme INCO 2012-04-01
As soon as I've got Firefox 10 for Red Had Enterprise Linux installed, I'll test that.

I've included another screenshot of about:config with a search on 'cache' - this time with more results.

thx
anthony
Sorry, silly mistype, needed data in about:cache output
OH!  no prob, that I can cut and paste. ;)

Information about the Cache Service
Memory cache device
Number of entries: 	1348
Maximum storage size: 	32768 KiB
Storage in use: 	29486 KiB
Inactive storage: 	29485 KiB
List Cache Entries
Disk cache device
Number of entries: 	7189
Maximum storage size: 	524288 KiB
Storage in use: 	156302 KiB
Cache Directory: 	/usr/home/alanni/.mozilla/firefox/0gduajh0.default/Cache
List Cache Entries
Offline cache device
Number of entries: 	0
Maximum storage size: 	512000 KiB
Storage in use: 	0 KiB
Cache Directory: 	/usr/home/alanni/.mozilla/firefox/0gduajh0.default/OfflineCache
1) If you set this property without lock, does it works?
2) Try to start firefox under strace with redirecting it's output to file, and check, if there is something related?
Also I wonders, how you setting lock on setting, according to http://kb.mozillazine.org/Lock_Prefs it must be set in separate file, not while property creation
1) No, it doesn't work if it's set without a lock.  Also, I just tried it in Firefox ESR 10.0.3 and it doesn't work in that version, either.
2) I'll try that now.  Typically stracing firefox causes a system crash, so I need a bit of prep before I do that.

I'm setting a variety of preferences - cache, proxy, homepage, etc - with an autoconfig file (I'm a sysadmin, using autoconfig for an enterprise solution).

thx
anthony
Whiteboard: closeme INCO 2012-04-01 → closeme INCO 2012-05-01
Sorry, didn't update after testing strace.  Found nothing related in the strace file.

I'm now running Firefox ESR 10.0.3, Red Hat Enterprise Linux Workstation release 6.2 (Santiago).  Still seeing the same issue.

Opened a ticket in Red Hat's Issue Tracker, as well.  https://access.redhat.com/support/cases/00646141

thx
anthony
BTW after re-reading this to make sure it's clear for the Red Hat techs, I realized that I need to add one more bit of important info.

When I add the 'browser.cache.disk.parent_directory' to my prefs.js file by closing Firefox, editing it in my favorite text editor, and then restarting, Firefox puts the cache files in the location I specify.

The issue is that putting that value in 'about.config' does not result in it getting written out to the prefs.js file.  In fact, after quitting Firefox a second time - which re-writes out the config values to the prefs.js file - that preference is deleted, despite the fact that it continues to be shown in about:config.

does that make sense?
So, the problem is that ui for some reason can't read/write this pref, but other prefs are fine, right?
Summary: browser.cache.disk.parent_directory setting does not work → browser.cache.disk.parent_directory setting does not work from about:config
Whiteboard: closeme INCO 2012-05-01
Yes, the other preferences we set seem to be working properly.  Incidentally, this does not show up in win7, only in linux.

thx
anthony
I can confirm this is an issue in Mac OS X as well, using Firefox 10.0.6esr.  We are pushing configuration preferences via Autoconfig.  The preference only appears to work when set by hand or explicitly set in prefs.js.  Autoconfig settings appear to be set correctly in about:config, but about:cache shows the default path.  Running lsof against the Firefox pid also confirms that it is not using the set path from Autoconfig.
I can confirm this is an issue in RHEL 6.3 and Firefox 10.0.7 ESR.

My about:config has values (in italics, locked, set via autoconfig):

browser.cache.directory;/usr/pic1/firefox-cache-cijohnson/Cache
browser.cache.disk.parent_directory;/usr/pic1/firefox-cache-cijohnson

These values are ignored. about:cache says:

Cache Directory: 	/usr/home/cijohnson/.mozilla/firefox/vyjtd9dk.default/Cache
Can you please also check if this present on current nightly build from http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/? Backup your profile folder before testing just in case
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: 9 Branch → 10 Branch
Another piece of information: if I configure the cache parent_directory preference in our local configuration file (such as /usr/lib64/firefox/default/preferences/all.js), it works. And we also have a .cfg file that all.js refers to, and there I can set a lockPref. Same results: setting a lockPref in that configuration file works.

So the problem is definitely when the value is set via autoconfig, not just a locked preference issue.
(In reply to Phoenix from comment #16)
> Can you please also check if this present on current nightly build from
> http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-
> central/? Backup your profile folder before testing just in case

Confirmed it is present in 19.0a1 (2012-10-16). Same results: about:config shows locked, autoconfig'd value for browser.cache.disk.parent_directory but about:cache does not reflect that value.
Version: 10 Branch → Trunk
Following Carl's work we moved the javascript onto the local machine: works as expected.  The failure came in when trying to point the local config file at a generic http location on the network.

Currently we've worked around this by using a delivery system (puppet) to put the file on each individual machine.  

thx
anthony
Whiteboard: [necko-would-take]
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: