Closed Bug 397478 Opened 17 years ago Closed 17 years ago

Lock from ssl_InitSymWrapKeysLock not freed on selfserv shutdown.

Categories

(NSS :: Libraries, defect, P2)

3.11
defect

Tracking

(Not tracked)

RESOLVED FIXED
3.11.10

People

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

Details

(Keywords: memory-leak)

Attachments

(2 files)

Locks created in SSL_ConfigServerSessionIDCache are not freed on selfserv shutdown.

Block in use (biu):
Found block of size 88 bytes at address 0x8085d40 (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] __nss_InitLock() at line 67 in "nsslocks.c"
    [5] ssl_InitSymWrapKeysLock() at line 3954 in "ssl3con.c"
    [6] SSL_ConfigServerSessionIDCache() at line 1180 in "sslsnce.c"
    [7] main() at line 1899 in "selfserv.c"

Block in use (biu):
Found block of size 88 bytes at address 0x8085cd0 (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] __nss_InitLock() at line 67 in "nsslocks.c"
    [5] ssl_InitClientSessionCacheLock() at line 74 in "sslnonce.c"
    [6] SSL_ConfigServerSessionIDCache() at line 1178 in "sslsnce.c"
    [7] main() at line 1899 in "selfserv.c"
Slavo, in these runs, does selfserv do a clean shutdown without errors?
Does it successfully shut down NSS?
Or is it killed?
Keywords: mlk
Not sure if these are library leaks or tools leaks. 
Will assume they're library leaks in libSSL until we know better.
Component: Tools → Libraries
Priority: -- → P2
Target Milestone: --- → 3.12
I always use normal termination (stop message over tstclnt) in memory leak tests. 

Also there is message in log:
selfserv: normal termination
Slavo, thanks for recording those important details in this bug.
Assignee: nobody → nelson
This bug reports two leaks.  The second one is actually the subject of 
another bug, bug 397486.  So this bug is ONLY about the lock initialized
by ssl_InitSymWrapKeysLock(), the first leak reported in comment 0.
Summary: Locks from SSL_ConfigServerSessionIDCache not freed on selfserv shutdown. → Lock from ssl_InitSymWrapKeysLock not freed on selfserv shutdown.
This is a library bug. symWrapKeysLock is never destroyed. It should be done in SSL_ShutdownServerSessionIDCache .
Flags: blocking1.8.1.10?
OS: Solaris → All
Hardware: Sun → All
Version: trunk → 3.11
Removing blocking flag that was in error.
Flags: blocking1.8.1.10?
Julien, in comment 6, you wrote:
> It should be done in SSL_ShutdownServerSessionIDCache .

Do you see any reason not to do it in SSL3_ShutdownServerCache ?
This is the first of two alternative patches.
Attachment #303408 - Flags: review?(julien.pierre.boogz)
Julien, please choose one of these methods and give it r+.
Thanks.
Attachment #303409 - Flags: review?(julien.pierre.boogz)
Nelson,

That's fine, since SSL3_ShutdownServerCache is called by
SSL_ShutdownServerSessionIDCache.
Attachment #303409 - Flags: review?(julien.pierre.boogz) → review+
Attachment #303408 - Flags: review?(julien.pierre.boogz)
Attachment #303409 - Attachment description: patch v2 - simpler alternative method → patch v2 - simpler alternative method (checked in)
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
The patch for this bug was changed in bug 397486 . The new patch in that bug also fixed this leak, both on the trunk and on the branch. So I'm changing the target for this bug to the branch (3.11.10).
Target Milestone: 3.12 → 3.11.10
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: