Closed
Bug 126930
Opened 23 years ago
Closed 23 years ago
SSL_ConfigServerSessionIDCache does not work on OS/2
Categories
(NSS :: Libraries, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
3.8
People
(Reporter: julien.pierre, Assigned: julien.pierre)
References
Details
Attachments
(1 file, 3 obsolete files)
3.36 KB,
patch
|
Details | Diff | Splinter Review |
After building NSS standalone on OS/2, I tried running selfserv. After getting
past bug 126928 by commenting some calls, I ran into this :
[D:\nss\mozilla\dist\os22.45_icc_dbg.obj\bin]test
selfserv: SSL_ConfigServerSessionIDCache returned error -5992:
function not implemented.
Debugging showed that the problem was that PR_OpenAnonFileMap was getting called
within mozilla/security/nss/lib/ssl/sslsnce.c . That function is currently not
implemented in the OS/2 NSPR. I will open a separate bug for that.
Ultimately though, I think the SSL session cache layer could deal with things a
little bit differently and allocate regular memory rather than shared memory if
multi-process mode was not required. Since we have different APIs to setup the
multi-process SID cache and single-process one, this is feasible. Right now the
MP function just calls the UP function and shared memory is always used, which
causes this failure. I believe this problem is the major snag to running SSL
servers on OS/2 right now. If this memory mapped file allocation can be replaced
with a simple malloc, I will try it.
Assignee | ||
Updated•23 years ago
|
Priority: -- → P3
Target Milestone: --- → 3.4.1
Assignee | ||
Comment 1•23 years ago
|
||
I replaced the PR_OpenAnonFileMap with a PR_Malloc. The next problem was that
PR_MemMap was being called. That one isn't implemented on OS/2 either - and
cannot be, since the OS/2 kernel doesn't have memory-mapped file support.
Again this mapping isn't necessary for a single-process server. We should not be
calling mmap when running a single-process SSL server.
After I removed that mmap call, the SSL server came up on OS/2, and even
appeared to run fine !
Comment 2•23 years ago
|
||
Julien,
Yes, in single-process mode, we should use PR_Malloc (or PORT_Alloc)
to allocate the server session ID cache and use PRLocks to protect
them. I believe you did the latter as your first NSS assignment.
I've wanted to have the former done but have not got around to
opening a bug. Thanks.
Comment 3•23 years ago
|
||
Changed the QA contact to Bishakha.
QA Contact: sonja.mirtitsch → bishakhabanerjee
Assignee | ||
Updated•23 years ago
|
Target Milestone: 3.5 → 3.6
Comment 5•23 years ago
|
||
Is this really an Os/2 specific issue now?
Comment 6•23 years ago
|
||
Yes, the bug is OS/2 specific. It works on other platforms.
However, it is possible that the fix will change the code used on other
platforms also.
Assignee | ||
Comment 7•23 years ago
|
||
Well, there may be other platforms on which the NSPR functions needed here
aren't implemented, since they aren't used in the client. But on Win32, Mac OS X
and all Unix platforms, these functions are implemented, so this works on the
majority of platforms. This bug prevents running SSL servers on OS/2 or any
other platform that's missing these NSPR functions.
Comment 8•23 years ago
|
||
Assigned the bug to Julien.
Assignee: wtc → jpierre
Target Milestone: 3.6 → Future
Assignee | ||
Comment 9•23 years ago
|
||
Assignee | ||
Comment 10•23 years ago
|
||
Wan-Teh or Nelson,
Could you please review this patch ? Thanks.
Target Milestone: Future → 3.8
Assignee | ||
Comment 11•23 years ago
|
||
a) always zero the cache, regardless of whether shared memory is used or not
b) be more consistent with cacheMemMap and sharedMem variables between the
shared-memory and non-shared-memory cases
Attachment #106866 -
Attachment is obsolete: true
Assignee | ||
Comment 12•23 years ago
|
||
- correctly catch all allocation errors
- replace PR_Malloc / PR_Free with PORT_Alloc / PORT_Free which are used
throughout NSS
Assignee | ||
Updated•23 years ago
|
Attachment #112251 -
Attachment is obsolete: true
Assignee | ||
Comment 13•23 years ago
|
||
remove unnecessary if sharedMem test
As checked in to the tip.
Checking in sslsnce.c;
/cvsroot/mozilla/security/nss/lib/ssl/sslsnce.c,v <-- sslsnce.c
new revision: 1.23; previous revision: 1.22
done
Attachment #112252 -
Attachment is obsolete: true
Assignee | ||
Comment 14•23 years ago
|
||
Fixed.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•