I have an application that currently (under SunOs 4.x) implements a
multi-threaded RPC server. This is based on the ideas in the Nutshell
book (Power Programming with RPC's if my memory is correct) and works
reliably using the LWP libraries available with SunOS 4.x.
I now come to wish to port this to a Solaris 2.3 environment. Quite
clearly all of the Sun documentation indicates that the server code is not
MT-safe, and indeed (well you've got to touch the paint to see if it really
IS wet!) I get weird and wonderful results if I try a very literal
translation of the LWP version.
Whilst the basic calling mechanism does not break, the return mechanism
seems to sometimes return garbage and generally fall apart quite
dramatically, even with a single RPC operation in progress at any one time.
The design does run a thread per RPC operation, so the single RPC operation
situation does create a thread for the operation, whilst the main thread
returns to listening for requests. Needless to say, everything is fine
if the server is kept truely single threaded.
Does anyone have any ideas where the MT-unsafeness lies in the RPC server
code, or know of likely sources of information on this subject?
Many thanks for your anticipated help...
--------------------------------------------------------
Voice: +44 121 707 9163