Closed Bug 1046450 Opened 10 years ago Closed 10 years ago

sync 1.5 fails to start with "PK11_GenrateRandom failed"

Categories

(Firefox :: Sync, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1034979

People

(Reporter: relud, Unassigned)

Details

Attachments

(3 files)

when I sign in to about:accounts in Fx 32.0 beta, and I attempt a manual sync, I get a grey bar. In about:config services.sync.clusterURL is not set. Log attached
I guess the key log line here is:

"""
1406688977313	Sync.Service	DEBUG	Crypto check failed: [Exception... "PK11_GenrateRandom failed"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://gre/modules/services-crypto/WeaveCrypto.js :: WeaveCrypto.prototype.generateRandomBytes :: line 550"  data: no]
"""

That's...that's not good.
:relud any chance you've got something strange going on with the crypto on this machine, e.g. being in FIPS mode?

(https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/FIPS_Mode_-_an_explanation)
Flags: needinfo?(dthornton)
Summary: sync 1.5 not being assigned a server → sync 1.5 fails to start with "PK11_GenrateRandom failed"
Or some sort of hardware crypto dongle or module that firefox might be trying to use?
I can't think of any, but it's on a mid 2012 retina mbp, and occurs in both windows and linux. I have another log i should also update, as not all of them are the same.
Flags: needinfo?(dthornton)
I don't believe it's in FIPS mode. This still happens when I start a fresh profile, and do nothing but log in to fxa and initiate a sync.
I reproduce similar disasters in my Nightly:

> 1406765811664	Sync.BrowserIDManager	ERROR	Background fetch for key bundle failed: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIKeyObjectFactory.keyFromString]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://services-crypto/utils.js :: makeHMACKey :: line 113"  data: no]
> 1406765811664	Sync.BrowserIDManager	ERROR	Could not authenticate: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIKeyObjectFactory.keyFromString]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://services-crypto/utils.js :: makeHMACKey :: line 113"  data: no]
I'm having troubles checking out a tree so I can reproduce this too, but I'd like to modify that WeaveCrypto.js line 550 to report what the return value of PK11_GenerateRandom() is, so we can look it up in the errno table. There's a stackoverflow question (http://stackoverflow.com/questions/22303198/why-would-pk11-generaterandom-return-an-error-8023) that sees a failure due to forking (NSS protecting callers from duplicate nonces), but I've no idea if that's what's happening here.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Component: Firefox Sync: Other clients → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: