My Oracle Support Banner

Coherence .Net Client 3.7.1.3 Crashes When Timeout Occurs - Is it OK to have different versions of .Net Coherence Clients & Servers (Doc ID 1517259.1)

Last updated on OCTOBER 20, 2023

Applies to:

Oracle Coherence - Version 3.7.1.3 and later
Information in this document applies to any platform.
Problem is With .Net Coherence Client related.
.Net Application using Coherence .Net Client 3.7.1.3.

Goal

Coherence .Net Client 3.7.1.3 crashes when timeout occurs

Client throws following Exception when there's a request timeout:

System.ArgumentOutOfRangeException: Non-negative number required.
Parameter name: millisecondsTimeout
  at Tangosol.Net.Messaging.Impl.Request.RequestStatus.WaitForResponse(Int64 millis) in c:\Coh\workspace\Coh-NET-3.7.1\dev\release.net\coherence-net-v3.7.1\src\Coherence\Net\Messaging\Impl\Request.cs:line 595

System.Threading.ThreadInterruptedException : Thread was interrupted from a waiting state.
at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)

During research, it is found that the root cause is a Bug in Coherence code in Tangosol.Net.Messaging.Impl.Request.RequestStatus.WaitForResponse(Int64 millis)
there's a missing break statement after the RequestTimeoutException is created (it never gets thrown)

   while (!this.IsClosed)
   {
       if (start < (long)0)
       {
           DateTime utcNow = DateTime.UtcNow;
           start = utcNow.Ticks / (long)10000;
       }
       try
       {
           Monitor.Wait(this, (int)remain);
       }
       catch (Exception exception1)
       {
           Exception caught = exception1;
           e = caught;
           break;
       }
       if (this.IsClosed)
       {
           break;
       }
       DateTime dateTime = DateTime.UtcNow;
       long num = remain - Math.Max(dateTime.Ticks / (long)10000 - start, (long)0);
       remain = num;
       if (num > (long)0)
       {
           continue;
       }
       e = new RequestTimeoutException(string.Concat("request timed out after ", millis, " millis"));
   }

Due to Business Requirements, Logic updating Client/ Server Coherence versions may be postponed.  Coherence Server is running 3.7.1.3.
Can we request Oracle to provide 3.7.1.3_Patch?

Application slows down, Thread.Interrupt has devastating impact on the Client.
================

Filename = Log.txt:
See the following Error:

2012-12-18 17:37:56,632 [CurrentAppDomainHost.ExecuteNodes] ERROR MDS.NetClient.Impl.MdsDataRegionImpl [(null)] - Could not retrieve the key <CO_INDEX_WEIGHT-CSCUS91-T-@SPGCKWP> from the remote cache
System.ArgumentOutOfRangeException: Non-negative number required.
Parameter name: millisecondsTimeout
  at Tangosol.Net.Messaging.Impl.Request.RequestStatus.WaitForResponse(Int64 millis)
  at Tangosol.Net.Messaging.Impl.Channel.Request(IRequest request, Int64 millis)
  at Tangosol.Util.ConverterCollections.ConverterDictionary.get_Item(Object key)
  at MDS.NetClient.Impl.MdsCoherenceClient.BucketRegionGet(MDSKey mdsKey, String sOnBehalfUser, Boolean& bIsFromLocalCache) in C:\User\MDS_SVN\netClient\branches\NetClient_2.1.0_LoggingFeature\MDS.NetClient\Impl\MdsCoherenceClient.cs:line 512
  at MDS.NetClient.Impl.MdsDataRegionImpl.RemoteCacheGet(MdsRequestSession reqSession, String sOnBehalfUser) in C:\User\MDS_SVN\netClient\branches\NetClient_2.1.0_LoggingFeature\MDS.NetClient\Impl\MdsDataRegionImpl.cs:line 339
  at MDS.NetClient.Impl.MdsDataRegionImpl.Get(MDSKey mdsKey, String sOnBehalfUser) in C:\User\MDS_SVN\netClient\branches\NetClient_2.1.0_LoggingFeature\MDS.NetClient\Impl\MdsDataRegionImpl.cs:line 211

It originates from system assembly: Monitor.Wait(this, (int)remain);

It occurs even though, we specify “positive” timeout values:

2012-12-18 17:35:45,907 [Tangosol.Util.Logging.Logger] DEBUG Coherence [(null)] - 2012-12-18 17:35:45.807 <D5> (thread=pnl01a-5501.fir.abc.com_33300_pnl01a-5502.fir.abc.com_33300_pnl01a-5503.fir.abc.com_33300_hbl61a-5501.fir.abc.com_33300_###1_1:TcpInitiator): Started: TcpInitiator{Name=pnl01a-5501.fir.abc.com_33300_pnl01a-5502.fir.abc.com_33300_pnl01a-5503.fir.abc.com_33300_hbl61a-5501.fir.abc.com_33300_###1_1:TcpInitiator, State=(Started), Codec=Tangosol.Net.Messaging.Impl.Codec, PingInterval=0, PingTimeout=100000, RequestTimeout=100000, ConnectTimeout=100000, RemoteAddresses=[1.2.3.4:33300,2.3.4.5:33300,1.2.3.4:33300,2.3.4.5:33300], KeepAliveEnabled=True, TcpDelayEnabled=False, ReceiveBufferSize=0, SendBufferSize=0, LingerTimeout=-1}
=================




Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.