Opened 3 months ago

Closed 3 months ago

#27664 closed defect (fixed)

Initialization error when using NSS with Chutney

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: nss
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor: Sponsor8

Description

I see a bunch bugs with 'make test-network' when nss is turned on. Better fix them.

One example:

Sep 12 11:35:38.273 [warn] NSS error SEC_ERROR_PKCS11_DEVICE_ERROR while decoding an RSA private key: A PKCS #11 module returned CKR_DEVICE_ERROR, indicating that a problem has occurred with the token or slot.
Sep 12 11:35:38.273 [err] Error loading private key.
Sep 12 11:35:38.273 [warn] No version 3 directory key found in /home/nickm/src/chutney/net/nodes/000a/keys/authority_signing_key
Sep 12 11:35:38.273 [err] We're configured as a V3 authority, but we were unable to load our v3 authority keys and certificate! Use tor-gencert to generate them. Dying.
Sep 12 11:35:38.273 [warn] options_act(): Bug: Error initializing keys; exiting (on Tor 0.3.5.0-alpha-dev bfc847255afb093b)
Sep 12 11:35:38.273 [err] set_options(): Bug: Acting on config options left us in a broken state. Dying. (on Tor 0.3.5.0-alpha-dev bfc847255afb093b)

Another:

Sep 12 11:35:38.415 [err] tor_assertion_failed_(): Bug: ../src/lib/crypt_ops/cry
pto_rand.c:500: crypto_rand_unmocked: Assertion PR_GetError() == SEC_ERROR_INVAL
ID_ARGS && n > BUFLEN failed; aborting. (on Tor 0.3.5.0-alpha-dev bfc847255afb09
3b)
Sep 12 11:35:38.416 [err] Bug: Assertion PR_GetError() == SEC_ERROR_INVALID_ARGS
 && n > BUFLEN failed in crypto_rand_unmocked at ../src/lib/crypt_ops/crypto_ran
d.c:500. Stack trace: (on Tor 0.3.5.0-alpha-dev bfc847255afb093b)
Sep 12 11:35:38.416 [err] Bug:     /home/nickm/src/tor-nss/build_nss/src/app/tor
(log_backtrace_impl+0x46) [0x55b4a1f40d16] (on Tor 0.3.5.0-alpha-dev bfc847255af
b093b)
Sep 12 11:35:38.416 [err] Bug:     /home/nickm/src/tor-nss/build_nss/src/app/tor
(tor_assertion_failed_+0x94) [0x55b4a1f3c324] (on Tor 0.3.5.0-alpha-dev bfc84725
5afb093b)
Sep 12 11:35:38.416 [err] Bug:     /home/nickm/src/tor-nss/build_nss/src/app/tor
(+0x1985a7) [0x55b4a1ef15a7] (on Tor 0.3.5.0-alpha-dev bfc847255afb093b)
Sep 12 11:35:38.416 [err] Bug:     /home/nickm/src/tor-nss/build_nss/src/app/tor
(init_cookie_authentication+0x92) [0x55b4a1ec68b2] (on Tor 0.3.5.0-alpha-dev bfc
847255afb093b)

Child Tickets

Change History (5)

comment:1 Changed 3 months ago by nickm

Upon investigation, it would appear this is related to RunAsDaemon.

comment:2 Changed 3 months ago by nickm

Fix in nss_27664 was much simpler than I had feared. PR at https://github.com/torproject/tor/pull/326. I tested this along with #27451.

comment:3 Changed 3 months ago by nickm

Status: assignedneeds_review

comment:4 Changed 3 months ago by ahf

Status: needs_reviewmerge_ready

LGTM.

comment:5 Changed 3 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

merged!

Note: See TracTickets for help on using tickets.