Closed Bug 126930 Opened 23 years ago Closed 23 years ago

SSL_ConfigServerSessionIDCache does not work on OS/2

Categories

(NSS :: Libraries, defect, P3)

x86
OS/2
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

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

References

Details

Attachments

(1 file, 3 obsolete files)

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.
Priority: -- → P3
Target Milestone: --- → 3.4.1
Blocks: 126923
Depends on: 126931
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 !
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.
Changed the QA contact to Bishakha.
QA Contact: sonja.mirtitsch → bishakhabanerjee
Set target milestone to NSS 3.5.
Target Milestone: 3.4.1 → 3.5
Target Milestone: 3.5 → 3.6
Is this really an Os/2 specific issue now?
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.
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.
Assigned the bug to Julien.
Assignee: wtc → jpierre
Target Milestone: 3.6 → Future
Wan-Teh or Nelson, Could you please review this patch ? Thanks.
Target Milestone: Future → 3.8
Attached patch new patch (obsolete) — Splinter Review
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
Attached patch latest patch (obsolete) — Splinter Review
- correctly catch all allocation errors - replace PR_Malloc / PR_Free with PORT_Alloc / PORT_Free which are used throughout NSS
Attachment #112251 - Attachment is obsolete: true
Attached patch last patchSplinter Review
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
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.

Attachment

General

Creator:
Created:
Updated:
Size: