we have been encountering regular ConnectionPool deadlocks under heavy load.
Inspecting application dumps showed:
- Most threads trying to execute a query are waiting in a lock in DbConnectionPool.GetObject
- One thread is waiting in a lock in DbConnectionPoolGroup.a (see full callstack below)
- Another thread is waiting in a lock in DbConnectionPool.a (see other full callstack below)
We have the issue occurring in two different versions of our application. One is using dotConnect for Oracle 8.4.333, the other uses version 8.5.506.6.
This looks a lot like a concurrency issue in connection management to me.
Best Regards,
Ronald
Callstack DbConnectionPoolGroup.a:
Code: Select all
ntdll.dll!NtWaitForMultipleObjects()
KERNELBASE.dll!WaitForMultipleObjectsEx()
[Managed to Native Transition]
Devart.Data.Oracle.dll!Devart.Common.DbConnectionPoolGroup.a(Devart.Common.DbConnectionPool A_0)
Devart.Data.Oracle.dll!Devart.Common.DbConnectionPoolGroup.a(object A_0)
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)
mscorlib.dll!System.Threading.TimerQueueTimer.CallCallback()
mscorlib.dll!System.Threading.TimerQueueTimer.Fire()
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch()
Code: Select all
ntdll.dll!NtWaitForMultipleObjects()
KERNELBASE.dll!WaitForMultipleObjectsEx()
[Managed to Native Transition]
Devart.Data.Oracle.dll!Devart.Common.DbConnectionPool.a(Devart.Common.DbConnectionBase A_0)
Devart.Data.Oracle.dll!Devart.Common.DbConnectionPool.GetObject(Devart.Common.DbConnectionBase owningConnection)
Devart.Data.Oracle.dll!Devart.Common.DbConnectionFactory.b(Devart.Common.DbConnectionBase A_0)
Devart.Data.Oracle.dll!Devart.Common.DbConnectionClosed.Open(Devart.Common.DbConnectionBase outerConnection)
Devart.Data.Oracle.dll!Devart.Common.DbConnectionBase.Open()
Devart.Data.Oracle.dll!Devart.Data.Oracle.OracleConnection.Open()
EntityFramework.dll!System.Data.Entity.Infrastructure.Interception.InternalDispatcher<System.Data.Entity.Infrastructure.Interception.IDbConnectionInterceptor>.Dispatch<System.Data.Common.DbConnection, System.Data.Entity.Infrastructure.Interception.DbConnectionInterceptionContext>(System.Data.Common.DbConnection target, System.Action<System.Data.Common.DbConnection, System.Data.Entity.Infrastructure.Interception.DbConnectionInterceptionContext> operation, System.Data.Entity.Infrastructure.Interception.DbConnectionInterceptionContext interceptionContext, System.Action<System.Data.Entity.Infrastructure.Interception.IDbConnectionInterceptor, System.Data.Common.DbConnection, System.Data.Entity.Infrastructure.Interception.DbConnectionInterceptionContext> executing, System.Action<System.Data.Entity.Infrastructure.Interception.IDbConnectionInterceptor, System.Data.Common.DbConnection, System.Data.Entity.Infrastructure.Interception.DbConnectionInterceptionContext> executed)
EntityFramework.dll!System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(System.Data.Common.DbConnection connection, System.Data.Entity.Infrastructure.Interception.DbInterceptionContext interceptionContext)
EntityFramework.dll!System.Data.Entity.Core.EntityClient.EntityConnection.Open()
EntityFramework.dll!System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(bool shouldMonitorTransactions)
EntityFramework.dll!System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction<System.__Canon>(System.Func<System.__Canon> func, System.Data.Entity.Infrastructure.IDbExecutionStrategy executionStrategy, bool startLocalTransaction, bool releaseConnectionOnSuccess)