nssckbi root certs module leaks memory

RESOLVED DUPLICATE of bug 308275

Status

NSS
Libraries
P2
normal
RESOLVED DUPLICATE of bug 308275
16 years ago
10 years ago

People

(Reporter: Julien Pierre, Assigned: Robert Relyea)

Tracking

({memory-leak})

3.11
3.12
memory-leak

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

16 years ago
This is a leak summary from a run of crlutil on Win2K under purify. If I delete
nssckbi.dll, there is no leak.

                [I] Summary of all memory leaks... {468 bytes, 9 blocks}
                [W] MLK: Memory leak of 52 bytes from 1 block allocated in
PR_Calloc [LIBNSPR4.DLL]
                    Distribution of leaked blocks
                    Allocation location
                     [MSVCRT.DLL ip=0x58003925]
                    PR_Calloc      [prmem.c:484]
                    PR_NewLock     [prulock.c:194]
                    secmodCreateMutext [pk11load.c:61]
                    nssCKFWMutex_Create [mutex.c:200]
                    PR_NewLock     [nsprstub.c:359]
                    nssArena_Create [arena.c:415]
                    NSSArena_Create [arena.c:383]
                    nssCKFWToken_Create [token.c:216]
                    nssCKFWSlot_GetToken [slot.c:658]
                    NSSCKFWC_GetTokenInfo [wrap.c:525]
                    builtinsC_GetTokenInfo [nssck.api:225]
                    PK11_InitToken [pk11slot.c:1710]
                    PK11_InitSlot  [pk11slot.c:1924]
                    SECMOD_LoadPKCS11Module [pk11load.c:275]
                    SECMOD_LoadModule [pk11pars.c:306]
                    SECMOD_LoadModule [pk11pars.c:319]
                    nss_Init       [nssinit.c:456]
                    NSS_Initialize [nssinit.c:525]
                    main           [crlutil.c:430]
                    mainCRTStartup [crtexe.obj]
                [W] MLK: Memory leak of 52 bytes from 1 block allocated in
PR_Calloc [LIBNSPR4.DLL]
                    Distribution of leaked blocks
                    Allocation location
                     [MSVCRT.DLL ip=0x58003925]
                    PR_Calloc      [prmem.c:484]
                    PR_NewLock     [prulock.c:194]
                    secmodCreateMutext [pk11load.c:61]
                    nssCKFWMutex_Create [mutex.c:200]
                    PR_NewLock     [nsprstub.c:359]
                    InitializeArenas [plarena.c:81]
                    PR_CallOnce    [nsprstub.c:425]
                    LockArena      [plarena.c:90]
                    PL_ArenaAllocate [plarena.c:180]
                    nss_zalloc_arena_locked [arena.c:829]
                    nss_ZAlloc     [arena.c:925]
                    nssCKFWInstance_Create [instance.c:217]
                    NSSCKFWC_Initialize [wrap.c:159]
                    builtinsC_Initialize [nssck.api:114]
                    SECMOD_LoadPKCS11Module [pk11load.c:232]
                    SECMOD_LoadModule [pk11pars.c:306]
                    SECMOD_LoadModule [pk11pars.c:319]
                    nss_Init       [nssinit.c:456]
                    NSS_Initialize [nssinit.c:525]
                    main           [crlutil.c:430]
                    mainCRTStartup [crtexe.obj]
                [W] MLK: Memory leak of 52 bytes from 1 block allocated in
PR_Calloc [LIBNSPR4.DLL]
                    Distribution of leaked blocks
                    Allocation location
                     [MSVCRT.DLL ip=0x58003925]
                    PR_Calloc      [prmem.c:484]
                    PR_NewLock     [prulock.c:194]
                    secmodCreateMutext [pk11load.c:61]
                    nssCKFWMutex_Create [mutex.c:200]
                    nssCKFWInstance_CreateMutex [instance.c:494]
                    nssCKFWHash_Create [hash.c:120]
                    nssCKFWInstance_Create [instance.c:287]
                    NSSCKFWC_Initialize [wrap.c:159]
                    builtinsC_Initialize [nssck.api:114]
                    SECMOD_LoadPKCS11Module [pk11load.c:232]
                    SECMOD_LoadModule [pk11pars.c:306]
                    SECMOD_LoadModule [pk11pars.c:319]
                    nss_Init       [nssinit.c:456]
                    NSS_Initialize [nssinit.c:525]
                    main           [crlutil.c:430]
                    mainCRTStartup [crtexe.obj]
                [W] MLK: Memory leak of 52 bytes from 1 block allocated in
PR_Calloc [LIBNSPR4.DLL]
                    Distribution of leaked blocks
                    Allocation location
                     [MSVCRT.DLL ip=0x58003925]
                    PR_Calloc      [prmem.c:484]
                    PR_NewLock     [prulock.c:194]
                    secmodCreateMutext [pk11load.c:61]
                    nssCKFWMutex_Create [mutex.c:200]
                    nssCKFWInstance_CreateMutex [instance.c:494]
                    nssCKFWHash_Create [hash.c:120]
                    nssCKFWInstance_Create [instance.c:293]
                    NSSCKFWC_Initialize [wrap.c:159]
                    builtinsC_Initialize [nssck.api:114]
                    SECMOD_LoadPKCS11Module [pk11load.c:232]
                    SECMOD_LoadModule [pk11pars.c:306]
                    SECMOD_LoadModule [pk11pars.c:319]
                    nss_Init       [nssinit.c:456]
                    NSS_Initialize [nssinit.c:525]
                    main           [crlutil.c:430]
                    mainCRTStartup [crtexe.obj]
                [W] MLK: Memory leak of 52 bytes from 1 block allocated in
PR_Calloc [LIBNSPR4.DLL]
                    Distribution of leaked blocks
                    Allocation location
                     [MSVCRT.DLL ip=0x58003925]
                    PR_Calloc      [prmem.c:484]
                    PR_NewLock     [prulock.c:194]
                    secmodCreateMutext [pk11load.c:61]
                    nssCKFWMutex_Create [mutex.c:200]
                    nssCKFWInstance_CreateMutex [instance.c:494]
                    nssCKFWHash_Create [hash.c:120]
                    nssCKFWToken_CloseAllSessions [token.c:1594]
                    NSSCKFWC_CloseAllSessions [wrap.c:1411]
                    builtinsC_CloseAllSessions [nssck.api:420]
                    PK11_DestroySlot [pk11slot.c:472]
                    PK11_FreeSlot  [pk11slot.c:516]
                    SECMOD_DestroyModule [pk11util.c:646]
                    SECMOD_DestroyModuleListElement [pk11util.c:690]
                    SECMOD_DestroyModuleList [pk11util.c:705]
                    SECMOD_Shutdown [pk11util.c:91]
                    NSS_Shutdown   [nssinit.c:546]
                    main           [crlutil.c:472]
                    mainCRTStartup [crtexe.obj]
                [W] MLK: Memory leak of 52 bytes from 1 block allocated in
PR_Calloc [LIBNSPR4.DLL]
                    Distribution of leaked blocks
                    Allocation location
                     [MSVCRT.DLL ip=0x58003925]
                    PR_Calloc      [prmem.c:484]
                    PR_NewLock     [prulock.c:194]
                    secmodCreateMutext [pk11load.c:61]
                    nssCKFWMutex_Create [mutex.c:200]
                    nssCKFWInstance_CreateMutex [instance.c:494]
                    nssCKFWToken_Create [token.c:237]
                    nssCKFWSlot_GetToken [slot.c:658]
                    NSSCKFWC_GetTokenInfo [wrap.c:525]
                    builtinsC_GetTokenInfo [nssck.api:225]
                    PK11_InitToken [pk11slot.c:1710]
                    PK11_InitSlot  [pk11slot.c:1924]
                    SECMOD_LoadPKCS11Module [pk11load.c:275]
                    SECMOD_LoadModule [pk11pars.c:306]
                    SECMOD_LoadModule [pk11pars.c:319]
                    nss_Init       [nssinit.c:456]
                    NSS_Initialize [nssinit.c:525]
                    main           [crlutil.c:430]
                    mainCRTStartup [crtexe.obj]
                [W] MLK: Memory leak of 52 bytes from 1 block allocated in
PR_Calloc [LIBNSPR4.DLL]
                    Distribution of leaked blocks
                    Allocation location
                     [MSVCRT.DLL ip=0x58003925]
                    PR_Calloc      [prmem.c:484]
                    PR_NewLock     [prulock.c:194]
                    secmodCreateMutext [pk11load.c:61]
                    nssCKFWMutex_Create [mutex.c:200]
                    nssCKFWInstance_CreateMutex [instance.c:494]
                    nssCKFWHash_Create [hash.c:120]
                    nssCKFWToken_Create [token.c:256]
                    nssCKFWSlot_GetToken [slot.c:658]
                    NSSCKFWC_GetTokenInfo [wrap.c:525]
                    builtinsC_GetTokenInfo [nssck.api:225]
                    PK11_InitToken [pk11slot.c:1710]
                    PK11_InitSlot  [pk11slot.c:1924]
                    SECMOD_LoadPKCS11Module [pk11load.c:275]
                    SECMOD_LoadModule [pk11pars.c:306]
                    SECMOD_LoadModule [pk11pars.c:319]
                    nss_Init       [nssinit.c:456]
                    NSS_Initialize [nssinit.c:525]
                    main           [crlutil.c:430]
                    mainCRTStartup [crtexe.obj]
                [W] MLK: Memory leak of 52 bytes from 1 block allocated in
PR_Calloc [LIBNSPR4.DLL]
                    Distribution of leaked blocks
                    Allocation location
                     [MSVCRT.DLL ip=0x58003925]
                    PR_Calloc      [prmem.c:484]
                    PR_NewLock     [prulock.c:194]
                    secmodCreateMutext [pk11load.c:61]
                    nssCKFWMutex_Create [mutex.c:200]
                    nssCKFWInstance_CreateMutex [instance.c:494]
                    nssCKFWHash_Create [hash.c:120]
                    nssCKFWToken_Create [token.c:266]
                    nssCKFWSlot_GetToken [slot.c:658]
                    NSSCKFWC_GetTokenInfo [wrap.c:525]
                    builtinsC_GetTokenInfo [nssck.api:225]
                    PK11_InitToken [pk11slot.c:1710]
                    PK11_InitSlot  [pk11slot.c:1924]
                    SECMOD_LoadPKCS11Module [pk11load.c:275]
                    SECMOD_LoadModule [pk11pars.c:306]
                    SECMOD_LoadModule [pk11pars.c:319]
                    nss_Init       [nssinit.c:456]
                    NSS_Initialize [nssinit.c:525]
                    main           [crlutil.c:430]
                    mainCRTStartup [crtexe.obj]
        [W] MLK: Memory leak of 52 bytes from 1 block allocated in PR_Calloc
