If NSS initialization fails, we spin and spin.

RESOLVED WORKSFORME

Status

()

--
minor
RESOLVED WORKSFORME
13 years ago
2 years ago

People

(Reporter: vhaarr+bmo, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [kerh-coz])

(Reporter)

Description

13 years ago
This method returns NS_OK no matter if it fails (also note the unused nsString
message there). Maybe it should return NS_ERROR_NOT_INITIALIZED or something.
<http://lxr.mozilla.org/seamonkey/source/security/manager/ssl/src/nsNSSComponent.cpp#1475>

In any case, making it return that doesn't fix it, we still spin - we probably
need to catch the rv somewhere where it presently is just thrown away.

Also, if NSS init fails, we never return from ReadSegments here:
<http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/http/src/nsHttpConnection.cpp#558>,
but that might be because we crash:

Thread 8 (Thread -1224832080 (LWP 27936)):
#0  0xffffe410 in ?? ()
#1  0xb6fe799c in ?? ()
#2  0xb76630dc in ?? () from /lib/tls/i686/cmov/libc.so.6
#3  0xb6fe77f8 in ?? ()
#4  0xb75c4d46 in __nanosleep_nocancel () from /lib/tls/i686/cmov/libc.so.6
#5  0xb75c4b4c in sleep () from /lib/tls/i686/cmov/libc.so.6
#6  0x08053b6e in ah_crap_handler (signum=6) at
/home/vidar/cvs/mozilla/xpfe/bootstrap/nsSigHandlers.cpp:132
#7  0xb5d4be8f in nsProfileLock::FatalSignalHandler (signo=6) at
/home/vidar/cvs/mozilla/profile/dirserviceprovider/src/nsProfileLock.cpp:210
#8  <signal handler called>
#9  0xffffe410 in ?? ()
#10 0xb6fe7d68 in ?? ()
#11 0x00000006 in ?? ()
#12 0x00006d20 in ?? ()
#13 0xb75619b1 in raise () from /lib/tls/i686/cmov/libc.so.6
#14 0xb75632c9 in abort () from /lib/tls/i686/cmov/libc.so.6
#15 0xb7d92e61 in ?? ()
#16 0xb7d92e0d in ?? ()
#17 0xaf7e3684 in ?? ()
#18 0xb6fe7ed8 in ?? ()
#19 0xaf78b305 in ?? ()
#20 0xaf7d0344 in ?? ()
#21 0xaf7d01e8 in ?? ()
#22 0x00000734 in ?? ()
#23 0xaf78b2e1 in ?? ()
#24 0xb6fe7f08 in ?? ()
#25 0xb7fbfb30 in _dl_runtime_resolve () from /lib/ld-linux.so.2
#26 0xaf78b409 in ?? ()
#27 0xaf747950 in ?? ()
#28 0xb2aa5c9c in ?? ()
#29 0xb718e102 in nsHttpConnectionMgr::nsConnectionHandle::GetConnectionInfo ()
at /home/vidar/cvs/mozilla/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp:973
Previous frame inner to this frame (corrupt stack?)
#0  0xffffe410 in ?? ()

And we assert: Assertion failure: mod != NULL, at pk11slot.c:1844

NSS startup log:
-1220072640[8070550]: nsNSSComponent::ctor
-1220072640[8070550]: Beginning NSS initialization
-1220072640[8070550]: nsNSSComponent: adding observers
-1220072640[8070550]: nsNSSComponent::InitializeNSS
-1220072640[8070550]: NSS Initialization beginning
-1220072640[8070550]: can not init NSS r/w in
/home/vidar/.mozilla/default/9q1xl1ig.slt
-1220072640[8070550]: can not init in r/o either
-1220072640[8070550]: NSS problem, trying to bring up GUI error message

Note that nsNSSComponent::Init actually checks the InitializeNSS rv:
<http://lxr.mozilla.org/seamonkey/source/security/manager/ssl/src/nsNSSComponent.cpp#1475>
- but since it never returns failure, we continue ::Init rather than returning
early.

I'm not quite sure if I want to fix this up or if we should do it at all, but it
just annoys me that when I start up and NSS init fails, the browser just spins
and spins and becomes useless. We should fail gracefully and other protocols
should still work.
not related to necko
Assignee: darin → kaie.bugs
Component: Networking: HTTP → Security: PSM
QA Contact: networking.http

Comment 3

13 years ago
Why is NSS initialization failing?
(Reporter)

Comment 4

13 years ago
(In reply to comment #3)
> Why is NSS initialization failing?

Because I was trying to run with NSS trunk, and didn't realise that until I had
poked around a little.

Updated

13 years ago
Whiteboard: [kerh-coz]
QA Contact: psm

Comment 5

6 years ago
reassign bug owner.
mass-update-kaie-20120918
Assignee: kaie → nobody
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.