Closed Bug 465733 Opened 18 years ago Closed 18 years ago

Strange failures in PKIX cert chain tests on ciotat Tinderbox.

Categories

(NSS :: Test, defect)

Sun
Solaris
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 464223
3.12.3

People

(Reporter: slavomir.katuscak+mozilla, Assigned: slavomir.katuscak+mozilla)

Details

In recent days there were many different failures on some memory leak tinderboxes on solaris 9 os. There were already done some steps like using bash instead of sh and os udpate with latest recommended patch cluster. In last 24 hours there were still detected 3 failures: 1. failure: --- chains.sh: Verifying certificate(s) User2CA2.der with flags -d AllDB -o OID.2.0 -t RootRoot.der vfychain -d AllDB -pp -vv -o OID.2.0 User2CA2.der -t RootRoot.der chains.sh: -------- Running /export/tinderlight/data/ciotat_64_DBG/mozilla/dist/SunOS5.9_64_DBG.OBJ/bin/vfychain under DBX: /usr/dist/pkgs/sunstudio_sparc,v12.0/SUNWspro/prod/bin/dbx /export/tinderlight/data/ciotat_64_DBG/mozilla/dist/SunOS5.9_64_DBG.OBJ/bin/vfychain chains.sh: -------- DBX commands: dbxenv follow_fork_mode parent dbxenv rtc_mel_at_exit verbose dbxenv rtc_biu_at_exit verbose check -memuse -match 16 -frames 16 run -d AllDB -pp -vv -o OID.2.0 User2CA2.der -t RootRoot.der open of RootRoot.der failed, -5950 = File not found. execution completed, exit code is 1 chains.sh: #776: Extension2: Verifying certificate(s) User2CA2.der with flags -d AllDB -o OID.2.0 -t RootRoot.der - FAILED --- The problem here is that trust anchor is not correctly detected. Code that should detect it is: for ITEM in ${TRUST}; do echo ${ITEM} | grep ":" if [ $? -eq 0 ]; then CERT_NICK=`echo ${ITEM} | cut -d: -f1` CERT_ISSUER=`echo ${ITEM} | cut -d: -f2` CERT=${CERT_NICK}${CERT_ISSUER}.der TRUST_OPT="${TRUST_OPT} -t ${CERT}" else TRUST_OPT="${TRUST_OPT} -t ${ITEM}" fi done In our case ITEM is set to "Root" value, grep doesn't print any string containing ':' character, so it return value should be 1, but seems like it's 0, because TRUST_OPT is set to "RootRoot.der". 2. failure: --- chains.sh: Verifying certificate(s) EE2CA2.der CA2Bridge.der BridgeCAArmy.der CAArmyArmy.der with flags -o OID.2.0 -t Army.der vfychain -pp -vv -o OID.2.0 EE2CA2.der CA2Bridge.der BridgeCAArmy.der CAArmyArmy.der -t Army.der chains.sh: -------- Running /export/tinderlight/data/ciotat_64_OPT/mozilla/dist/SunOS5.9_64_OPT.OBJ/bin/vfychain under DBX: /usr/dist/pkgs/sunstudio_sparc,v12.0/SUNWspro/prod/bin/dbx /export/tinderlight/data/ciotat_64_OPT/mozilla/dist/SunOS5.9_64_OPT.OBJ/bin/vfychain chains.sh: -------- DBX commands: dbxenv follow_fork_mode parent dbxenv rtc_mel_at_exit verbose dbxenv rtc_biu_at_exit verbose check -memuse -match 16 -frames 16 run -pp -vv -o OID.2.0 EE2CA2.der CA2Bridge.der BridgeCAArmy.der CAArmyArmy.der -t Army.der Chain is bad, -8172 = Peer's certificate issuer has been marked as not trusted by the user. PROBLEM WITH THE CERT CHAIN: CERT 5. CN=Army ROOT CA,O=Army,C=US [Certificate Authority]: ERROR -8172: Peer's certificate issuer has been marked as not trusted by the user. CN=Army ROOT CA,O=Army,C=US execution completed, exit code is 1 chains.sh: #1142: BridgeWithPolicyExtensionAndMapping: Verifying certificate(s) EE2CA2.der CA2Bridge.der BridgeCAArmy.der CAArmyArmy.der with flags -o OID.2.0 -t Army.der - FAILED --- This test is negative and is expected to fail. Code returning status: grep "exit code is 0" ${TMP_DBX} > /dev/null return $? Code detecting status: if [ "${EXP_RESULT}" = "pass" -a ${RESULT} -eq 0 ]; then html_passed "${SCENARIO}${TESTNAME}" elif [ "${EXP_RESULT}" = "fail" -a ${RESULT} -ne 0 ]; then html_passed "${SCENARIO}${TESTNAME}" else html_failed "${SCENARIO}${TESTNAME}" fi You see that exit code was 1, so returned value (from grep) should be also 1. EXP_RESULT is se to fail, so final status of tests should be PASSED, but it's failed. 3. failure: --- chains.sh: -------- DBX commands: dbxenv follow_fork_mode parent dbxenv rtc_mel_at_exit verbose dbxenv rtc_biu_at_exit verbose check -memuse -match 16 -frames 16 run -d AllDB -pp -vv -o OID.2.0 User1CA2.der -t Root Chain is bad, -8172 = Peer's certificate issuer has been marked as not trusted by the user. PROBLEM WITH THE CERT CHAIN: CERT 4. Root [Certificate Authority]: ERROR -8172: Peer's certificate issuer has been marked as not trusted by the user. CN=Root ROOT CA,O=Root,C=US execution completed, exit code is 1 chains.sh: #776: Extension2: Verifying certificate(s) User1CA2.der with flags -d AllDB -o OID.2.0 -t Root - FAILED --- Same case as 2. failure, test is expected to fail and fails, reported status should be PASSED but it's FAILED. All those 3 tests were running on the same machine with the same settings. All of them use grep command, so my hypothesis is that grep doesn't return correct values. I started small experiment now, I change PATH for tinderboxes on ciotat machines (to use different version of grep command) and I limited tests to only PKIX cert chain tests under memory leak tool. Let's see if this helps.
The same failure detected on S9/x86 Tinderbox aquash today: aquash SunOS/i386 32bit OPT on 2008/11/20 13:54:45 chains.sh: Verifying certificate(s) EE3CA33.der RootCA.der CA1RootCA.der CA32CA1.der CA33CA32.der with flags -d AllDB -o OID.2.0 -t RootCA.der vfychain -d AllDB -pp -vv -o OID.2.0 EE3CA33.der RootCA.der CA1RootCA.der CA32CA1.der CA33CA32.der -t RootCA.der chains.sh: -------- Running /export/tinderlight/data/aquash_32_OPT/mozilla/dist/SunOS5.9_i86pc_OPT.OBJ/bin/vfychain under DBX: /usr/dist/pkgs/sunstudio_i386,v11.0/SUNWspro/prod/bin/dbx /export/tinderlight/data/aquash_32_OPT/mozilla/dist/SunOS5.9_i86pc_OPT.OBJ/bin/vfychain chains.sh: -------- DBX commands: dbxenv follow_fork_mode parent dbxenv rtc_mel_at_exit verbose dbxenv rtc_biu_at_exit verbose check -memuse -match 16 -frames 16 run -d AllDB -pp -vv -o OID.2.0 EE3CA33.der RootCA.der CA1RootCA.der CA32CA1.der CA33CA32.der -t RootCA.der Chain is bad, -8172 = Peer's certificate issuer has been marked as not trusted by the user. PROBLEM WITH THE CERT CHAIN: CERT 5. CN=RootCA ROOT CA,O=RootCA,C=US [Certificate Authority]: ERROR -8172: Peer's certificate issuer has been marked as not trusted by the user. CN=RootCA ROOT CA,O=RootCA,C=US execution completed, exit code is 1 Returned value is 0, expected result is fail chains.sh: #2714: AnyPolicyWithLevel: Verifying certificate(s) EE3CA33.der RootCA.der CA1RootCA.der CA32CA1.der CA33CA32.der with flags -d AllDB -o OID.2.0 -t RootCA.der - FAILED Test was expected to fail, exit code was 1, but later was reported as 0 (grep failure). I'm going to set PATH also on this machine to use xpg4 version of grep.
ciotat SunOS/sparc 64bit OPT on 2008/11/20 12:38:50 The same issue as 1st failure: chains.sh: Verifying certificate(s) User1CA2.der with flags -d AllDB -o OID.1.0 -t CA2CA2.der vfychain -d AllDB -pp -vv -o OID.1.0 User1CA2.der -t CA2CA2.der chains.sh: -------- Running /export/tinderlight/data/ciotat_64_OPT/mozilla/dist/SunOS5.9_64_OPT.OBJ/bin/vfychain under DBX: /usr/dist/pkgs/sunstudio_sparc,v12.0/SUNWspro/prod/bin/dbx /export/tinderlight/data/ciotat_64_OPT/mozilla/dist/SunOS5.9_64_OPT.OBJ/bin/vfychain chains.sh: -------- DBX commands: dbxenv follow_fork_mode parent dbxenv rtc_mel_at_exit verbose dbxenv rtc_biu_at_exit verbose check -memuse -match 16 -frames 16 run -d AllDB -pp -vv -o OID.1.0 User1CA2.der -t CA2CA2.der open of CA2CA2.der failed, -5950 = File not found. execution completed, exit code is 1 Returned value is 1, expected result is pass chains.sh: #773: Extension2: Verifying certificate(s) User1CA2.der with flags -d AllDB -o OID.1.0 -t CA2CA2.der - FAILED Trust anchor should be set as 'CA' not as 'CA2CA2.der'. I hope this problem is already resolved, but it seems that it's not. Experiments done: Changed PATH to have /usr/bin/xpg4/bin before /bin and /usr/bin to use different version of grep. Tests were running more than 24 hours without failures of this type. When testing this, there was one more limitation: NSS_MEMLEAK_TESTS=chains (to test only chains memleak tests and skip other). Now after removing this limitation we have this failure back. One more observation, even if PATH in environment variables was set to have /usr/bin/xpg4/bin before other paths, there is setting in common/init.sh PATH=.:${DIST}/${OBJDIR}/bin:${DIST}/${OBJDIR}/lib:/bin:/usr/bin:$PATH, so in fact those 24 hours of green tests were still running on grep from /bin. Now - the only difference when tests were passing was limitation of memory leak tests to only chains tests, I wonder what causes that tests were passing and now there are failures again.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.