[LIBNSPR4.DLL]
                Distribution of leaked blocks
                Allocation location
                     [MSVCRT.DLL ip=0x58003925]
                    PR_Calloc      [prmem.c:484]
                    PR_NewLock     [prulock.c:194]
                    secmodCreateMutext [pk11load.c:61]
                    nssCKFWMutex_Create [mutex.c:200]
                    nssCKFWInstance_CreateMutex [instance.c:494]
                    nssCKFWObject_Create [object.c:202]
                    nssCKFWFindObjects_Next [find.c:372]
                    NSSCKFWC_FindObjects [wrap.c:2533]
                    builtinsC_FindObjects [nssck.api:739]
                    pk11_FindObjectByTemplate [pk11cert.c:183]
                    pk11_isRootSlot [pk11slot.c:1866]
                    PK11_InitSlot  [pk11slot.c:1933]
                    SECMOD_LoadPKCS11Module [pk11load.c:275]
                    SECMOD_LoadModule [pk11pars.c:306]
                    SECMOD_LoadModule [pk11pars.c:319]
                    nss_Init       [nssinit.c:456]
                    NSS_Initialize [nssinit.c:525]
                    main           [crlutil.c:430]
                    mainCRTStartup [crtexe.obj]
Looks like NSS_Shutdown creates mutexes that don't get cleaned up!
Priority: -- → P3
QA Contact: bishakhabanerjee → jason.m.reid
Assignee: wtchang → nobody
QA Contact: jason.m.reid → libraries
(Reporter)

Comment 2

12 years ago
Here is some more recent leak data from NSS 3.11.2 provided by Anton . His program mostly did NSS_Initialize / NSS_Shutdown in a loop . But it appears C_FindObjects is used and leaks, so that would be a serious problem for anyone using the module.

We need to perform more testing in an actual application (ie. selfserv/strsclnt) to get a better list of leaks in this module, but this is a good start .

    ADDR  BUFADDR    TIMESTAMP THR  LASTLOG CONTENTS    CACHE     SLAB     NEXT DEPTH
001c2028 001bf660 1066a2c287d512   1 0002dce0 00000000 0004f688 0005d680 005e4a20    16
         libumem.so.1`umem_cache_alloc+0x208
         libumem.so.1`umem_alloc+0x44
         libumem.so.1`malloc+0x2c
         libumem.so.1`calloc+0x58
         libnspr4.so`PR_Calloc+0x8c
         libnspr4.so`PR_NewLock+0x4c
         libnssckbi.so`nssCKFWMutex_Create+0x70
         libnssckbi.so`nssCKFWInstance_CreateMutex+0x30
         libnssckbi.so`nssCKFWObject_Create+0x17c
         libnssckbi.so`nssCKFWFindObjects_Next+0x32c
         libnssckbi.so`NSSCKFWC_FindObjects+0x120
         libnssckbi.so`builtinsC_FindObjects+0x5c
         libnss3.so`pk11_FindObjectByTemplate+0xc8
         libnss3.so`pk11_isRootSlot+0xe8
         libnss3.so`PK11_InitSlot+0x244
         libnss3.so`SECMOD_LoadPKCS11Module+0x5c0
         libnss3.so`SECMOD_LoadModule+0x14c
         libnss3.so`SECMOD_LoadModule+0x1f0
         libnss3.so`nss_Init+0x3b0
         libnss3.so`NSS_Initialize+0xfc
         0x111d0
         0x10ba0

    ADDR  BUFADDR    TIMESTAMP THR  LASTLOG CONTENTS    CACHE     SLAB     NEXT DEPTH
