Closed Bug 330060 Opened 20 years ago Closed 20 years ago

strscnt periodically fails with error -8157 "Certificate extension not found"

Categories

(NSS :: Tools, defect, P1)

3.11
x86
SunOS
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 331164
3.11.1

People

(Reporter: alvolkov.bgs, Assigned: alvolkov.bgs)

Details

Notice this behavior while tracing the bug 329833. So far it is hard to determine the reason of failures. Error messages are also varies, but they all around cert validation. An example of failure: + strsclnt -q -p 8444 -d . -B -s -w nss -c 10 -C :C004 -N mandela.red.iplanet.com strsclnt: PR_Write returned error -8157: Certificate extension not found. In the case above strsclnt successful ran 221 times in the loop before error occurred.
We should have a separate bug for each different failure behavior. Since this bug reported error -8157, I have changed the summary to reflect that behavior. Note that error -8157, Certificate extension not found, is an error code that should only ever be returned by a very small set of public NSS functions, namely ones named CERT_FindXxxxxxxExtension (where Xxxxxx is one of numerous strings naming types of extensions). Many other public NSS functions call the CERT_FindXxxxExtension functions, but all those other NSS functions are required to translate error code -8157 into some other error code that is more meaningful to their operation. I'm pretty certain that strsclnt doesn't call any CERT_FindXxxxExtension function. Consequently, the fact that strsclnt reported error -8157 means that some other public NSS function that was called by strsclnt failed to translate that error -8157 to a more relevant error code. So, that's a second bug revealed by this test. That is, this test revealed that a) there are SSL failures related to certs, and b) there are SSL failures that return an error code that is invalid for those operations. In this case, I'd guess that the error (failure to translate error -8157) is actually occuring in CERT_VerifyCert (or one of its variants, such as CERT_VerifyCertNow, or CERT_VerifyCertificate). When you determine what function failed to translate that error code, please file a separate bug about that lack of translation. The focus of this bug should remain on why cert-related failures are occurring at all in this test, not on why the error code is goofy.
Assignee: wtchang → alexei.volkov.bugs
Priority: -- → P2
Summary: strscnt periodically fails with error code > 0 → strscnt periodically fails with error -8157
Target Milestone: --- → 3.11.1
Version: 3.12 → 3.11
Raising to P1 because this is likely yet another cert DB race symptom.
Priority: P2 → P1
Summary: strscnt periodically fails with error -8157 → strscnt periodically fails with error -8157 "Certificate extension not found"
QA Contact: jason.m.reid → tools
Happened again in today's nightly QA on the trunk. output.log: ssl.sh: Stress TLS ECDH-RSA AES 128 CBC with SHA (no reuse) ---- selfserv -D -p 8444 -d ../server -n mandela \ -e com-ec -w nss -c :C00E -i ../tests_pid.24701 & selfserv started at Sat Apr 1 03:22:05 PST 2006 tstclnt -p 8444 -h mandela -B -s -q \ -d ../client < nss/tests/ssl/sslreq.dat strsclnt -q -p 8444 -d ../client -B -s -w nss -c 10 -C :C00E -N \ mandela strsclnt started at Sat Apr 1 03:22:05 PST 2006 strsclnt: PR_Write returned error -8157: Certificate extension not found. <<< selfserv: HDX PR_Read returned error -12271: SSL peer cannot verify your certificate. strsclnt: -- SSL: Server Certificate Validated. strsclnt: -- SSL: Server Certificate Validated. strsclnt: -- SSL: Server Certificate Validated. strsclnt: -- SSL: Server Certificate Validated. strsclnt: -- SSL: Server Certificate Validated. strsclnt: -- SSL: Server Certificate Validated. strsclnt: 0 cache hits; 9 cache misses, 0 cache not reusable strsclnt: -- SSL: Server Certificate Validated. strsclnt: -- SSL: Server Certificate Validated. strsclnt: -- SSL: Server Certificate Validated. strsclnt: 0 cache hits; 10 cache misses, 0 cache not reusable strsclnt: NoReuse - 9 server certificates tested. strsclnt completed at Sat Apr 1 03:22:06 PST 2006 ssl.sh: Stress TLS ECDH-RSA AES 128 CBC with SHA (no reuse) produced a returncode of 1, expected is 0. FAILED selfserv: normal termination
We need to put some debugging code and/or assertions in the cert validation callback in strsclnt to try to get an idea of why the PR_Write fails. Currently, strsclnt uses the callback code from the library. We can either add to the library callback or make a copy in the tool temporarily for debugging. We may need to use the CERT_VerifyCert log feature to narrow down the point of failure.
Jason, Slavo, When is the last time we saw this problem ? I'm also wondering if bug 331164 fixed this.
I recall only having seen this once and it was the recent occurence.
Jason, By recent occurrence, do you mean the failure on 04/03 on the trunk ?
Yes, it was the occurence that Nelson pasted in here.
Marking the bug as duplicate of 331164 as the failure is not reproducible after integrating the fix (attachment 217376 [details] [diff] [review]). *** This bug has been marked as a duplicate of 331164 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.