Places database fails to initialize on CIFS homedirs

NEW
Unassigned

Status

()

Toolkit
Storage
9 years ago
5 years ago

People

(Reporter: jcranmer, Unassigned)

Tracking

(Blocks: 1 bug)

1.9.0 Branch
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

9 years ago
Reported on an installation of Firefox 3.0.3, using an x86_64 Linux 2.6.24-21 kernel.

I received this rough initial report from a friend:
On said server, Firefox 3 would work correctly with a local home directory and an AFS home directory but not a CIFS home directory. When he tried to use it with a CIFS home directory, the UI would show all the classic signs of a corrupt places (the latter part I confirmed myself via ssh and X-forwarding). When I directed him to see what was in the error console, this is the contents as he reports it:

Error: [Exception... "Component returned failure code:
 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult:
  "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame ::
 file:///usr/lib/firefox-3.0.3/components/nsBrowserGlue.js :: bg__initPlaces ::
 line 389"  data: no]
Source File: file:///usr/lib/firefox-3.0.3/components/nsBrowserGlue.js
Line: 389
Error: uncaught exception: [Exception... "Component returned
 failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)
 [nsIJSCID.getService]"  nsresult: "0x80570016
 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame ::
 chrome://browser/content/search/search.xml :: get_searchService :: line 145"
 data: no]
Error: uncaught exception: [Exception... "Component returned
 failure code: 0x8007000e (NS_ERROR_OUT_OF_MEMORY)
 [nsIDocShellHistory.useGlobalHistory]"  nsresult: "0x8007000e
 (NS_ERROR_OUT_OF_MEMORY)"  location: "JS frame ::
 chrome://browser/content/browser.js :: prepareForStartup :: line 763"  data:
 no]

He later did some testing on his own, where if started firefox 3, then firefox 2, then firefox 3 again from a clean profile:
[20:52] it works!
[20:52] i still get two errors
[20:52] the line 389
[20:52] and the ns_error_out_of_memory
[20:52] i also get two extra things
[20:52] that are "messages"
[20:52] Failed to load XPCOM component:
 /usr/lib/xulrunner-1.9.0.3/components/pyabout.py
[20:52] Failed to load XPCOM component:
 /usr/lib/xulrunner-1.9.0.3/components/libpyloader.so

That leads me to believe that this does not happen on migrated profiles, but I was unable to test this hypothesis due to an X crash.

When I later tested the firefox via X-forwarding, I discovered that the profile directory after startup contained places.sqlite and 10 copies of places.sqlite.corrupt (a later invocation, which died in the middle when X crashed, had only 7 copies). Each and every one had size 0 bytes.

I noticed too that not all the sqlite files had 0 bytes; one of the urlclassifier*.sqlite files was non-zero, as well as another one of the sqlite files (I think it was search.sqlite, but I'm not positive about that).

This initialization was 100% reproducible on new profiles; outside of new profiles, I didn't test to check reproducibility.

The error console tells me that it is almost assuredly happening within nsNavHistory::Init; from the places file problems, I am guessing that it is either failing in InitDBFile or InitDB.

Per the recommendation of someone on IRC, I had my friend attempt it with the CIFS drive mounted as nobrl. I have since received feedback that this works.
(Reporter)

Comment 1

9 years ago
Additional information from said user:
[23:12] u left out the part that on the migrated profile,
 back/forward/reload/stop buttons still dont work
[23:12] but at least the url bar works

And sorry about the typo in the blocker.
Blocks: 434307
No longer blocks: 434707
this is due to sqlite not being able to work correctly on that FS
see http://sqlite.org/cvstrac/tktview?tn=1751

workaround is to mount CIFS with "nobrl" options
Duplicate of this bug: 449316

Comment 4

9 years ago
fwiw, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=483216 actually mentions/almost explains nobrl

sqlite's view is that this is a bug in cifs.

given that you could try to use the same profile from two computers via cifs, or locally and from a computer via cifs, i'm inclined to agree that it isn't fixable from sqlite's side.

i think the best we can do is recognize this failure and inform the user how to fix it (create a profile somewhere else or ask the admin to use nobrl). We could even offer to auto migrate profiles between %HOME% and %TEMP% (copy to %TEMP% at startup, run from %TEMP%, copy back to %HOME% at exit).
Blocks: 719952
No longer blocks: 434307
Component: Places → Storage
Summary: Places fails to initialize on CIFS homedirs → Places database fails to initialize on CIFS homedirs
You need to log in before you can comment on or make changes to this bug.