Closed Bug 268521 Opened 20 years ago Closed 20 years ago

C_CloseSession is invoked after C_CloseAllSessions during NSS_Shutdown

Categories

(NSS :: Libraries, defect, P2)

3.9.3
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julien.pierre, Assigned: julien.pierre)

Details

Attachments

(1 file)

This happened while running a pk12util import command .
NSS attempts to close session handle 2 after it has already called
C_CloseAllSessions .

(dbx) where   
current thread: t@1
=>[1] NSC_CloseAllSessions(slotID = 1U), line 3469 in "pkcs11.c"
  [2] NSSDBGC_CloseAllSessions(slotID = 1U), line 738 in "debug_module.c"
  [3] PK11_DestroySlot(slot = 0x477e40), line 418 in "pk11slot.c"
  [4] PK11_FreeSlot(slot = 0x477e40), line 453 in "pk11slot.c"
  [5] SECMOD_DestroyModule(module = 0x43e6f0), line 777 in "pk11util.c"
  [6] SECMOD_DestroyModuleListElement(element = 0x4365e0), line 823 in "pk11util.c"
  [7] SECMOD_DestroyModuleList(list = 0x4365e0), line 839 in "pk11util.c"
  [8] SECMOD_Shutdown(), line 97 in "pk11util.c"
  [9] NSS_Shutdown(), line 559 in "nssinit.c"
  [10] main(argc = 5, argv = 0xfffffd7fffdff6e8), line 850 in "pk12util.c"
(dbx) stop in NSC_CloseSession
(4) stop in NSC_CloseSession
(dbx) c                       
t@1 (l@1) stopped in NSC_CloseSession at line 3428 in file "pkcs11.c"
 3428       SECItem *pw = NULL;
(dbx) w                       
current thread: t@1
=>[1] NSC_CloseSession(hSession = 2U), line 3428 in "pkcs11.c"
  [2] NSSDBGC_CloseSession(hSession = 2U), line 723 in "debug_module.c"
  [3] pk11_CloseSession(slot = 0x477e40, session = 2U, owner = 1), line 373 in
"pk11obj.c"
  [4] PK11_CleanKeyList(slot = 0x477e40), line 108 in "pk11skey.c"
  [5] PK11_DestroySlot(slot = 0x477e40), line 422 in "pk11slot.c"
  [6] PK11_FreeSlot(slot = 0x477e40), line 453 in "pk11slot.c"
  [7] SECMOD_DestroyModule(module = 0x43e6f0), line 777 in "pk11util.c"
  [8] SECMOD_DestroyModuleListElement(element = 0x4365e0), line 823 in "pk11util.c"
  [9] SECMOD_DestroyModuleList(list = 0x4365e0), line 839 in "pk11util.c"
  [10] SECMOD_Shutdown(), line 97 in "pk11util.c"
  [11] NSS_Shutdown(), line 559 in "nssinit.c"
  [12] main(argc = 5, argv = 0xfffffd7fffdff6e8), line 850 in "pk12util.c"
(dbx)
Assignee: wchang0222 → julien.pierre.bugs
Status: NEW → ASSIGNED
Attachment #165237 - Flags: superreview?(rrelyea0264)
Attachment #165237 - Flags: review?(nelson)
Summary: C_CloseSession is invoked after C_CloseAllSessions during NSS_Shudown → C_CloseSession is invoked after C_CloseAllSessions during NSS_Shutdown
Comment on attachment 165237 [details] [diff] [review]
close cached sessions before closing all sessions

Good catch.

bob
Attachment #165237 - Flags: superreview?(rrelyea0264) → superreview+
Attachment #165237 - Flags: review?(nelson) → review+
Fixed on the tip .

Checking in pk11slot.c;
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11slot.c,v  <--  pk11slot.c
new revision: 1.82; previous revision: 1.81
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → 3.10
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: