microsoft / microsoft/CLRInstrumentationEngine
RawProfilerHook bug with AppDynamics on CMethodInfo::GetClassId
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 102
- Forks
- 52
- Avg merge
- 13h 11m
- Merged PRs (30d)
- 6
Description
AppDynamics profiler causes a crash in the CLRIE dll as shown below

I've used whatever AppDynamics version is current at this time.
Same scenario as before - IIS on windows server.
MicrosoftInstrumentationEngine_RawProfilerHookPath_64=C:\Program Files\AppDynamics\AppDynamics .NET Agent\AppDynamics.Profiler_x64.dll
MicrosoftInstrumentationEngine_RawProfilerHook=AppDynamics.AgentProfiler
-------------- partial attach time info and a stack trace below ---------------
ModLoad: 000007fe`4fb60000 000007fe`4fc54000 C:\Windows\SYSTEM32\ucrtbase.DLL
ModLoad: 000007fe`4b290000 000007fe`4b5a0000 C:\Program Files\AppDynamics\AppDynamics .NET Agent\AppDynamics.Profiler_x64.dll
ModLoad: 000007fe`71360000 000007fe`72641000 C:\Windows\system32\SHELL32.dll
AppDynamics Agent Profiler Diagnostics Constructor0x000000F294E95160C:\Program Files\AppDynamics\AppDynamics .NET Agent\AppDynamicsAgentLog.configAppDynamics Agent Profiler Diagnostics Constructor0x000000F294E95160C:\Program Files\AppDynamics\AppDynamics .NET Agent\AppDynamicsAgentLog.config(f58.7d4): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
AppDynamics_Profiler_x64+0x3887a:
000007fe`4b2c887a ff5008 call qword ptr [rax+8] ds:006e0075`00530042=????????????????
0:024> g
ModLoad: 000000f6`e04e0000 000000f6`e0a0c000 mscorlib.dll
ModLoad: 000000f6`e0a10000 000000f6`e0f3c000 mscorlib.dll
ModLoad: 000007fe`6aff0000 000007fe`6aff3000 C:\Windows\SYSTEM32\api-ms-win-core-xstate-l2-1-0.dll
ModLoad: 000007fe`6a130000 000007fe`6a25b000 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll
**CMethodInfo::GetClassId - Class id is not available during a rejit.**
(f58.143c): Break instruction exception - code 80000003 (first chance)
*** WARNING: Unable to verify checksum for C:\Program Files\Microsoft CLR Instrumentation Engine\1.0.28\Instrumentation64\MicrosoftInstrumentationEngine_x64.dll
MicrosoftInstrumentationEngine_x64!MicrosoftInstrumentationEngine::CLoggerService::LogError+0x19b:
000007fe`4b73805b cc int 3
*** WARNING: Unable to verify checksum for C:\Program Files\<DELETED>\<literal was DELETED by bug reporter>_x64.dll
0:007> kpL
# Child-SP RetAddr Call Site
00 000000f2`94157ed0 000007fe`4b7273e8 MicrosoftInstrumentationEngine_x64!MicrosoftInstrumentationEngine::CLoggerService::LogError+0x19b
01 000000f2`94159f90 000007fe`4b727226 MicrosoftInstrumentationEngine_x64!MicrosoftInstrumentationEngine::CLogging::VLogError+0x68
02 000000f2`94159fc0 000007fe`4b69693f MicrosoftInstrumentationEngine_x64!MicrosoftInstrumentationEngine::CLogging::LogError+0x86
03 000000f2`9415a030 000007fe`4e25c6b2 MicrosoftInstrumentationEngine_x64!MicrosoftInstrumentationEngine::CMethodInfo::GetClassId+0x7f
04 000000f2`9415a070 000007fe`4b6ea813 <literal was DELETED by bug reporter>_x64+0xc6b2
05 000000f2`9415a320 000007fe`4b6e3574 MicrosoftInstrumentationEngine_x64!MicrosoftInstrumentationEngine::CProfilerManager::CallShouldInstrumentOnInstrumentationMethods+0x163
06 000000f2`9415a400 000007fe`6a87d091 MicrosoftInstrumentationEngine_x64!MicrosoftInstrumentationEngine::CProfilerManager::JITCompilationStarted+0x3f4
07 000000f2`9415a610 000007fe`6a71e7ab clr!EEToProfInterfaceImpl::JITCompilationStarted+0x85
08 000000f2`9415a660 000007fe`6a3cf3df clr!MethodDesc::MakeJitWorker+0x34a4db
09 000000f2`9415a890 000007fe`6a3cea7b clr!MethodDesc::DoPrestub+0x94c
0a 000000f2`9415aa80 000007fe`6a3c4895 clr!PreStubWorker+0x3cc
0b 000000f2`9415add0 000007fe`0ae8a308 clr!ThePreStub+0x55
0c 000000f2`9415ae80 000007fe`0ae8a211 0x000007fe`0ae8a308
0d 000000f2`9415aec0 000007fe`0ae8a17b 0x000007fe`0ae8a211
0e 000000f2`9415af00 000007fe`6a3c6a93 0x000007fe`0ae8a17b
0f 000000f2`9415af40 000007fe`6a3c6948 clr!CallDescrWorkerInternal+0x83
10 000000f2`9415af80 000007fe`6a3c720d clr!CallDescrWorkerWithHandler+0x4e
11 000000f2`9415afc0 000007fe`6a4a41d9 clr!MethodDescCallSite::CallTargetWorker+0xf8
12 000000f2`9415b0c0 000007fe`6a4abc81 clr!AppDomain::InitializeDefaultDomainManager+0x16a
13 000000f2`9415b250 000007fe`6a480ab5 clr!SystemDomain::InitializeDefaultDomain+0x1f1
14 000000f2`9415b750 000007fe`6a480948 clr!SystemDomain::SetupDefaultDomain+0x14e
15 000000f2`9415b910 000007fe`6a4808ff clr!SystemDomain::SetupDefaultDomainNoThrow+0x39
16 000000f2`9415b9a0 000007fe`6a4a7ed0 clr!EEStartup+0x51
17 000000f2`9415b9f0 000007fe`6a480c0d clr!EnsureEEStarted+0xbf
18 000000f2`9415ba70 000007fe`6c22c210 clr!ClrCreateManagedInstance+0x4e
19 000000f2`9415be00 000007fe`6c2275b6 webengine4!LegacyActivationShim::ClrCreateManagedInstance+0xbd
1a 000000f2`9415be60 000007fe`4f1a1008 webengine4!GetIsapiProcessHost+0x57
1b 000000f2`9415beb0 000007fe`4f1b2cbb webengine!GetIsapiProcessHost+0xfc
1c 000000f2`9415c310 000007fe`4f1b1eaa wbhst_pm!WEBHOST_PROTOCOL_MANAGER::GetPMHFromISAPI+0x28f
1d 000000f2`9415c810 000007fe`4f1b1ba6 wbhst_pm!WEBHOST_PROTOCOL_MANAGER::InitializeInstance+0x19e
1e 000000f2`9415c850 000007fe`50b8a5c5 wbhst_pm!GetProtocolManager+0xae
1f 000000f2`9415c880 000007fe`50b8a2cb w3wphost!PROTOCOL_MANAGER_ENTRY::InitializeInstanceStep2+0x1dd
20 000000f2`9415c930 000007fe`50b86d24 w3wphost!PROTOCOL_MANAGER_LIST::GetProtocolManagerEntry+0x213
21 000000f2`9415c990 000007fe`50b422d1 w3wphost!W3WP_HOST::LoadProtocolManagerAndGetCustomInterface+0x44
22 000000f2`9415c9d0 000007fe`6c2277a7 iiscore!W3_SERVER::GetProtocolManagerCustomInterface+0x5d
23 000000f2`9415ca10 000007fe`6c22769d webengine4!InitClrHost+0x203
24 000000f2`9415cb50 000007fe`6c224292 webengine4!EnsureProcessHostCreated+0x35
25 000000f2`9415cba0 000007fe`50b2118e webengine4!CMgdEngGlobalModule::OnGlobalApplicationResolveModules+0x12
26 000000f2`9415cbd0 000007fe`50b518ab iiscore!W3_SERVER::GlobalNotify+0x8e
27 000000f2`9415cc10 000007fe`50b5c0d8 iiscore!W3_APPLICATION::ResolveModules+0x2b
28 000000f2`9415cc40 000007fe`50b2509f iiscore!_chkstk+0x7098
29 000000f2`9415ccb0 000007fe`50b2616c iiscore!W3_CONTEXT::SetupStateMachinePhase2+0x373
2a 000000f2`9415cdd0 000007fe`50b2a2e1 iiscore!W3_CONTEXT::SetupStateMachine+0x841
2b 000000f2`9415faf0 000007fe`50ab1428 iiscore!W3_MAIN_CONTEXT::OnNewRequest+0x221
2c 000000f2`9415fb30 000007fe`67f31882 w3dt!WP_CONTEXT::OnCompletion+0xb2
2d 000000f2`9415fb70 000007fe`67f322bd W3TP!THREAD_POOL_DATA::ThreadPoolThread+0x92
2e 000000f2`9415fbd0 000007fe`703c1652 W3TP!THREAD_MANAGER::ThreadManagerThread+0x3d
2f 000000f2`9415fc00 000007fe`728be2f9 KERNEL32!BaseThreadInitThunk+0x1a
30 000000f2`9415fc30 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
--------- end of report -----------
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with CMethodInfo::GetClassId and the CProfilerManager::CallShouldInstrumentOnInstrumentationMethods stack frames in the report. Reproduce the IIS startup scenario using the stated RawProfilerHook settings and AppDynamics profiler, then determine why the crash occurs during the rejit-related class ID lookup and document a verified fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100