Closed Bug 845402 Opened 11 years ago Closed 11 years ago

NS_ERROR_NOT_IMPLEMENTED) [nsIPrefBranch.resetBranch] _updateEnabledEngines()@resource://gre/modules/services-sync/stages/enginesync.js:269

Categories

(Firefox :: Sync, defect)

Sun
Solaris
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 836438

People

(Reporter: jeff, Assigned: ginnchen+exoracle)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; SunOS sun4u; rv:18.0) Gecko/20100101 Firefox/18.0
Build ID: 20130214091428

Steps to reproduce:

Upgraded from 18.0.2 to 19.0


Actual results:

Firefox browsers on the Solaris 10 (SPARC) system report:

"Sync encountered an error while syncing: Unknown error.  Sync will automatically retry this action."

This happens on two different Solaris Firefox sessions using two different profiles and is consistent.  It does NOT occur on my Xubuntu or Windows XP systems with version 19.0.

Based upon reports of this problem on the web, I tried replacing the places.sqlite file with one from a backup, but this changed nothing.  I then reverted back to Firefox 18.0.2 on Solaris and the problem disappears.


Expected results:

Sync should work!
Component: Untriaged → Firefox Sync: Other Clients
Product: Firefox → Mozilla Services
Version: 19 Branch → unspecified
Please attach the sync log from about:sync-log (enter as URL) to this bug report via the "add an attachment" link above.
Component: Firefox Sync: Other Clients → Firefox Sync: Backend
I'm going to guess FIPS mode (bug 443386). Let's see what's in the log first...
Flags: needinfo?(jeff)
Submitted as per request

P.S.: I originally "printed" the screen as a Postscript file, but Bugzilla would
not accept that!
Flags: needinfo?(jeff)
Jeffery: You should be able to right click on the last file in that listing and save it somewhere. Attach this file please...
Flags: needinfo?(jeff)
Flags: needinfo?(jeff)
why the cache(ex) doesn't work? :(
Huh? This is the implementation of resetBranch in Preferences.js:

  resetBranch: function(prefBranch) {
    try {
      this._prefSvc.resetBranch(prefBranch);
    }
    catch(ex) {
      // The current implementation of nsIPrefBranch in Mozilla
      // doesn't implement resetBranch, so we do it ourselves.
      if (ex.result == Cr.NS_ERROR_NOT_IMPLEMENTED)
        this.reset(this._prefSvc.getChildList(prefBranch, []));
      else
        throw ex;
    }
  },

You should not be getting that error message in the log!

Are you using an official Mozilla build of Firefox or something built from someone else?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jeff)
Summary: Firefox version 19.0 has a new sync problem on Solaris → NS_ERROR_NOT_IMPLEMENTED) [nsIPrefBranch.resetBranch] _updateEnabledEngines()@resource://gre/modules/services-sync/stages/enginesync.js:269
This is the build from:

http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/19.0/contrib/solaris_tarball/firefox-19.0.en-US.solaris-10-fcs-sparc.tar.bz2

This is the same build that I always install.
Flags: needinfo?(jeff)
Hmm. I've CC'd the Solaris package maintainer listed on https://developer.mozilla.org/en-US/docs/Supported_build_configurations.

To clarify on comment #7, the backtrace is reporting the "this._prefSvc.resetBranch(prefBranch);" line. So it appears the exception is getting rethrown. It seems to look like the enumerated error codes are off somehow. I don't know how. One would think the entire build would blow up if that were true.
We ought to change that to 

  resetBranch: function(prefBranch) {
    try {
      this._prefSvc.resetBranch(prefBranch);
    } catch (ex if (ex.result == Cr.NS_ERROR_NOT_IMPLEMENTED)) {
      // The current implementation of nsIPrefBranch in Mozilla
      // doesn't implement resetBranch, so we do it ourselves.
      this.reset(this._prefSvc.getChildList(prefBranch, []));
    }
  },

but as Greg points out, there's no way that I can see for you to get that stack trace without either:

1. The exception thrown reported itself as NS_ERROR_NOT_IMPLEMENTED, but ex.result was not that value, or
2. The catch block did not function.

This code works routinely on every platform:

--
[22:07:48.057] Preferences.resetBranch("foo.bar")
[22:07:48.059] undefined
--
[22:08:04.129] Preferences._prefSvc.resetBranch("foo.bar")
[22:08:04.131] [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIPrefBranch.resetBranch]"  nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"  location: "JS frame :: Web Console :: <TOP_LEVEL> :: line 1"  data: no]

so it's puzzling why it wouldn't work for you on Solaris.
It works fine on Solaris x86.
On Solaris SPARC,
I got ex.result as 2147500033 (0x80004001), Cr.NS_ERROR_NOT_IMPLEMENTED is -2147467263 (0xFFFFFFFF80004001)

Not sure where is the problem yet.

BTW: I can't get Javascript debugger break in this code, why?
The problem is not reproducible when compiling Firefox trunk (22.0a1) with Solaris Studio 12.3.
It could be a compiler bug.
I'm working on it.
Assignee: nobody → ginn.chen
This is a dupe of Bug 836438.
nsresult became signed int on Solaris/SPARC.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: