Closed Bug 351270 Opened 18 years ago Closed 18 years ago

Regression Assertion failure: 0, at unix_rand.c:149

Categories

(NSS :: Libraries, defect, P2)

3.11.3
Sun
SunOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
3.11.3

People

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

References

Details

(Whiteboard: regression)

ssl.sh: SSL3 Request don't require client auth (client does not provide auth) ----
selfserv -D -p 8447 -d ../server -n mintchip.red.iplanet.com  \
         -e mintchip.red.iplanet.com-ec -w nss -r -i ../tests_pid.15902  &
selfserv started at Fri Sep  1 21:37:39 PDT 2006
tstclnt -p 8447 -h mintchip.red.iplanet.com  -q \
        -d ../client < /share/builds/mccrel3/security/securityjes5/builds/20060901.1/wozzeck_Solaris8/mozilla/security/nss/tests/ssl/sslreq.dat
tstclnt -p 8447 -h mintchip.red.iplanet.com -f -d ../client \
        -T -w nss -n none  < /share/builds/mccrel3/security/securityjes5/builds/20060901.1/wozzeck_Solaris8/mozilla/security/nss/tests/ssl/sslreq.dat
Abort - core dumped
Assertion failure: 0, at unix_rand.c:149
<TR><TD>SSL3 Request don't require client auth (client does not provide auth) (cert TestUser41 - not revoked). Core file is detected.
ssl.sh: SSL3 Request don't require client auth (client does not provide auth) (cert TestUser41 - not revoked) produced a returncode of 134, expected is 0 FAILED
selfserv: normal termination

(gdb) bt
#0  0xff0a9740 in __sigprocmask ()
#1  0xff09e970 in _resetsig ()
#2  0xff09e110 in _sigon ()
#3  0xff0a1150 in _thrp_kill ()
#4  0xfeecb458 in raise ()
#5  0xfeeb5a84 in abort ()
#6  0xff0f58f4 in PR_Assert ()
    at ../../../../../pr/src/md/unix/unix_errors.c:259
#7  0xfe30626c in RNG_kstat () at secport.c:325
#8  0xfe306e70 in RNG_SystemInfoForRNG () at secport.c:325
#9  0xfedeb550 in RNG_SystemInfoForRNG () at ../../../dbm/src/mktemp.c:87
#10 0xfedc0884 in nsc_CommonInitialize () at ../../../dbm/src/mktemp.c:87
#11 0xfedc0c70 in NSC_Initialize () at ../../../dbm/src/mktemp.c:87
#12 0xff1d1b3c in secmod_ModuleInit () at utf8.c:220
#13 0xff1d21cc in SECMOD_LoadPKCS11Module () at utf8.c:220
#14 0xff1e2fac in SECMOD_LoadModule () at utf8.c:220
#15 0xff1e3050 in SECMOD_LoadModule () at utf8.c:220
#16 0xff197048 in NSSPublicKey_FindPrivateKey () at utf8.c:220
#17 0xff197240 in NSS_Init () at utf8.c:220
#18 0x17d98 in main (argc=13, argv=0xffbef2fc) at tstclnt.c:533

Happened in nightly testing on mintchip SunOS5.8_DBG.OBJ securityjes5 20060901.1.
Maybe this can also help:

Core was generated by `tstclnt -p 8447 -h mintchip.red.iplanet.com -f -T -w nss -n none -d ../client'.
Program terminated with signal 9, Killed.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060901.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libssl3.so...done.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060901.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libsmime3.so...done.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060901.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libnss3.so...done.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060901.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libplc4.so...done.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060901.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libplds4.so...done.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060901.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libnspr4.so...done.
Reading symbols from /usr/lib/libthread.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/librt.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
---Type <return> to continue, or q <return> to quit---
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060901.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libsoftokn3.so...done.
Reading symbols from /usr/lib/libpthread.so.1...done.
Reading symbols from /usr/lib/libmp.so.2...done.
Reading symbols from /usr/lib/libaio.so.1...done.
Reading symbols from /usr/lib/libbsm.so.1...done.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060901.1/wozzeck_Solaris8/mozilla/nsprpub/SunOS5.8_DBG.OBJ/pr/src/md/unix/libnspr_flt4.so...done.
Reading symbols from /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1...done.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060901.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libfreebl_32fpu_3.so...
done.
Reading symbols from /usr/lib/libkstat.so.1...done.
#0  0xff0a9740 in __sigprocmask ()
ssl.sh: TLS Require client auth on 2nd hs (bad password) produced a returncode of 1, expected is 1 PASSED
selfserv: normal termination
ssl.sh: TLS Require client auth on 2nd hs (client auth) ----
selfserv -D -p 8447 -d ../server -n mintchip.red.iplanet.com  \
         -e mintchip.red.iplanet.com-ec -w nss -r -r -r -r -i ../tests_pid.26088  &
selfserv started at Sun Sep  3 23:55:34 PDT 2006
tstclnt -p 8447 -h mintchip.red.iplanet.com -B -s -q \
        -d ../client < /share/builds/mccrel3/security/securityjes5/builds/20060903.1/wozzeck_Solaris8/mozilla/security/nss/tests/ssl/sslreq.dat
tstclnt -p 8447 -h mintchip.red.iplanet.com -f -d ../client -B -s \
        -w nss -n TestUser   < /share/builds/mccrel3/security/securityjes5/builds/20060903.1/wozzeck_Solaris8/mozilla/security/nss/tests/ssl/sslreq.dat
Abort - core dumped
Assertion failure: 0, at unix_rand.c:149
<TR><TD>TLS Require client auth on 2nd hs (client auth). Core file is detected.
ssl.sh: TLS Require client auth on 2nd hs (client auth) produced a returncode of 134, expected is 0 FAILED

Happened in nightly testing on mintchip SunOS5.8_64_DBG.OBJ securityjes5
20060903.1.
Assignee: nobody → julien.pierre.bugs
Priority: -- → P1
Summary: Tstclnt crashed. → Regression Assertion failure: 0, at unix_rand.c:149
Whiteboard: regression
Version: unspecified → 3.11.3
cmsutil -D -i alice-ec.dsig.SHA1 -c alice.txt -d ../bobdir 
Assertion failure: 0, at unix_rand.c:149
Abort - core dumped
<TR><TD>Verifying Alice's Detached Signature (ECDSA w/ SHA1). Core file is detected.
smime.sh: Verifying Alice's Detached Signature (ECDSA w/ SHA1) . FAILED

bash-2.00$ gdb cmsutil core 
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (sparc-sun-solaris2.5.1), Copyright 1996 Free Software Foundation, Inc...

warning: exec file is newer than core file.
Core was generated by `cmsutil -D -i alice-ec.dsig.SHA1 -c alice.txt -d ../bobdir'.
Program terminated with signal 9, Killed.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060904.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libssl3.so...done.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060904.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libsmime3.so...done.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060904.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libnss3.so...done.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060904.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libplc4.so...done.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060904.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libplds4.so...done.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060904.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libnspr4.so...done.
Reading symbols from /usr/lib/libthread.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/librt.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060904.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libsoftokn3.so...done.
Reading symbols from /usr/lib/libpthread.so.1...done.
Reading symbols from /usr/lib/libmp.so.2...done.
Reading symbols from /usr/lib/libaio.so.1...done.
Reading symbols from /usr/lib/libbsm.so.1...done.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060904.1/wozzeck_Solaris8/mozilla/nsprpub/SunOS5.8_DBG.OBJ/pr/src/md/unix/libnspr_flt4.so...done.
Reading symbols from /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1...done.
Reading symbols from /share/builds/mccrel3/security/securityjes5/builds/20060904.1/wozzeck_Solaris8/mozilla/dist/SunOS5.8_DBG.OBJ/lib/libfreebl_32fpu_3.so...done.
Reading symbols from /usr/lib/libkstat.so.1...done.
#0  0xff0a9740 in __sigprocmask ()
(gdb) bt
#0  0xff0a9740 in __sigprocmask ()
#1  0xff09e970 in _resetsig ()
#2  0xff09e110 in _sigon ()
#3  0xff0a1150 in _thrp_kill ()
#4  0xfeecb458 in raise ()
#5  0xfeeb5a84 in abort ()
#6  0xff0f58f4 in PR_Assert () at ../../../../../pr/src/md/unix/unix_errors.c:259
#7  0xfe30626c in RNG_kstat () at secport.c:325
#8  0xfe306e70 in RNG_SystemInfoForRNG () at secport.c:325
#9  0xfedeb550 in RNG_SystemInfoForRNG () at ../../../dbm/src/mktemp.c:87
#10 0xfedc0884 in nsc_CommonInitialize () at ../../../dbm/src/mktemp.c:87
#11 0xfedc0c70 in NSC_Initialize () at ../../../dbm/src/mktemp.c:87
#12 0xff1d1b3c in secmod_ModuleInit () at utf8.c:220
#13 0xff1d21cc in SECMOD_LoadPKCS11Module () at utf8.c:220
#14 0xff1e2fac in SECMOD_LoadModule () at utf8.c:220
#15 0xff1e3050 in SECMOD_LoadModule () at utf8.c:220
#16 0xff197048 in NSSPublicKey_FindPrivateKey () at utf8.c:220
#17 0xff1972ec in NSS_InitReadWrite () at utf8.c:220
#18 0x1b728 in main (argc=8, argv=0xffbef31c) at cmsutil.c:1401

Happened in nightly testing on mintchip SunOS5.8_DBG.OBJ securityjes5
20060904.1.

The stack is the same, except NSS_InitReadWrite() instead of NSS_Init(), so it's probably the same bug.
*** Bug 351271 has been marked as a duplicate of this bug. ***
The assertion appears in the following .

            if (-1 == kstat_read(kc, ksp, NULL)) {
                PORT_Assert(0);
                /* missing data from a single kstat shouldn't be fatal */
                continue;
            }

It only occurs in the debug build, and has no incidence on released code, so it shouldn't be P1. Lowering to P2.

I'm surprised it occurred here because I used mintchip as a test machiine when I wrote the code and didn't see it.

The fix is simply to remove this assertion.

I made this change on the tip :

Checking in unix_rand.c;
/cvsroot/mozilla/security/nss/lib/freebl/unix_rand.c,v  <--  unix_rand.c
new revision: 1.20; previous revision: 1.19
done

And on the NSS_3_11_BRANCH :
Checking in unix_rand.c;
/cvsroot/mozilla/security/nss/lib/freebl/unix_rand.c,v  <--  unix_rand.c
new revision: 1.17.10.3; previous revision: 1.17.10.2
done


Status: NEW → RESOLVED
Closed: 18 years ago
Priority: P1 → P2
Resolution: --- → FIXED
Target Milestone: --- → 3.11.3
You need to log in before you can comment on or make changes to this bug.