I have an issue where the cpu in the client machine is maxing out (100%).
We have a windows service which manages a pool of oracle connections. When a client (WCF) connects to the service and send a request, appropriate connection is picked from the pool and the request is executed on that connection. The application is multi-threaded. The WCF service is working with concurrency mode set to Multiple.
This works well and then goes to 100% CPU after a random amount of time, some time hours, some other times it takes days. Using windows debugger and locating the threads which as using most CPU and tracking the stack traces of the threads always shows that the threads are waiting on a socket for data when the CPU usage is 100%.
OS Thread Id: 0x1830 (7)
Child SP IP Call Site
04b0e778 77d7f8b1 [InlinedCallFrame: 04b0e778]
04b0e774 712df36b DomainBoundILStubClass.IL_STUB_PInvoke(IntPtr, Byte*, Int32, System.Net.Sockets.SocketFlags)
04b0e778 712b985d [InlinedCallFrame: 04b0e778] System.Net.UnsafeNclNativeMethods+OSSOCK.recv(IntPtr, Byte*, Int32, System.Net.Sockets.SocketFlags)
04b0e7b0 712b985d System.Net.Sockets.Socket.Receive(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags, System.Net.Sockets.SocketError ByRef)
04b0e7e0 712b978d System.Net.Sockets.Socket.Receive(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)
04b0e800 02de4656 OracleInternal.Network.ReaderStream.ReadIt(OracleInternal.Network.OraBuf, Int32)
04b0e830 02de45ea OracleInternal.Network.ReaderStream.WaitForReset()
04b0e840 02de3ca5 OracleInternal.Network.OracleCommunication.Reset()
04b0e858 034628ea OracleInternal.TTC.TTCExecuteSql.ReceiveExecuteResponse(OracleInternal.TTC.Accessors.Accessor[] ByRef, OracleInternal.TTC.Accessors.Accessor[], Boolean, OracleInternal.Common.SQLMetaData ByRef, OracleInternal.Common.SqlStatementType, Int64, Int32, Int32 ByRef, Int64 ByRef, Int32, Int32, Int64[], Boolean ByRef, OracleInternal.ServiceObjects.DataUnmarshaller ByRef, MarshalBindParameterValueHelper ByRef, Boolean, Boolean ByRef)
04b0e9dc 032ed44b OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteNonQuery(System.String, Oracle.ManagedDataAccess.Client.OracleParameterCollection, System.Data.CommandType, OracleInternal.ServiceObjects.OracleConnectionImpl, Int32, Int32, OracleInternal.ServiceObjects.OracleDependencyImpl, Int64[] ByRef, Oracle.ManagedDataAccess.Client.OracleParameterCollection ByRef, Boolean ByRef, Boolean)
04b0ee20 032ebba2 Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteNonQuery()
04b0ee60 034672bf TAKE.GemRadr.ConnectionPoolManager.OracleConnectionManager.ExecuteStoredProcedureNonQuery(System.Data.IDbConnection, System.String, System.Collections.Generic.List`1<System.Data.IDbDataParameter>, System.Data.IDbTransaction, Int32)
04b0eeec 03466d03 TAKE.GemRadr.ConnectionPoolManager.OracleConnectionManager.ExecuteStoredProcedureNonQuery(System.String, System.String, System.Collections.Generic.List`1<System.Data.IDbDataParameter>, Int32)
Regards,
Vijay