Support Advisory 49138: Instrumenting an async method results in System.Runtime.InteropServices.SEHException
This document describes the support advisory for an AppDynamics product.
Summary
Affected Software
Product | Component | Version |
---|---|---|
AppDynamics .NET APM | .NET Agent | 4.1 versions below 4.1.3 |
Impact
Application Exception : Instrumentation of a method described in the Summary will result in an SEHException.
Examples
// An async method called inside of a generic class will trigger the exception.
class GenericClass<T>
{
async Task AsyncMethod()
{
//Do work...
}
}
// An async method called inside of a generic method will also trigger the exception.
class MyClass
{
public async void MyMethod<T>(T input)
{
await AsyncMethod();
}
}
Workaround
- Customers running version 4.1.0 – 4.1.2 versions of the agent are advised to upgrade to 4.1.3 or later, or
- Edit the .NET Agent Configuration file to disable the AsyncStateMachineInstrumentor, as described in the following steps.
- Open the following file, depending on your version of Windows:
- Windows Server 2008 and later:
%ProgramData%\AppDynamics\DotNetAgent\Config\config.xml
- Windows Server 2003:
%AllUsersProfile%\Application Data\AppDynamics\DotNetAgent\Config\config.xml
- Windows Server 2008 and later:
-
Replace or update the <machine-agent> node to include:
<machine-agent> <instrumentation> <instrumentor name="AsyncStateMachineInstrumentor" enabled="false" /> </instrumentation> </machine-agent>
- Restart the AppDynamics.Agent.Coordinator service and then all instrumented processes.