-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Description
Using Visual Studio internal preview to debug a DBG flavor of the runtime, causes the following assert to fire.
Assert failure(PID 28244 [0x00006e54], Thread: 11360 [0x2c60]): pProcess->ThreadHoldsProcessLock()
MSCORDBI! InternalDacCallbackHolder::InternalDacCallbackHolder + 0x38 (0x00007ffc`df154698)
MSCORDBI! CordbProcess::LookupMetaData + 0x49 (0x00007ffc`df17cc59)
MSCORDACCORE! DacDbiInterfaceImpl::GetMDImport + 0x186 (0x00007ffc`db15c1a6)
MSCORDACCORE! ClrDataAccess::GetMDImport + 0x4E (0x00007ffc`db17c4ae)
MSCORDACCORE! DacGetMDImport + 0x42 (0x00007ffc`db179e32)
MSCORDACCORE! PEAssembly::GetMDImport + 0x1E (0x00007ffc`db137bbe)
MSCORDACCORE! Module::GetMDImport + 0x5F (0x00007ffc`db137b8f)
MSCORDACCORE! MethodDesc::GetMDImport + 0x31 (0x00007ffc`db1e4681)
MSCORDACCORE! MethodDesc::GetAttrs + 0xA5 (0x00007ffc`db36c225)
MSCORDACCORE! MethodDesc::IsVirtual + 0x1C (0x00007ffc`db36edfc)
File: E:\runtime\src\coreclr\debug\di\rspriv.h:11468
Image: C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\devenv.exe
The scenario is as follows:
- Set the following in a file to pass to
corerun.exevia the-eflag OR set them for the debuggee process in some other way.DOTNET_TieredCompilation=0 DOTNET_ReadyToRun=0 - Use
corerun.exeto run a simple helloworld console application. - Set breakpoint within
System.Private.CoreLib, whenMainwill be on the stack. - Using the stack window, navigate to the
Mainframe. - Using the locals window, look at a local
Delegateinstance.
Stack from within WinDBG
[0x2] mscordbi!DbgAssertDialog+0x31f 0x9516b7de40 0x7ffcdf154698
[0x3] mscordbi!InternalDacCallbackHolder::InternalDacCallbackHolder+0x38 0x9516b7e050 0x7ffcdf17cc59
[0x4] mscordbi!CordbProcess::LookupMetaData+0x49 0x9516b7e080 0x7ffcdb15c1a6
[0x5] mscordaccore!DacDbiInterfaceImpl::GetMDImport+0x186 0x9516b7e3f0 0x7ffcdb17c4ae
[0x6] mscordaccore!ClrDataAccess::GetMDImport+0x4e 0x9516b7e5f0 0x7ffcdb179e32
[0x7] mscordaccore!DacGetMDImport+0x42 0x9516b7e640 0x7ffcdb137bbe
[0x8] mscordaccore!PEAssembly::GetMDImport+0x1e 0x9516b7e670 0x7ffcdb137b8f
[0x9] mscordaccore!Module::GetMDImport+0x5f 0x9516b7e6a0 0x7ffcdb1e4681
[0xa] mscordaccore!MethodDesc::GetMDImport+0x31 0x9516b7e6d0 0x7ffcdb36c225
[0xb] mscordaccore!MethodDesc::GetAttrs+0xa5 0x9516b7e710 0x7ffcdb36edfc
[0xc] mscordaccore!MethodDesc::IsVirtual+0x1c 0x9516b7e780 0x7ffcdb36e38d
[0xd] mscordaccore!MethodDesc::IsDefaultInterfaceMethod+0x4d 0x9516b7e7b0 0x7ffcdb36cf60
[0xe] mscordaccore!MethodDesc::GetNativeCode+0x30 0x9516b7e7f0 0x7ffcdb15d1bf
[0xf] mscordaccore!DacDbiInterfaceImpl::GetMethodRegionInfo+0x7f 0x9516b7e840 0x7ffcdb15dd3e
[0x10] mscordaccore!DacDbiInterfaceImpl::GetNativeCodeInfo+0x12e 0x9516b7e910 0x7ffcdf251c17
[0x11] mscordbi!CordbObjectValue::GetFunctionHelper+0x217 0x9516b7e9b0 0x7ffcdf251959
[0x12] mscordbi!CordbObjectValue::GetFunction+0x799 0x9516b7eb90 0x7ffce0b1a1c3
...