Closed Bug 355183 Opened 18 years ago Closed 5 months ago

selfserv cannot complete a connection in multi-process mode in OS_TARGET=WINNT build

Categories

(NSS :: Tools, defect)

3.11
x86
Windows 2000
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: julien.pierre, Unassigned)

References

(Depends on 1 open bug)

Details

When building OS_TARGET=WINNT and running selfserv with the -M 2 argument, it is not possible to complete an SSL connection. The client waits for the server forever.

If I comment out the PR_SetSocketOption call that sets the PR_SockOpt_Linger option to 1 second in selfserv.c, then the server works fine .

I have been unable to debug deeply into the server failure because the connection always works fine inside the debugger even with linger.
It looks like the problem is also due to a PR_Close failure. I asserted that PR_Close returned PR_SUCCESS and hit the assertion. I'm adding bug 332348 as a dependency. It is likely the same bug. I'm not sure why it is being hit only when selfserv is in multi-process mode on NT, and not single-process.

Depends on: 332348
I tried adding a PR_SetSocketOption call in selfserv to change the socket to a blocking socket just before the PR_Close  call. Unfortunately, PR_Close still failed with error -5998 / PR_WOULD_BLOCK_ERROR . The OS error was 10035, EWOULDBLOCK .
The result reported in comment 2 doesn't surprise me. 

PR_SetSocketOption changes the semantics that NSPR presents to its callers,
not the setting of the underlying OS sockets.
The OS socket underlying NSPR is still non-blocking. 

The solution to this necessitates setting the underlying OS Socket to 
blocking mode.
Severity: normal → S3
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.