Firefox won't start when Weave 1.0 is enabled and profile path includes symlink

RESOLVED DUPLICATE of bug 551152

Status

()

defect
--
major
RESOLVED DUPLICATE of bug 551152
10 years ago
9 years ago

People

(Reporter: vvasaitis, Unassigned)

Tracking

({regression})

1.9.2 Branch
All
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking2.0 final+, blocking1.9.2 -)

Details

(Whiteboard: 1.9.2 patch in bug 551152)

Attachments

(8 attachments)

Reporter

Description

10 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; el; rv:1.9.2b3) Gecko/20091118 Firefox/3.6b3
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; el; rv:1.9.2b3) Gecko/20091118 Firefox/3.6b3

Hi,

When I upgraded from Firefox 3.5.5 to 3.6b3, it stopped running; it just does exit(1) on startup (no error message is printed). After a bit of testing, I narrowed down the problem to Weave. If Weave is enabled for my profile, then I experience the above behaviour. If it is disabled, everything works fine.

Actually it gets a bit more complicated than that: When I enable Weave, the *first* time that Firefox runs with Weave enabled, it starts up fine. But from the second time onwards, it doesn't launch at all. Similarly, if Weave is enabled and I run Firefox in safe mode, and then start it normally, it starts up fine, and Weave works properly, etc. But then the next time I run it, it just exits on startup.


Reproducible: Always

Comment 1

10 years ago
Do you see anything in the activity log? It's in your <profile directory>/weave/log/verbose-log.txt
Reporter

Comment 2

10 years ago
No, when this happens nothing is printed in the log.
Reporter

Comment 3

10 years ago
Oh, and I just noticed that Weave 1.0b2 is out, I upgraded and I'm still experiencing the exact same problem.
Reporter

Comment 4

10 years ago
The problem still persists with Firefox 3.6rc1 and Weave 1.0rc2. Some additional information:

- On the same computer, if I create a new profile and simply install Weave in it, the same thing happens with that profile.

- On another computer that I have, the problem doesn't appear. That computer, unlike this one, is running an official mozilla.com build:

Mozilla/5.0 (X11; U; Linux i686; el; rv:1.9.2) Gecko/20100105 Firefox/3.6

Oh, and just in case, here's what my buildconfig says for this one (the one that won't start with Weave):

--enable-application=browser --enable-official-branding --enable-optimize --disable-debug --disable-tests --disable-mochitest --enable-ui-locale=el --with-l10n-base=../l10n --with-system-jpeg --with-system-zlib --with-system-bz2 --with-system-hunspell --with-system-sqlite --with-system-cairo --with-system-lcms

Comment 5

10 years ago
Is there a combination of buildconfigs that got Firefox + Weave working for you?
Reporter

Comment 6

10 years ago
Well, I wouldn't randomly try different buildconfigs to see if any of them works. But one thing I just did was to try making a build for that other computer using the exact same mozconfig as I use for this one. Works fine too. So there's something in this computer that's making Firefox 3.6 + Weave fail to start, but the buildconfig is not it.
Different system libs, possibly?  sqlite would be my first guess, that's been an issue elsewhere...
I can confirm this problem on the following configuration:
- Ubuntu 9.10
- Firefox 3.6 final (downloaded from Mozilla's site, i picked the Linux binary offered on the homepage)
- Weave 1.0rc2

Firefox 3.6 won't start when Weave is installed and enabled. I reproduced the issue with a brand new Firefox profile on the same configuration. I don't need to be logged in into Weave for this issue to happen. It seems that Weave startup is crashing Firefox startup, and that's about it. No error message when launching from a terminal.

There is no such directory in my test profile:
<profile directory>/weave/log/verbose-log.txt
Actually there is no `weave` directory in the test profile's directory at all. It looks like Weave never had a chance to create one as it's simply crashing.

Oh, and i did experience something like being able to launch Firefox once with Weave enabled, and then not being able to restart Firefox with the same profile. That was on my main profile though, not on the test profile which didn't show this behavior.

Is there a way i can give you some debug information? This is basically stopping me from using Firefox 3.6 on Linux.
My bad, the `weave` directory did get created, i missed it somehow. I will add the verbose log file as an attachment.
Note that every time i try to start Firefox 3.6 for that profile and Weave crashes the startup, nothing gets added to the verbose logs.
Additional notes:
- I confirm that when you re-enable the extension, you can start Firefox once. If you then try to restart Firefox (just closing it and restarting, or rebooting or whatever), Firefox won't launch from then on.
- I have exactly the same issue with another add-on, Lazarus Form Recovery. As Mike Connor was suggesting this bug could be related to sqlite, it should be noted that Lazarus uses sqlite.

I tried getting some debug information from Firefox but it looks like the -console argument is Windows-only.

Comment 12

9 years ago
This is what i get with 3.6rc2 on FreeBSD built from ports,
http://www.freshports.org/www/firefox3-devel
(with debug and logging options) when the video downloadhelper addon is enabled.
I
 discovered https://developer.mozilla.org/en/Debugging_Mozilla_with_gdb and poked around a little, looks like in
  xpcwrappednativeinfo.cpp: XPCNativeInterface::GetNewOrUsed(XPCCallContext& ccx, const nsIID* iid)
this call fails:
  ccx.GetXPConnect()->GetInfoForIID(iid, getter_AddRefs(info));

(I know nothing about ff internals but maybe this is telling for someone... :)

sqlite version is 3.6.19 if it matters, and i was able to reproduce the same issue (altho of course i didn't get a log there) with the official 3.6rc2 linux tarball extracted below ~ using FreeBSD's linuxolator (and f10 i386 linux base, sqlite version there was 3.5.9.)

I also tested the same official 3.6rc2 linux build in a debian sid vbox guest (sidux.com 2009-04 in live mode), there video downloadhelper worked just fine, so this bug really seems to be depending on the environment somehow.

- nox at freebsd.org, trying to help getting ff 3.6 into FreeBSD ports...
Reporter

Comment 13

9 years ago
Just tried to make a build with "ac_add_options --with-system-sqlite" commented out, no difference unfortunately. :^/ The system sqlite version is 3.5.21 here BTW.

Comment 14

9 years ago
Since I hadn't stopped gdb yet...  I just hit `r'un again and made a small gdb log of the first occurance of the above failure with backtrace and contents of the *iid that it doesn't find, maybe this is useful.
Btw if you have trouble reproducing this and want to invite me to a developer irc chat etc just drop me an email...

- nox at freebsd.org (also now sometimes on irc.mozilla.org #firefox)

Comment 15

9 years ago
This might be related. I get the same failure on amd64-freebsd. With the FF3.6 release sources.

I decided to run the tests in js/src/xpconnect/tests and here I see the same pattern of failure:


[deuterium_zfs:js/src/xpconnect] andreast% ./tests/TestXPC
###!!! ASSERTION: Failed to write xpti manifest!: 'Error', file xptiInterfaceInfoManager.cpp, line 1953
###!!! ASSERTION: Failed to write xpti manifest!: 'Error', file xptiInterfaceInfoManager.cpp, line 1953
*** Registering components in: xpconnect
*** Registering components in: nsUCvMathModule
*** Registering components in: nsUConvModule
*** Registering components in: nsI18nModule
*** Registering components in: nsChardetModule
*** Registering components in: nsUniversalCharDetModule
*** Registering components in: necko
*** Registering components in: nsCookieModule
*** Registering components in: nsPermissionsModule
*** Registering components in: nsAuthModule
*** Registering components in: nsJarModule
*** Registering components in: ZipWriterModule
*** Registering components in: nsPrefModule
*** Registering components in: nsSecurityManagerModule
*** Registering components in: nsRDFModule
*** Registering components in: nsXPIntlModule
*** Registering components in: nsWindowDataSourceModule
*** Registering components in: nsParserModule
*** Registering components in: nsGfxModule
*** Registering components in: nsWidgetGtk2Module
*** Registering components in: nsImageLib2Module
*** Registering components in: nsPluginModule
*** Registering components in: nsLayoutModule
*** Registering components in: docshell_provider
*** Registering components in: embedcomponents
*** Registering components in: Browser_Embedding_Module
*** Registering components in: nsAccessibilityModule
*** Registering components in: appshell
*** Registering components in: nsTransactionManagerModule
*** Registering components in: nsComposerModule
*** Registering components in: nsChromeModule
*** Registering components in: application
*** Registering components in: nsFindComponent
*** Registering components in: Apprunner
*** Registering components in: CommandLineModule
*** Registering components in: nsFileViewModule
*** Registering components in: mozStorageModule
*** Registering components in: nsPlacesModule
*** Registering components in: tkAutoCompleteModule
*** Registering components in: satchel
*** Registering components in: PKI
*** Registering components in: nsToolkitCompsModule
*** Registering components in: RemoteServiceModule
*** Registering components in: nsSoftwareUpdate
*** Registering components in: JavaScript_Debugger
*** Registering components in: BOOT
*** Registering components in: NSS
*** Registering components in: nsSystemPrefModule
*** Registering components in: nsAutoConfigModule
*** Registering components in: mozSpellCheckerModule
*** Registering components in: nsUnixProxyModule
*** Registering components in: jsctypes
WARNING: Couldn't register mComponentsDir: file nsComponentManager.cpp, line 3419
*** Registering components in: xpconnect
*** Registering components in: nsUCvMathModule
*** Registering components in: nsUConvModule
*** Registering components in: nsI18nModule
*** Registering components in: nsChardetModule
*** Registering components in: nsUniversalCharDetModule
*** Registering components in: necko
*** Registering components in: nsCookieModule
*** Registering components in: nsPermissionsModule
*** Registering components in: nsAuthModule
*** Registering components in: nsJarModule
*** Registering components in: ZipWriterModule
*** Registering components in: nsPrefModule
*** Registering components in: nsSecurityManagerModule
*** Registering components in: nsRDFModule
*** Registering components in: nsXPIntlModule
*** Registering components in: nsWindowDataSourceModule
*** Registering components in: nsParserModule
*** Registering components in: nsGfxModule
*** Registering components in: nsWidgetGtk2Module
*** Registering components in: nsImageLib2Module
*** Registering components in: nsPluginModule
*** Registering components in: nsLayoutModule
*** Registering components in: docshell_provider
*** Registering components in: embedcomponents
*** Registering components in: Browser_Embedding_Module
*** Registering components in: nsAccessibilityModule
*** Registering components in: appshell
*** Registering components in: nsTransactionManagerModule
*** Registering components in: nsComposerModule
*** Registering components in: nsChromeModule
*** Registering components in: application
*** Registering components in: nsFindComponent
*** Registering components in: Apprunner
*** Registering components in: CommandLineModule
*** Registering components in: nsFileViewModule
*** Registering components in: mozStorageModule
*** Registering components in: nsPlacesModule
*** Registering components in: tkAutoCompleteModule
*** Registering components in: satchel
*** Registering components in: PKI
*** Registering components in: nsToolkitCompsModule
*** Registering components in: RemoteServiceModule
*** Registering components in: nsSoftwareUpdate
*** Registering components in: JavaScript_Debugger
*** Registering components in: BOOT
*** Registering components in: NSS
*** Registering components in: nsSystemPrefModule
*** Registering components in: nsAutoConfigModule
*** Registering components in: mozSpellCheckerModule
*** Registering components in: nsUnixProxyModule
*** Registering components in: jsctypes
WARNING: Couldn't register mComponentsDir: file nsComponentManager.cpp, line 3419
###!!! ASSERTION: This is not supposed to fail!: 'Error', file nsXPConnect.cpp, line 1016
FAILED to init xpconnect classes
nsStringStats
 => mAllocCount:             13
 => mReallocCount:            2
 => mFreeCount:               5  --  LEAKED 8 !!!
 => mShareCount:             34
 => mAdoptCount:            226
 => mAdoptFreeCount:        226

Diving into gdb I end up here as well:
ccx.GetXPConnect()->GetInfoForIID(iid, getter_AddRefs(info));

I hope this is useful for further debugging.

Comment 16

9 years ago
Ok I now built the ff 3.6 release version and to confirm its really the same issue as I reported earlier in this ticket for video downloadhelper this time I tested with weave 1.0rc2.  As you can see in the attached log the failure I get is exactly the same, in mozilla-1.9.2/js/src/xpconnect/src/xpcwrappednativeinfo.cpp: XPCNativeInterface::GetNewOrUsed(XPCCallContext& ccx, const nsIID* iid), the call in line 269:
    ccx.GetXPConnect()->GetInfoForIID(iid, getter_AddRefs(info));
fails (btw its also the first time the breakpoint is hit), info is returned as null (the `n'ext command ends up somewhere in nsCOMPtr.h but that probably is just in some destructor invoked by the `return nsnull', as you can see from the `f'rame command there we are still actually in XPCNativeInterface::GetNewOrUsed.)  And the offending *iid is:

(gdb) p/x *iid
$2 = {
  m0 = 0x155809f1,
  m1 = 0x71f1,
  m2 = 0x47c5,
  m3 = {0xbe, 0x97, 0xd8, 0x12, 0xba, 0x56, 0x4, 0x5}
}

..if that means anything. :)

 Oh and btw I meanwhile found out greasemonkey seems to be affected too... (and the mplayer plugin was also broken but that of course is a different problem.)

- nox at freebsd.org (who also just /join'ed mozilla.org #firefox again...)
You need to run TestXPC using run-mozilla.sh. E.g. ./run-mozilla.sh ./TestXPC

For running under the debugger, how did you run Firefox?
Oh, that TestXPC one needs to be run from dist/bin, not from the source directory
Did you build WEave's crypto lib for your platform as well?  I don't think we have the right binaries for you...

Comment 20

9 years ago
Ok here is the TestXPC log.
And I ran ff in the debugger like this: (as also shown at the top of the log :)

XPCOM_BREAK_ON_LOAD=imgicon LD_LIBRARY_PATH=work/mozilla-1.9.2/dist/bin/ script gdblog-3.6-weave.txt gdb work/mozilla-1.9.2/dist/bin/firefox-bin

Comment 21

9 years ago
(In reply to comment #19)
> Did you build WEave's crypto lib for your platform as well?  I don't think we
> have the right binaries for you...

I'm not sure, but I also didn't even configure it and it never causes ff 3.5 failing to start i, only 3.6...

Comment 22

9 years ago
(In reply to comment #21)
> (In reply to comment #19)
> > Did you build WEave's crypto lib for your platform as well?  I don't think we
> > have the right binaries for you...
> 
> I'm not sure, but I also didn't even configure it and it never causes ff 3.5
> failing to start, only 3.6...

...and actually I was just told we do have the libs too. :)

Comment 23

9 years ago
(In reply to comment #20)
> Created an attachment (id=423708) [details]
> 3.6 TestXPC log with weave enabled
> 
> Ok here is the TestXPC log.

And btw TestXPC from ff 3.5.7 shows all tests passed here (except for
  build wrapper with veto: TEST NOT RUN
but thats the same with 3.6 so I guess its expected.)  This is the FreeBSD port I used:  http://www.freshports.org/www/firefox35

> And I ran ff in the debugger like this: (as also shown at the top of the log :)
> 
> XPCOM_BREAK_ON_LOAD=imgicon LD_LIBRARY_PATH=work/mozilla-1.9.2/dist/bin/ script
> gdblog-3.6-weave.txt gdb work/mozilla-1.9.2/dist/bin/firefox-bin

...and to confirm the behavior I saw was not just caused by the way I ran ff in the debugger I disabled weave and hit `r'un in gdb again, and yes, ff started up and ran just fine. (hitting the breakpoint multiple times till I disabled it.)

Comment 25

9 years ago
I just attached the output from the TestXPC with the hint in comment #17.

Comment 26

9 years ago
So I poked around some more and found out
  ccx.GetXPConnect()->GetInfoForIID(iid, getter_AddRefs(info));
  http://mxr.mozilla.org/mozilla1.9.2/source/js/src/xpconnect/src/xpcwrappednativeinfo.cpp#269
failed because the iid table (mWorkingSet->mIIDTable) was... empty!
Further poking found that was because in xptiInterfaceInfoManager.cpp:
xptiInterfaceInfoManager::AutoRegisterInterfaces the call to
  DoFullValidationMergeFromFileList():
  http://mxr.mozilla.org/mozilla1.9.2/source/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp#1934
failed.  There was nothing in the log about that, maybe the
  LOG_AUTOREG(("FAILED to do full validation\n"));
in there should be changed to an NS_ERROR() so the next poor soul chasing
a failure like this gets to find the real cause of the problem sooner?
Anyway, turned out DoFullValidationMergeFromFileList() didn't like weave's
IWeaveCrypto.xpt which in this case was this file:
  /home/nox/.mozilla/firefox/debugging2/extensions/{340c2bbc-ce74-4362-90b5-7c26312808ef}/components/IWeaveCrypto.xpt
- apparently aWorkingSet->FindDirectoryOfFile(file, &dir) on it failed
probably because of symlinks in the path:
  http://mxr.mozilla.org/mozilla1.9.2/source/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp#1095
(/home on FreeBSD defaults to be symlinked to /usr/home.)  Symlinks now
in xptiInterfaceInfoManager.cpp: IndexOfDirectoryOfFile():
  http://mxr.mozilla.org/mozilla1.9.2/source/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp#638
get expanded ({parent,current}->Normalize()) as of this commit:
  http://hg.mozilla.org/releases/mozilla-1.9.2/rev/51bafb458d68#l4.7
which explains why it worked in 3.5.  And if I disable those two calls then
ff 3.6 with weave, greasemonkey and video downloadhelper finally no longer
fails to start and seems to work like it should.

 *Phew* :)

- nox at freebsd.org
Reporter

Comment 27

9 years ago
I can confirm that, on the system that I'm experiencing this problem, there's a symlink involved too. (I've got /home/XXX linked to /afs/.../XXX.) So this looks fairly plausible. Thanks nox!
Reporter

Updated

9 years ago
Component: Needs Triage → Extension Compatibility
Product: Weave → Firefox
Version: unspecified → 3.6 Branch
QA Contact: needstriage → extension.compatibility
Blocks: 491245
Component: Extension Compatibility → XPCOM
Keywords: regression
Product: Firefox → Core
QA Contact: extension.compatibility → xpcom
Summary: Firefox 3.6b3 won't start when Weave 1.0b1 is enabled → Firefox won't start when Weave 1.0b1 is enabled
Version: 3.6 Branch → 1.9.2 Branch
(In reply to comment #26)
> Created an attachment (id=425051) [details]
> partly revert of commit 51bafb458d68 that fixes the issue here
So is this a regression from bug 491245?
Josh, it looks like your changes from bug 491245 caused this.  Can you look into it?
Status: UNCONFIRMED → NEW
blocking1.9.2: --- → ?
status1.9.2: --- → ?
Ever confirmed: true
And is this a duplicate of bug 513736, perhaps?  Or is this not about things that are in the GRE?

Comment 31

9 years ago
Ok I just tried the change mentioned in bug 513736

https://bugzilla.mozilla.org/show_bug.cgi?id=513736#c4

instead of my previous patch and it wasn't enough to fix this issue.

Comment 32

9 years ago
(In reply to comment #30)
> And is this a duplicate of bug 513736, perhaps?  Or is this not about things
> that are in the GRE?

Well at least the .xpt files that failed to load for me and thus caused the issue are part of the profile, example:

/home/nox/.mozilla/firefox/debugging2/extensions/{340c2bbc-ce74-4362-90b5-7c26312808ef}/components/IWeaveCrypto.xpt

(and the reason seems to be that /home is a symlink here.)

Comment 33

9 years ago
I can reproduce this in a 32-bit Ubuntu 9.10 VM using these steps:

1. Install Weave 1.0 via the default Ubuntu version of Firefox 3.5.x. Restart the browser after install.

2. Download Firefox 3.6 to the desktop from mozilla.com.

3. Quit Firefox 3.5.x.

4. Using the terminal, rename "~/.mozilla" to "~/.mozilla-orig" ('mv .mozilla .mozilla-orig') and then create a new symlink called "~/.mozilla" which points to "~/.mozilla-orig" ('ln -s ~/.mozilla-orig ~/.mozilla').

5. Launch Firefox 3.6.

6. Quit Firefox 3.6 and start it again.

Firefox 3.6 won't launch the second time. Disabling Weave via Firefox 3.5.x will fix the problem, allowing Firefox 3.6 to launch multiple times.

Comment 34

9 years ago
I marked this blocking 1.9.3, I think it is important to fix this for 1.9.2 soon as well.
blocking2.0: --- → final

Updated

9 years ago
Hardware: x86 → All
Summary: Firefox won't start when Weave 1.0b1 is enabled → Firefox won't start when Weave 1.0 is enabled

Updated

9 years ago
Summary: Firefox won't start when Weave 1.0 is enabled → Firefox won't start when Weave 1.0 is enabled and profile path includes symlink
blocking1.9.2: ? → -
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 551152
I don't think it's useful to dupe this bug against a "WFM on trunk" bug if this is really wanted on the 1.9.2 branch. Yes, there's a patch in that bug, but the status is just confusing.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Whiteboard: 1.9.2 patch in bug 551152
better to reopen the bug with a patch as a branch bug instead. Sorry for the spam
Status: REOPENED → RESOLVED
Last Resolved: 9 years ago9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 551152
You need to log in before you can comment on or make changes to this bug.