User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20041214 Build Identifier: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20041214 We use NSPR 4.1.4 library in one of our products. We use PR_NewTCPSocketPair() for synchronisation, and our product is supported on solaris and windows. We don't have any pbs on solaris, but on windows, the call to PR_NewTCPSocketPair() often fails with error code : -5982 : PR_ADDRESS_IN_USE_ERROR We reproduced the pb on windows 2003. The consequence of that NSPR function failure is that : -> our synchronisations are broken in the application -> consequence : several functionnalities are bricken each time PR_NewTCPSocketPair() fails. Reproducible: Always Steps to Reproduce: 1. Our application calls PR_NewTCPSocketPair() to initialize sockets synchronisation each time it is needed 2. Many times PR_NewTCPSocketPair() fails -> both sockets are not initialized, not connected 3. One thread write on the "write socket", to wake up another thread that is waiting on a PR_Poll() containing the "read socket" in its set of polls. 4. Since sockets are badly initialised, the synchronisation does not work Creating a little sample C program doing loops on - call PR_NewTCPSocketPair() - check the return code of PR_NewTCPSocketPair() call : do we have an error ? - free the 2 sockets should reproduce the pb, on windows. Actual Results: Pbs of synchronisation between threads in our application Expected Results: Synchronisation should work correctly in our application
Marilyn, NSPR 4.1.4 is extremely old, about 5 years. The current version is 4.6.7. Please try your code again with the current version. If it still fails, please attach the source of a test program to reproduce your problem.