0015de30 0015e000 1066a2c27a7a20   1 00049c38 00000000 0004f688 0005d890 007a2fe8    17
         libumem.so.1`umem_cache_alloc+0x208
         libumem.so.1`umem_alloc+0x44
         libumem.so.1`malloc+0x2c
         libumem.so.1`calloc+0x58
         libnspr4.so`PR_Calloc+0x8c
         libnspr4.so`PR_NewLock+0x4c
         libnssckbi.so`trackerOnceFunc+0x28
         libnssckbi.so`call_once+0xcc
         libnssckbi.so`nssPointerTracker_initialize+0x38
         libnssckbi.so`arena_add_pointer+0x2c
         libnssckbi.so`nssArena_Create+0xe4
         libnssckbi.so`NSSArena_Create+0xc
         libnssckbi.so`nssCKFWInstance_Create+0x1c
         libnssckbi.so`NSSCKFWC_Initialize+0xdc
         libnssckbi.so`builtinsC_Initialize+0x44
         libnss3.so`secmod_ModuleInit+0x114
         libnss3.so`SECMOD_LoadPKCS11Module+0x31c
         libnss3.so`SECMOD_LoadModule+0x14c
         libnss3.so`SECMOD_LoadModule+0x1f0
         libnss3.so`nss_Init+0x3b0
         libnss3.so`NSS_Initialize+0xfc
         0x111d0
         0x10ba0


    ADDR  BUFADDR    TIMESTAMP THR  LASTLOG CONTENTS    CACHE     SLAB     NEXT DEPTH
001c30b0 001bec50 1066a2c279ecd9   1 00049ae8 00000000 0004f688 0005d680 005e5aa8    18
         libumem.so.1`umem_cache_alloc+0x208
         libumem.so.1`umem_alloc+0x44
         libumem.so.1`malloc+0x2c
         libumem.so.1`calloc+0x58
         libnspr4.so`PR_Calloc+0x8c
         libnspr4.so`PR_NewLock+0x4c
         libnssckbi.so`myOnceFunction+0x1c
         libnspr4.so`PR_CallOnce+0x84
         libnssckbi.so`call_once+0x60
         libnssckbi.so`nssPointerTracker_initialize+0x38
         libnssckbi.so`arena_add_pointer+0x2c
         libnssckbi.so`nssArena_Create+0xe4
         libnssckbi.so`NSSArena_Create+0xc
         libnssckbi.so`nssCKFWInstance_Create+0x1c
         libnssckbi.so`NSSCKFWC_Initialize+0xdc
         libnssckbi.so`builtinsC_Initialize+0x44
         libnss3.so`secmod_ModuleInit+0x114
         libnss3.so`SECMOD_LoadPKCS11Module+0x31c
         libnss3.so`SECMOD_LoadModule+0x14c
         libnss3.so`SECMOD_LoadModule+0x1f0
         libnss3.so`nss_Init+0x3b0
         libnss3.so`NSS_Initialize+0xfc
         0x111d0
         0x10ba0

    ADDR  BUFADDR    TIMESTAMP THR  LASTLOG CONTENTS    CACHE     SLAB     NEXT DEPTH
000877e8 000831f8 1066a2c27a28be   1 00049b90 00000000 0004ea08 0005def0 00000000    17
         libumem.so.1`umem_cache_alloc+0x208
         libumem.so.1`umem_alloc+0x44
         libumem.so.1`malloc+0x2c
         libnspr4.so`PR_Malloc+0x78
         libnspr4.so`PR_NewCondVar+0x24
         libnssckbi.so`myOnceFunction+0x6c
         libnspr4.so`PR_CallOnce+0x84
         libnssckbi.so`call_once+0x60
         libnssckbi.so`nssPointerTracker_initialize+0x38
         libnssckbi.so`arena_add_pointer+0x2c
         libnssckbi.so`nssArena_Create+0xe4
         libnssckbi.so`NSSArena_Create+0xc
         libnssckbi.so`nssCKFWInstance_Create+0x1c
         libnssckbi.so`NSSCKFWC_Initialize+0xdc
         libnssckbi.so`builtinsC_Initialize+0x44
         libnss3.so`secmod_ModuleInit+0x114
         libnss3.so`SECMOD_LoadPKCS11Module+0x31c
         libnss3.so`SECMOD_LoadModule+0x14c
         libnss3.so`SECMOD_LoadModule+0x1f0
         libnss3.so`nss_Init+0x3b0
         libnss3.so`NSS_Initialize+0xfc
         0x111d0
         0x10ba0


    ADDR  BUFADDR    TIMESTAMP THR  LASTLOG CONTENTS    CACHE     SLAB     NEXT DEPTH
00087000 00083460 1066a2c27abe7c   1 00049ce0 00000000 0004ea08 0005def0 00000000    17
         libumem.so.1`umem_cache_alloc+0x208
         libumem.so.1`umem_alloc+0x44
         libumem.so.1`malloc+0x2c
         libnspr4.so`PR_Malloc+0x78
         libplds4.so`DefaultAllocTable+0x10
         libplds4.so`PL_NewHashTable+0xb4
         libnssckbi.so`trackerOnceFunc+0x90
         libnssckbi.so`call_once+0xcc
         libnssckbi.so`nssPointerTracker_initialize+0x38
         libnssckbi.so`arena_add_pointer+0x2c
         libnssckbi.so`nssArena_Create+0xe4
         libnssckbi.so`NSSArena_Create+0xc
         libnssckbi.so`nssCKFWInstance_Create+0x1c
         libnssckbi.so`NSSCKFWC_Initialize+0xdc
         libnssckbi.so`builtinsC_Initialize+0x44
         libnss3.so`secmod_ModuleInit+0x114
         libnss3.so`SECMOD_LoadPKCS11Module+0x31c
         libnss3.so`SECMOD_LoadModule+0x14c
         libnss3.so`SECMOD_LoadModule+0x1f0
         libnss3.so`nss_Init+0x3b0
         libnss3.so`NSS_Initialize+0xfc
         0x111d0
         0x10ba0


    ADDR  BUFADDR    TIMESTAMP THR  LASTLOG CONTENTS    CACHE     SLAB     NEXT DEPTH
000b3200 000ad8c8 1066a2c27ad692   1 00049d88 00000000 0004f408 0005ddd0 00000000    17
         libumem.so.1`umem_cache_alloc+0x208
         libumem.so.1`umem_alloc+0x44
         libumem.so.1`malloc+0x2c
         libnspr4.so`PR_Malloc+0x78
         libplds4.so`DefaultAllocTable+0x10
         libplds4.so`PL_NewHashTable+0x138
         libnssckbi.so`trackerOnceFunc+0x90
         libnssckbi.so`call_once+0xcc
         libnssckbi.so`nssPointerTracker_initialize+0x38
         libnssckbi.so`arena_add_pointer+0x2c
         libnssckbi.so`nssArena_Create+0xe4
         libnssckbi.so`NSSArena_Create+0xc
         libnssckbi.so`nssCKFWInstance_Create+0x1c
         libnssckbi.so`NSSCKFWC_Initialize+0xdc
         libnssckbi.so`builtinsC_Initialize+0x44
         libnss3.so`secmod_ModuleInit+0x114
         libnss3.so`SECMOD_LoadPKCS11Module+0x31c
         libnss3.so`SECMOD_LoadModule+0x14c
         libnss3.so`SECMOD_LoadModule+0x1f0
         libnss3.so`nss_Init+0x3b0
         libnss3.so`NSS_Initialize+0xfc
         0x111d0
         0x10ba0
(Reporter)

Updated

12 years ago
Priority: P3 → P2
Target Milestone: --- → 3.11.4
All those stacks with the word "once" in the names of their functions
only occur once, right?  
Oddly, I only see PR_CallOnce in SOME of those stacks.  :(
(Reporter)

Comment 4

12 years ago
Nelson,

These latest stacks occur once per NSS initialization . They can happen more than once during the execution of a given program. Some programs initialize and shutdown NSS multiple times - eg. a browser doing profile switching, an LDAP library being opened and shutdown multiple times.
(Reporter)

Comment 5

12 years ago
I played around with the root cert module, strsclnt and selfserv. So far, I haven't been able to find any leaks other than these one-time problems. But my tests were pretty basic, with my own cert and public SSL servers. We probably need more public certs that chain to the roots to do proper testing. At least the good news is that builtinsC_FindObjects doesn't repeatedly leak - that would have made the module unusable in servers . We would probably have heard more complaints by now . That's the good news. The bad news of course is that there are 6 init-time leaks to fix.

Target Milestone: 3.11.4 → ---

Comment 6

11 years ago
After adding root certs module to test suite this leak occurs also there (on Solaris platform).

DBX log:
Memory Leak (mel):
Found leaked block of size 88 bytes at address 0x8170b38
At time of allocation, the call stack was:
	[1] calloc() at 0xb4d30860 
	[2] PR_Calloc() at line 475 in "prmem.c"
	[3] PR_NewLock() at line 174 in "ptsynch.c"
	[4] 0xa991fac9
	[5] 0xa991e7d2
	[6] 0xa9920034
	[7] 0xa991d93d
	[8] 0xa9915876
	[9] 0xa9907cb6
	[10] pk11_FindObjectByTemplate() at line 1377 in "pk11obj.c"
	[11] pk11_isRootSlot() at line 1462 in "pk11slot.c"
	[12] PK11_InitSlot() at line 1529 in "pk11slot.c"
	[13] SECMOD_LoadPKCS11Module() at line 377 in "pk11load.c"
	[14] SECMOD_LoadModule() at line 323 in "pk11pars.c"
	[15] SECMOD_LoadModule() at line 338 in "pk11pars.c"
	[16] nss_Init() at line 486 in "nssinit.c"
Version: 3.6 → 3.11
Keywords: mlk
Summary: Built-in token leaks memory → nssckbi root certs module leaks memory

Comment 7

11 years ago
Current DBX stacks related to this leak:

Block in use (biu):
Found block of size 88 bytes at address 0x8172930 (2.64% of total)
At time of allocation, the call stack was:
    [1] calloc() at 0xb4d308a0
    [2] PR_Calloc() at line 475 in "prmem.c"
    [3] PR_NewLock() at line 174 in "ptsynch.c"
    [4] trackerOnceFunc() at line 186 in "tracker.c"
    [5] call_once() at line 131 in "tracker.c"
    [6] nssPointerTracker_initialize() at line 233 in "tracker.c"
    [7] arena_add_pointer() at line 139 in "arena.c"
    [8] nssArena_Create() at line 447 in "arena.c"
    [9] NSSArena_Create() at line 386 in "arena.c"
    [10] nssCKFWInstance_Create() at line 217 in "instance.c"
    [11] NSSCKFWC_Initialize() at line 203 in "wrap.c"
    [12] builtinsC_Initialize() at line 117 in "nssck.api"
    [13] secmod_ModuleInit() at line 147 in "pk11load.c"
    [14] SECMOD_LoadPKCS11Module() at line 379 in "pk11load.c"
    [15] SECMOD_LoadModule() at line 323 in "pk11pars.c"
    [16] SECMOD_LoadModule() at line 338 in "pk11pars.c"

Block in use (biu):
Found block of size 88 bytes at address 0x8172890 (2.64% of total)
At time of allocation, the call stack was:
    [1] calloc() at 0xb4d308a0
    [2] PR_Calloc() at line 475 in "prmem.c"
    [3] PR_NewLock() at line 174 in "ptsynch.c"
    [4] myOnceFunction() at line 89 in "tracker.c"
    [5] PR_CallOnce() at line 815 in "prinit.c"
    [6] call_once() at line 123 in "tracker.c"
    [7] nssPointerTracker_initialize() at line 233 in "tracker.c"
    [8] arena_add_pointer() at line 139 in "arena.c"
    [9] nssArena_Create() at line 447 in "arena.c"
    [10] NSSArena_Create() at line 386 in "arena.c"
    [11] nssCKFWInstance_Create() at line 217 in "instance.c"
    [12] NSSCKFWC_Initialize() at line 203 in "wrap.c"
    [13] builtinsC_Initialize() at line 117 in "nssck.api"
    [14] secmod_ModuleInit() at line 147 in "pk11load.c"
    [15] SECMOD_LoadPKCS11Module() at line 379 in "pk11load.c"
    [16] SECMOD_LoadModule() at line 323 in "pk11pars.c"

Block in use (biu):
Found block of size 64 bytes at address 0x81729d8 (1.92% of total)
At time of allocation, the call stack was:
    [1] PR_Malloc() at line 467 in "prmem.c"
    [2] DefaultAllocTable() at line 72 in "plhash.c"
    [3] PL_NewHashTable() at line 142 in "plhash.c"
    [4] trackerOnceFunc() at line 196 in "tracker.c"
    [5] call_once() at line 131 in "tracker.c"
    [6] nssPointerTracker_initialize() at line 233 in "tracker.c"
    [7] arena_add_pointer() at line 139 in "arena.c"
    [8] nssArena_Create() at line 447 in "arena.c"
    [9] NSSArena_Create() at line 386 in "arena.c"
    [10] nssCKFWInstance_Create() at line 217 in "instance.c"
    [11] NSSCKFWC_Initialize() at line 203 in "wrap.c"
    [12] builtinsC_Initialize() at line 117 in "nssck.api"
    [13] secmod_ModuleInit() at line 147 in "pk11load.c"
    [14] SECMOD_LoadPKCS11Module() at line 379 in "pk11load.c"
    [15] SECMOD_LoadModule() at line 323 in "pk11pars.c"
    [16] SECMOD_LoadModule() at line 338 in "pk11pars.c"

Block in use (biu):
Found block of size 32 bytes at address 0x81729a0 (0.96% of total)
At time of allocation, the call stack was:
    [1] PR_Malloc() at line 467 in "prmem.c"
    [2] DefaultAllocTable() at line 72 in "plhash.c"
    [3] PL_NewHashTable() at line 129 in "plhash.c"
    [4] trackerOnceFunc() at line 196 in "tracker.c"
    [5] call_once() at line 131 in "tracker.c"
    [6] nssPointerTracker_initialize() at line 233 in "tracker.c"
    [7] arena_add_pointer() at line 139 in "arena.c"
    [8] nssArena_Create() at line 447 in "arena.c"
    [9] NSSArena_Create() at line 386 in "arena.c"
    [10] nssCKFWInstance_Create() at line 217 in "instance.c"
    [11] NSSCKFWC_Initialize() at line 203 in "wrap.c"
    [12] builtinsC_Initialize() at line 117 in "nssck.api"
    [13] secmod_ModuleInit() at line 147 in "pk11load.c"
    [14] SECMOD_LoadPKCS11Module() at line 379 in "pk11load.c"
    [15] SECMOD_LoadModule() at line 323 in "pk11pars.c"
    [16] SECMOD_LoadModule() at line 338 in "pk11pars.c"

These stacks can be reproduced by selfserv or strsclnt.
See also bug 308275.
Slavo, All the leaks reported in comment 7 are "tracker" leaks, 
leaks that occur only in debug builds, and that are leaked by 
the code in tracker.c, because tracker's finalize function is 
never called.

tracker leaks are now recorded in bug 397476.  

if the ONLY leaks remaining in nssckbi are the "tracker" leaks
then this bug can be marked as a duplicate of 397476.
Assignee: nobody → rrelyea
Target Milestone: --- → 3.12
Bug 397476 was resolved as a duplicate of bug 370536.

According to the "ignored" file, all the stacks associated with this bug
number are tracker stacks, and the patch for bug 370536 will (if reviewed
and accepted) eliminate them all, so if there are no other CKFW leak 
stacks, then it seems this bug has become a duplicate of bug 370536.

But if there are other CKFW leak stacks in ignored, the entries in that
file should cite this bug.
(Assignee)

Comment 10

10 years ago
Bug 397476 which list the original leaks is now fixed. The additional leaks are definately in bug 370536 so resolving as dup.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 308275
You need to log in before you can comment on or make changes to this bug.