Background Thread Unhandled InvalidOperationException
Background Thread Unhandled InvalidOperationException
Hello,
At the system described in article http://www.devart.com/forums/viewtopic.php?t=19337 and using the latest LinqConnect version i got the following unhandled internal exception:
Application: Exis.eXray.AppServerService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
Stack:
at Devart.Common.DbConnectionInternal.d(System.Object)
at Devart.Common.DbConnectionPoolGroup.a(Devart.Common.DbConnectionPool)
at Devart.Common.DbConnectionPoolGroup.a(System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
It is the first time i get one of these. I will let you know about the frequency. In any case, i need this exception to be catched in your code because it crashes our entire CRM server.
At the system described in article http://www.devart.com/forums/viewtopic.php?t=19337 and using the latest LinqConnect version i got the following unhandled internal exception:
Application: Exis.eXray.AppServerService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
Stack:
at Devart.Common.DbConnectionInternal.d(System.Object)
at Devart.Common.DbConnectionPoolGroup.a(Devart.Common.DbConnectionPool)
at Devart.Common.DbConnectionPoolGroup.a(System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
It is the first time i get one of these. I will let you know about the frequency. In any case, i need this exception to be catched in your code because it crashes our entire CRM server.
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Could you please specify the following:
- whether the problem occurred in the Direct or OCI connection mode;
- an approximate connection string, especially the parameters related to pooling.
If possible, please send us a small project with which the issue can be reproduced.
Also, please tell us if the problem occurs again.
- whether the problem occurred in the Direct or OCI connection mode;
- an approximate connection string, especially the parameters related to pooling.
If possible, please send us a small project with which the issue can be reproduced.
Also, please tell us if the problem occurs again.
The problem occured in OCI mode. Pooling is enabled with min connections set to 10 and max connections set to 100. System is RAC enabled with 2 nodes. Cannot send a test project as this is a rather complex configuration on which it happens as described at the other, related article. It's been a week now and it didn't occur and it didn't occur before that. It seems to be a one-timer. I will let you know if it gets persistent.
A second exception is encountered and caused the system to crash:
Application: Exis.eXray.AppServerService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
at OciDynamicType.nativeOCIHandleFree(System.Runtime.InteropServices.HandleRef, Int32)
at OciDynamicType.OCIHandleFree(System.Runtime.InteropServices.HandleRef, Int32)
at Devart.Data.Oracle.a.b(System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart(System.Object)
It seems that this kind of errors are raised under stress.
Application: Exis.eXray.AppServerService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
at OciDynamicType.nativeOCIHandleFree(System.Runtime.InteropServices.HandleRef, Int32)
at OciDynamicType.OCIHandleFree(System.Runtime.InteropServices.HandleRef, Int32)
at Devart.Data.Oracle.a.b(System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart(System.Object)
It seems that this kind of errors are raised under stress.
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
We've done some code changes. An OracleException is now created and passed to the main thread in such situation, so that it is possible to catch and process this exception.
These changes will be available in the nearest build, which we plan to release in about a week. We will post here when this build is available.
These changes will be available in the nearest build, which we plan to release in about a week. We will post here when this build is available.
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
We have released the new 6.10.135 build of dotConnect for Oracle which includes the changes mentioned above. Please try this build and tell us if this fixes the problem with unhandled AccessViolationException.
dotConnect for Oracle 6.10.135 can be downloaded from
http://www.devart.com/dotconnect/oracle/download.html
(the trial version) or from Registered Users' Area (for users with active subscription only):
http://secure.devart.com/
For the detailed information about the fixes and improvements available in the latest build, please refer to
http://www.devart.com/forums/viewtopic.php?t=20708
dotConnect for Oracle 6.10.135 can be downloaded from
http://www.devart.com/dotconnect/oracle/download.html
(the trial version) or from Registered Users' Area (for users with active subscription only):
http://secure.devart.com/
For the detailed information about the fixes and improvements available in the latest build, please refer to
http://www.devart.com/forums/viewtopic.php?t=20708
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Using the latest 2.20.19 version of LinqConnect, i got the following unhandled exception:
Application: Exis.eXray.AppServerService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
at Devart.Data.Oracle.OracleDataReader.Close()
at Devart.Data.Linq.Provider.ObjectReader`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Dispose()
at Devart.Data.Linq.Provider.ObjectReader`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
at System.Collections.Generic.List`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1)
at System.Linq.Enumerable.ToList[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1)
at Exis.eXray.WorkflowEngine.WorkflowService.ExecuteEventAction(Exis.eXray.Domain.Event, Exis.eXray.Domain.Case, Exis.eXray.Domain.EventTypeAction)
at Exis.eXray.WorkflowEngine.WorkflowService.ExecuteOpenCloseActions(Exis.eXray.Domain.Event, Exis.eXray.Domain.Case)
At least, is there a way for these exceptions to somehow get forwarded to application's main thread so that i can catch them? For me, it is not really a problem if i can handle them. Unless of course something gets really corrupted and should get fixed.
Application: Exis.eXray.AppServerService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
at Devart.Data.Oracle.OracleDataReader.Close()
at Devart.Data.Linq.Provider.ObjectReader`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Dispose()
at Devart.Data.Linq.Provider.ObjectReader`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
at System.Collections.Generic.List`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1)
at System.Linq.Enumerable.ToList[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1)
at Exis.eXray.WorkflowEngine.WorkflowService.ExecuteEventAction(Exis.eXray.Domain.Event, Exis.eXray.Domain.Case, Exis.eXray.Domain.EventTypeAction)
at Exis.eXray.WorkflowEngine.WorkflowService.ExecuteOpenCloseActions(Exis.eXray.Domain.Event, Exis.eXray.Domain.Case)
At least, is there a way for these exceptions to somehow get forwarded to application's main thread so that i can catch them? For me, it is not really a problem if i can handle them. Unless of course something gets really corrupted and should get fixed.
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
A single ToList() compiled query is performed:
List parameterMappings = ParameterMapping.WorkflowService_ExecuteEventAction(dataContext, eventTypeAction.Id).ToList();
public static Func>
WorkflowService_ExecuteEventAction =
CompiledQuery.Compile(
(ExrayDataContext dataContext, long EventTypeActionId) =>
from parameterMapping in dataContext.ParameterMappings
from functionParameter in dataContext.FunctionParameters
where parameterMapping.FpId == functionParameter.Id
&& parameterMapping.EtaId == EventTypeActionId
orderby functionParameter.Type_Str
orderby functionParameter.Sort
select parameterMapping);
It is 100% SURE, that a possible exception bubbles up and handled by my application. This code is called maybe 50 times/sec and exceptions are caught and logged all the time.
List parameterMappings = ParameterMapping.WorkflowService_ExecuteEventAction(dataContext, eventTypeAction.Id).ToList();
public static Func>
WorkflowService_ExecuteEventAction =
CompiledQuery.Compile(
(ExrayDataContext dataContext, long EventTypeActionId) =>
from parameterMapping in dataContext.ParameterMappings
from functionParameter in dataContext.FunctionParameters
where parameterMapping.FpId == functionParameter.Id
&& parameterMapping.EtaId == EventTypeActionId
orderby functionParameter.Type_Str
orderby functionParameter.Sort
select parameterMapping);
It is 100% SURE, that a possible exception bubbles up and handled by my application. This code is called maybe 50 times/sec and exceptions are caught and logged all the time.