qianqian888 / csharptest-net

Automatically exported from code.google.com/p/csharptest-net
0 stars 0 forks source link

Conccurent issues when doing first call when many clients servers #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Struggling some issue related to concurrent creation and shutdowns of 
client/servers.

 got SEHException  from here during start of our system, trying to make tests which are simila (our system is 2 processes with several clients and servers in each)
                 try
                    {
                        result = NdrClientCall2x64(pStub.Handle, RpcApi.FUNC_FORMAT_PTR.Handle, handle.Handle,
                                                   input.Length,
                                                   pInputBuffer.Handle, out szResponse, out response);
                    }
                    catch (SEHException ex)
                    {
                        Log.Error(ex);
                        RpcException.Assert(ex.ErrorCode);
                        throw;

Original issue reported on code.google.com by asd.and....@gmail.com on 26 Feb 2013 at 4:46

GoogleCodeExporter commented 8 years ago
This was due to GC collected RpcServerApi under memory pressure. Stored it in 
static dictionary.

Original comment by asd.and....@gmail.com on 11 Mar 2013 at 9:56

GoogleCodeExporter commented 8 years ago
Generally the RpcServerApi should been kept in a using(x) statement, or be used 
from a class that has a scope.  Without this the StopListening call will not 
decrement the usage counter, nor will the unmanaged structures be released.

SEHException is fixed in the coming release and should now produce an accurate 
error message.

Original comment by Grig...@gmail.com on 26 Jan 2014 at 6:21