Skip to content

CrossApartmentQueryInterface_NoDeadlock test crash on 9.0 #129421

Description

@svick

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1460993
Build error leg or test failing: Interop/COM/ComWrappers/API/ComWrappersTests/ComWrappersTests.cmd
Pull request: #128216

Error Message

DO NOT USE JSON BELOW IF THIS IS A BUILD BREAK otherwise build analysis will allow pull requests to merge that break the build worse. For a build break, do not use this issue form. Make a regular new issue.

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": ["Unhandled exception. System.Runtime.InteropServices.COMException (0x8000000E): A method was called at an unexpected time.", "CrossApartmentQueryInterface_NoDeadlock"],
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

This looks quite similar to #111264 and #112305, though it seems the fix for #112305 was not backported.

cc: @jkoritzinsky

Log:

10:51:48.421 Running test: Interop/COM/ComWrappers/API/ComWrappersTests/ComWrappersTests.cmd
Unhandled exception. System.Runtime.InteropServices.COMException (0x8000000E): A method was called at an unexpected time.

   at ComWrappersTests.Program.<>c__DisplayClass28_0.<CrossApartmentQueryInterface_NoDeadlock>b__1()

Return code:      1
Raw output file:      C:\h\w\A802090B\w\9B24089A\uploads\COM\ComWrappers\API\ComWrappersTests\output.txt
Raw output:
BEGIN EXECUTION
 "C:\h\w\A802090B\p\corerun.exe" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false" -p "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true"  ComWrappersTests.dll 
Running ValidateComInterfaceCreation...
Running ValidateComInterfaceCreationRoundTrip...
Running ValidateComInterfaceUnwrapWrapperSpecific...
Running ValidateComObjectExtendsManagedLifetime...
Running ValidateCreatingAComInterfaceForObjectAfterTheFirstIsFree...
Running ValidateResurrection...
Running ValidateFallbackQueryInterface...
Running ValidateCreateObjectCachingScenario...
Running ValidateCreateObjectWeakHandleCacheCleanUp...
Running ValidateMappingAPIs...
Running ValidateWrappersInstanceIsolation...
Running ValidatePrecreatedExternalWrapper...
Running ValidateExternalWrapperCacheCleanUp...
Running ValidateSuppliedInnerNotAggregation...
Running ValidateIUnknownImpls...
Running ValidateBadComWrapperImpl...
Running ValidateRuntimeTrackerScenario...
Running ValidateQueryInterfaceAfterManagedObjectCollected...
Running ValidateAggregationWithComObject...
Running ValidateAggregationWithReferenceTrackerObject...
Running ComWrappersNoLockAroundQueryInterface...
Attempting to create a new COM object on a different thread.
Running CrossApartmentQueryInterface_NoDeadlock...
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Attempting to create a new COM object on the same thread.
Expected: 100
Actual: -532462766
END EXECUTION - FAILED
FAILED
Dump
Test failed. Trying to see if dump file was created in C:\cores since 6/12/2026 10:51:48 AM
Processing C:\cores\corerun.exe.1660.dmp
Invoking: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe -c "$<C:\h\w\A802090B\t\tmp1vnn5u.tmp" -z "C:\cores\corerun.exe.1660.dmp"
stdout: 
Microsoft (R) Windows Debugger Version 10.0.18362.1 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [C:\cores\corerun.exe.1660.dmp]
User Mini Dump File with Full Memory: Only application data is available


************* Path validation summary **************
Response                         Time (ms)     Location
OK                                             C:\h\w\A802090B\p\PDB
Symbol search path is: C:\h\w\A802090B\p\PDB
Executable search path is: 
Windows 10 Version 14393 MP (4 procs) Free x64
Product: Server, suite: TerminalServer DataCenter SingleUserTS
10.0.14393.8781 (rs1_release.251224-1746)
Machine Name:
Debug session time: Fri Jun 12 10:51:55.000 2026 (UTC + 0:00)
System Uptime: 0 days 0:05:34.680
Process Uptime: 0 days 0:00:07.000
.........................................

************* Symbol Loading Error Summary **************
Module name            Error
ntdll                  The system cannot find the file specified

You can troubleshoot most symbol related issues by turning on symbol loading diagnostics (!sym noisy) and repeating the command that caused symbols to be loaded.
You should also verify that your symbol search path (.sympath) is correct.
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(67c.11c8): CLR exception - code e0434352 (first/second chance not available)
For analysis of this file, run !analyze -v
ntdll!NtWaitForMultipleObjects+0x14:
00007fff`5fa86f94 c3              ret
0:008> cdb: Reading initial command '$<C:\h\w\A802090B\t\tmp1vnn5u.tmp'
0:008> .load C:\Users\runner\.dotnet\sos\sos.dll
0:008> ~*k

   0  Id: 67c.2a4 Suspend: 1 Teb: 0000005a`30456000 Unfrozen
Child-SP          RetAddr           Call Site
0000005a`3077d728 00007fff`5ca34ddf ntdll!NtWaitForMultipleObjects+0x14
*** WARNING: Unable to verify checksum for coreclr.dll
0000005a`3077d730 00007fff`3b222e09 KERNELBASE!WaitForMultipleObjectsEx+0xef
0000005a`3077da30 00007fff`3b223530 coreclr!Thread::DoAppropriateAptStateWait+0x119
0000005a`3077db00 00007fff`3b22c26a coreclr!Thread::DoAppropriateWaitWorker+0x510
0000005a`3077dd70 00007fff`3b222f60 coreclr!`Thread::DoAppropriateWait'::`11'::__Body::Run+0xaa
0000005a`3077ddf0 00007fff`3b2d279c coreclr!Thread::DoAppropriateWait+0x100
*** WARNING: Unable to verify checksum for System.Private.CoreLib.dll
0000005a`3077de80 00007fff`39e05d2e coreclr!WaitHandleNative::CorWaitOneNative+0x27c
0000005a`3077e0c0 00007ffe`dbe9259d System_Private_CoreLib!System.Boolean System.Threading.WaitHandle::WaitOneNoCheck(System.Int32, System.Boolean, System.Object, System.Diagnostics.Tracing.NativeRuntimeEventSource+WaitHandleWaitSourceMap)$##6003CB5+0xde
0000005a`3077e130 0000017f`890002d0 0x00007ffe`dbe9259d
0000005a`3077e138 0000017f`89000290 0x0000017f`890002d0
0000005a`3077e140 0000017f`89000208 0x0000017f`89000290
0000005a`3077e148 00000000`00000000 0x0000017f`89000208

   1  Id: 67c.730 Suspend: 1 Teb: 0000005a`30458000 Unfrozen
Child-SP          RetAddr           Call Site
0000005a`308ff438 00007fff`5f9feebe ntdll!NtWaitForWorkViaWorkerFactory+0x14
0000005a`308ff440 00007fff`5d2c84d4 ntdll!RtlReleaseSRWLockExclusive+0x296e
0000005a`308ff840 00007fff`5fa31d71 kernel32!BaseThreadInitThunk+0x14
0000005a`308ff870 00000000`00000000 ntdll!RtlUserThreadStart+0x21

   2  Id: 67c.e40 Suspend: 1 Teb: 0000005a`3045a000 Unfrozen
Child-SP          RetAddr           Call Site
0000005a`30a7f878 00007fff`5f9feebe ntdll!NtWaitForWorkViaWorkerFactory+0x14
0000005a`30a7f880 00007fff`5d2c84d4 ntdll!RtlReleaseSRWLockExclusive+0x296e
0000005a`30a7fc80 00007fff`5fa31d71 kernel32!BaseThreadInitThunk+0x14
0000005a`30a7fcb0 00000000`00000000 ntdll!RtlUserThreadStart+0x21

   3  Id: 67c.ca4 Suspend: 1 Teb: 0000005a`3045c000 Unfrozen
Child-SP          RetAddr           Call Site
0000005a`30bff5e8 00007fff`5f9feebe ntdll!NtWaitForWorkViaWorkerFactory+0x14
0000005a`30bff5f0 00007fff`5d2c84d4 ntdll!RtlReleaseSRWLockExclusive+0x296e
0000005a`30bff9f0 00007fff`5fa31d71 kernel32!BaseThreadInitThunk+0x14
0000005a`30bffa20 00000000`00000000 ntdll!RtlUserThreadStart+0x21

   4  Id: 67c.590 Suspend: 1 Teb: 0000005a`3045e000 Unfrozen
Child-SP          RetAddr           Call Site
0000005a`30d7f398 00007fff`5ca34ddf ntdll!NtWaitForMultipleObjects+0x14
0000005a`30d7f3a0 00007fff`5ca34cde KERNELBASE!WaitForMultipleObjectsEx+0xef
0000005a`30d7f6a0 00007fff`3b7e19b9 KERNELBASE!WaitForMultipleObjects+0xe
0000005a`30d7f6e0 00007fff`3b6ee42b coreclr!ds_ipc_poll+0x179
0000005a`30d7f970 00007fff`3b70397c coreclr!ds_ipc_stream_factory_get_next_available_stream+0x35b
0000005a`30d7fb00 00007fff`5d2c84d4 coreclr!server_thread+0xfc
0000005a`30d7fb80 00007fff`5fa31d71 kernel32!BaseThreadInitThunk+0x14
0000005a`30d7fbb0 00000000`00000000 ntdll!RtlUserThreadStart+0x21

   5  Id: 67c.96c Suspend: 1 Teb: 0000005a`30460000 Unfrozen
Child-SP          RetAddr           Call Site
0000005a`30eff348 00007fff`5ca34ddf ntdll!NtWaitForMultipleObjects+0x14
0000005a`30eff350 00007fff`3b7d8337 KERNELBASE!WaitForMultipleObjectsEx+0xef
0000005a`30eff650 00007fff`3b7da74b coreclr!DebuggerRCThread::MainLoop+0x5a7
0000005a`30eff8a0 00007fff`3b7da8c9 coreclr!DebuggerRCThread::ThreadProc+0x4bb
0000005a`30eff9c0 00007fff`5d2c84d4 coreclr!DebuggerRCThread::ThreadProcStatic+0x79
0000005a`30eff9f0 00007fff`5fa31d71 kernel32!BaseThreadInitThunk+0x14
0000005a`30effa20 00000000`00000000 ntdll!RtlUserThreadStart+0x21

   6  Id: 67c.1664 Suspend: 1 Teb: 0000005a`30462000 Unfrozen
Child-SP          RetAddr           Call Site
0000005a`3107f208 00007fff`5ca16d1f ntdll!NtWaitForSingleObject+0x14
0000005a`3107f210 00007fff`3b4e3da9 KERNELBASE!WaitForSingleObjectEx+0x8f
(Inline Function) --------`-------- coreclr!CLREventWaitHelper2+0x11
0000005a`3107f2b0 00007fff`3b4e2acc coreclr!`CLREventWaitHelper'::`4'::__Body::Run+0x89
0000005a`3107f300 00007fff`3b4e44ae coreclr!CLREventWaitHelper+0x2c
0000005a`3107f350 00007fff`3b3356d9 coreclr!CLREventBase::WaitEx+0x30e
0000005a`3107f4a0 00007fff`3b3349e5 coreclr!FinalizerThread::WaitForFinalizerEvent+0x19
0000005a`3107f500 00007fff`3b229c74 coreclr!FinalizerThread::FinalizerThreadWorker+0x255
0000005a`3107f810 00007fff`3b229d7c coreclr!ManagedThreadBase_DispatchInner+0xb4
0000005a`3107f8d0 00007fff`3b22c151 coreclr!ManagedThreadBase_DispatchMiddle+0xbc
0000005a`3107fa40 00007fff`3b22c473 coreclr!``ManagedThreadBase_DispatchOuter'::`11'::__Body::Run'::`5'::__Body::Run+0x81
0000005a`3107fa90 00007fff`3b229e8f coreclr!`ManagedThreadBase_DispatchOuter'::`11'::__Body::Run+0x93
0000005a`3107faf0 00007fff`3b22a0bb coreclr!ManagedThreadBase_DispatchOuter+0xdf
0000005a`3107fb70 00007fff`3b33437c coreclr!ManagedThreadBase_NoADTransition+0xcb
0000005a`3107fc50 00007fff`5d2c84d4 coreclr!FinalizerThread::FinalizerThreadStart+0x1dc
0000005a`3107fc80 00007fff`5fa31d71 kernel32!BaseThreadInitThunk+0x14
0000005a`3107fcb0 00000000`00000000 ntdll!RtlUserThreadStart+0x21

   7  Id: 67c.a98 Suspend: 1 Teb: 0000005a`30466000 Unfrozen
Child-SP          RetAddr           Call Site
0000005a`3137e2d8 00007fff`5ca34ddf ntdll!NtWaitForMultipleObjects+0x14
0000005a`3137e2e0 00007fff`5df8e6fb KERNELBASE!WaitForMultipleObjectsEx+0xef
0000005a`3137e5e0 00007fff`5cfe4a3d user32!MsgWaitForMultipleObjectsEx+0x15b
0000005a`3137e6c0 00007fff`5d0555cf combase!CoTaskMemAlloc+0x276d
0000005a`3137e710 00007fff`5cfc2b43 combase!CoRegisterMessageFilter+0x118f
0000005a`3137e820 00007fff`3b22a396 combase!CoWaitForMultipleHandles+0xb3
0000005a`3137e860 00007fff`3b222dec coreclr!MsgWaitHelper+0x106
0000005a`3137e950 00007fff`3b223530 coreclr!Thread::DoAppropriateAptStateWait+0xfc
0000005a`3137ea20 00007fff`3b22c26a coreclr!Thread::DoAppropriateWaitWorker+0x510
0000005a`3137ec90 00007fff`3b222f60 coreclr!`Thread::DoAppropriateWait'::`11'::__Body::Run+0xaa
0000005a`3137ed10 00007fff`3b2d279c coreclr!Thread::DoAppropriateWait+0x100
0000005a`3137eda0 00007fff`39e05d2e coreclr!WaitHandleNative::CorWaitOneNative+0x27c
0000005a`3137efe0 00007ffe`dbe9292c System_Private_CoreLib!System.Boolean System.Threading.WaitHandle::WaitOneNoCheck(System.Int32, System.Boolean, System.Object, System.Diagnostics.Tracing.NativeRuntimeEventSource+WaitHandleWaitSourceMap)$##6003CB5+0xde
0000005a`3137f050 0000017f`89000068 0x00007ffe`dbe9292c
0000005a`3137f058 00007ffe`dbe92322 0x0000017f`89000068
0000005a`3137f060 00007fff`3bac8650 0x00007ffe`dbe92322
0000005a`3137f068 00007fff`3bac6ed8 coreclr!`string'
0000005a`3137f070 0000005a`00000000 coreclr!`string'
0000005a`3137f078 0000005a`3137f050 0x0000005a`00000000
0000005a`3137f080 0000005a`3137f220 0x0000005a`3137f050
0000005a`3137f088 9abcdef0`12345678 0x0000005a`3137f220
0000005a`3137f090 00007fff`3ba6c2b8 0x9abcdef0`12345678
0000005a`3137f098 0000005a`3137f798 coreclr!vtable_InlinedCallFrame
0000005a`3137f0a0 00007ffe`dc2e1ec8 0x0000005a`3137f798
0000005a`3137f0a8 0000005a`3137f050 0x00007ffe`dc2e1ec8
0000005a`3137f0b0 00007ffe`dbe9287c 0x0000005a`3137f050
0000005a`3137f0b8 0000005a`3137f120 0x00007ffe`dbe9287c
0000005a`3137f0c0 00000000`000000c7 0x0000005a`3137f120
0000005a`3137f0c8 0000017f`89000fe8 0xc7
0000005a`3137f0d0 0000017f`89001000 0x0000017f`89000fe8
0000005a`3137f0d8 000001c0`17715c48 0x0000017f`89001000
0000005a`3137f0e0 000001c0`17715c48 0x000001c0`17715c48
0000005a`3137f0e8 0000005a`3137f220 0x000001c0`17715c48
0000005a`3137f0f0 0000005a`3137f420 0x0000005a`3137f220
0000005a`3137f0f8 000001c0`176a2b40 0x0000005a`3137f420
0000005a`3137f100 00000000`00000000 0x000001c0`176a2b40

#  8  Id: 67c.11c8 Suspend: 0 Teb: 0000005a`30468000 Unfrozen
Child-SP          RetAddr           Call Site
0000005a`314faef8 00007fff`5ca34ddf ntdll!NtWaitForMultipleObjects+0x14
0000005a`314faf00 00007fff`5ca34cde KERNELBASE!WaitForMultipleObjectsEx+0xef
0000005a`314fb200 00007fff`5d2e08bc KERNELBASE!WaitForMultipleObjects+0xe
0000005a`314fb240 00007fff`5d2e03d3 kernel32!BasepReportFault+0x58c
0000005a`314fb7f0 00007fff`5ca4be6b kernel32!BasepReportFault+0xa3
0000005a`314fb830 00007fff`5fa8e783 KERNELBASE!UnhandledExceptionFilter+0x23b
0000005a`314fb930 00007fff`5fa76f46 ntdll!memset+0x1ac3
0000005a`314fb960 00007fff`5fa8aedd ntdll!_C_specific_handler+0x96
0000005a`314fb9d0 00007fff`5fa14d33 ntdll!_chkstk+0x11d
0000005a`314fba00 00007fff`5fa16a49 ntdll!RtlImageNtHeaderEx+0x483
0000005a`314fc100 00007fff`5ca16ea8 ntdll!RtlRaiseException+0x2d9
0000005a`314fcf20 00007fff`3b61ed9b KERNELBASE!RaiseException+0x68
0000005a`314fd000 00007fff`39e675f0 coreclr!SfiNext+0x36b
0000005a`314fd1e0 00007fff`39e66c3d System_Private_CoreLib!System.Runtime.EH::DispatchEx(System.Runtime.StackFrameIterator&, System.Runtime.EH+ExInfo&)$##6004A75+0x5f0
0000005a`314fd340 00007fff`3b6c9413 System_Private_CoreLib!System.Runtime.EH::RhThrowEx(System.Object, System.Runtime.EH+ExInfo&)$##6004A72+0x2d
0000005a`314fd370 00007fff`3b299fb7 coreclr!CallDescrWorkerInternal+0x83
0000005a`314fd3b0 00007fff`3b60d85a coreclr!DispatchCallSimple+0x187
0000005a`314fd4e0 00007fff`3b60d411 coreclr!DispatchManagedException+0x43a
0000005a`314fec90 00007fff`3b3b0af4 coreclr!DispatchManagedException+0x31
0000005a`314ff1a0 00007fff`3b3993b5 coreclr!ThrowNew+0xf4
0000005a`314ff1f0 00007ffe`dbe92c64 coreclr!IL_Throw+0x215
0000005a`314ff3e0 00000000`8000000e 0x00007ffe`dbe92c64
0000005a`314ff3e8 0000017f`89000040 0x8000000e
0000005a`314ff3f0 0000005a`314ff720 0x0000017f`89000040
0000005a`314ff3f8 000001c0`176af510 0x0000005a`314ff720
0000005a`314ff400 0000005a`00000000 0x000001c0`176af510
0000005a`314ff408 0000005a`314ff3e0 0x0000005a`00000000
0000005a`314ff410 00000000`00000000 0x0000005a`314ff3e0

   9  Id: 67c.a48 Suspend: 1 Teb: 0000005a`3046a000 Unfrozen
Child-SP          RetAddr           Call Site
0000005a`3167f548 00007fff`5f9feebe ntdll!NtWaitForWorkViaWorkerFactory+0x14
0000005a`3167f550 00007fff`5d2c84d4 ntdll!RtlReleaseSRWLockExclusive+0x296e
0000005a`3167f950 00007fff`5fa31d71 kernel32!BaseThreadInitThunk+0x14
0000005a`3167f980 00000000`00000000 ntdll!RtlUserThreadStart+0x21

  10  Id: 67c.16b4 Suspend: 1 Teb: 0000005a`3046c000 Unfrozen
Child-SP          RetAddr           Call Site
0000005a`317ff378 00007fff`5f9feebe ntdll!NtWaitForWorkViaWorkerFactory+0x14
0000005a`317ff380 00007fff`5d2c84d4 ntdll!RtlReleaseSRWLockExclusive+0x296e
0000005a`317ff780 00007fff`5fa31d71 kernel32!BaseThreadInitThunk+0x14
0000005a`317ff7b0 00000000`00000000 ntdll!RtlUserThreadStart+0x21

  11  Id: 67c.ddc Suspend: 1 Teb: 0000005a`3046e000 Unfrozen
Child-SP          RetAddr           Call Site
0000005a`3197f468 00007fff`5ca34ddf ntdll!NtWaitForMultipleObjects+0x14
0000005a`3197f470 00007fff`5d0384ff KERNELBASE!WaitForMultipleObjectsEx+0xef
0000005a`3197f770 00007fff`5d038a40 combase!CoSetProxyBlanket+0x429f
0000005a`3197fa00 00007fff`5d035379 combase!CoSetProxyBlanket+0x47e0
0000005a`3197fa50 00007fff`5d0578cc combase!CoSetProxyBlanket+0x1119
0000005a`3197fab0 00007fff`5d2c84d4 combase!IsErrorPropagationEnabled+0x8fc
0000005a`3197fae0 00007fff`5fa31d71 kernel32!BaseThreadInitThunk+0x14
0000005a`3197fb10 00000000`00000000 ntdll!RtlUserThreadStart+0x21
0:008> !clrstack -f -all
OS Thread Id: 0x1664
        Child SP               IP Call Site
0000005A3107F208 00007FFF5FA864C4 ntdll!NtWaitForSingleObject + 20
0000005A3107F210 00007FFF5CA16D1F KERNELBASE!WaitForSingleObjectEx + 143
0000005A3107F2B0 00007FFF3B4E3DA9 coreclr!`CLREventWaitHelper'::`4'::__Body::Run + 137
0000005A3107F300 00007FFF3B4E2ACC coreclr!CLREventWaitHelper + 44
0000005A3107F350 00007FFF3B4E44AE coreclr!CLREventBase::WaitEx + 782
0000005A3107F4A0 00007FFF3B3356D9 coreclr!FinalizerThread::WaitForFinalizerEvent + 25
0000005A3107F500 00007FFF3B3349E5 coreclr!FinalizerThread::FinalizerThreadWorker + 597
0000005A3107F810 00007FFF3B229C74 coreclr!ManagedThreadBase_DispatchInner + 180
0000005A3107F8D0 00007FFF3B229D7C coreclr!ManagedThreadBase_DispatchMiddle + 188
0000005A3107FA40 00007FFF3B22C151 coreclr!``ManagedThreadBase_DispatchOuter'::`11'::__Body::Run'::`5'::__Body::Run + 129
0000005A3107FA90 00007FFF3B22C473 coreclr!`ManagedThreadBase_DispatchOuter'::`11'::__Body::Run + 147
0000005A3107FAF0 00007FFF3B229E8F coreclr!ManagedThreadBase_DispatchOuter + 223
0000005A3107FB28                  [DebuggerU2MCatchHandlerFrame: 0000005a3107fb28] 
0000005A3107FB70 00007FFF3B22A0BB coreclr!ManagedThreadBase_NoADTransition + 203
0000005A3107FC50 00007FFF3B33437C coreclr!FinalizerThread::FinalizerThreadStart + 476
0000005A3107FC80 00007FFF5D2C84D4 kernel32!BaseThreadInitThunk + 20
0000005A3107FCB0 00007FFF5FA31D71 ntdll!RtlUserThreadStart + 33
OS Thread Id: 0x2a4
        Child SP               IP Call Site
0000005A3077D728 00007FFF5FA86F94 ntdll!NtWaitForMultipleObjects + 20
0000005A3077D730 00007FFF5CA34DDF KERNELBASE!WaitForMultipleObjectsEx + 239
0000005A3077DA30 00007FFF3B222E09 coreclr!Thread::DoAppropriateAptStateWait + 281
0000005A3077DB00 00007FFF3B223530 coreclr!Thread::DoAppropriateWaitWorker + 1296
0000005A3077DD70 00007FFF3B22C26A coreclr!`Thread::DoAppropriateWait'::`11'::__Body::Run + 170
0000005A3077DDF0 00007FFF3B222F60 coreclr!Thread::DoAppropriateWait + 256
0000005A3077DE80 00007FFF3B2D279C coreclr!WaitHandleNative::CorWaitOneNative + 636
0000005A3077DF88                  [HelperMethodFrame: 0000005a3077df88] System.Private.CoreLib.dll!System.Threading.WaitHandle.WaitOneCore(IntPtr, Int32, Boolean)
0000005A3077E0C0 00007FFF39E05D2E System.Private.CoreLib.dll!System.Threading.WaitHandle.WaitOneNoCheck(Int32, Boolean, System.Object, WaitHandleWaitSourceMap) + 222
0000005A3077E130 00007FFEDBE9259D ComWrappersTests.dll!ComWrappersTests.Program.CrossApartmentQueryInterface_NoDeadlock() + 541
0000005A3077E138 0000017F890002D0 
0000005A3077E140 0000017F89000290 
0000005A3077E148 0000017F89000208 
0000005A3077E1A0 00007FFEDBE81F03 ComWrappersTests.dll!__GeneratedMainWrapper.Main() + 659
OS Thread Id: 0xa98
        Child SP               IP Call Site
0000005A3137E2D8 00007FFF5FA86F94 ntdll!NtWaitForMultipleObjects + 20
0000005A3137E2E0 00007FFF5CA34DDF KERNELBASE!WaitForMultipleObjectsEx + 239
0000005A3137E5E0 00007FFF5DF8E6FB user32!MsgWaitForMultipleObjectsEx + 347
0000005A3137E6C0 00007FFF5CFE4A3D combase!CoTaskMemAlloc + 10093
0000005A3137E710 00007FFF5D0555CF combase!CoRegisterMessageFilter + 4495
0000005A3137E820 00007FFF5CFC2B43 combase!CoWaitForMultipleHandles + 179
0000005A3137E860 00007FFF3B22A396 coreclr!MsgWaitHelper + 262
0000005A3137E950 00007FFF3B222DEC coreclr!Thread::DoAppropriateAptStateWait + 252
0000005A3137EA20 00007FFF3B223530 coreclr!Thread::DoAppropriateWaitWorker + 1296
0000005A3137EC90 00007FFF3B22C26A coreclr!`Thread::DoAppropriateWait'::`11'::__Body::Run + 170
0000005A3137ED10 00007FFF3B222F60 coreclr!Thread::DoAppropriateWait + 256
0000005A3137EDA0 00007FFF3B2D279C coreclr!WaitHandleNative::CorWaitOneNative + 636
0000005A3137EEA8                  [HelperMethodFrame: 0000005a3137eea8] System.Private.CoreLib.dll!System.Threading.WaitHandle.WaitOneCore(IntPtr, Int32, Boolean)
0000005A3137EFE0 00007FFF39E05D2E System.Private.CoreLib.dll!System.Threading.WaitHandle.WaitOneNoCheck(Int32, Boolean, System.Object, WaitHandleWaitSourceMap) + 222
0000005A3137F050 00007FFEDBE9292C ComWrappersTests.dll!ComWrappersTests.Program+<>c__DisplayClass28_0.<CrossApartmentQueryInterface_NoDeadlock>b__0() + 444
0000005A3137F058 0000017F89000068 
0000005A3137F060 00007FFEDBE92322 
0000005A3137F068 00007FFF3BAC8650 coreclr!`string'
0000005A3137F070 00007FFF3BAC6ED8 coreclr!`string'
0000005A3137F078 0000005A00000000 
0000005A3137F080 0000005A3137F050 
0000005A3137F088 0000005A3137F220 
0000005A3137F090 9ABCDEF012345678 
0000005A3137F098 00007FFF3BA6C2B8 coreclr!vtable_InlinedCallFrame
0000005A3137F0A0 0000005A3137F798 
0000005A3137F0A8 00007FFEDC2E1EC8 
0000005A3137F0B0 0000005A3137F050 
0000005A3137F0B8 00007FFEDBE9287C 
0000005A3137F0C0 0000005A3137F120 
0000005A3137F0C8 00000000000000C7 
0000005A3137F0D0 0000017F89000FE8 
0000005A3137F0D8 0000017F89001000 
0000005A3137F0E0 000001C017715C48 
0000005A3137F0E8 000001C017715C48 
0000005A3137F0F0 0000005A3137F220 
0000005A3137F0F8 0000005A3137F420 
0000005A3137F100 000001C0176A2B40 
0000005A3137F798                  [DebuggerU2MCatchHandlerFrame: 0000005a3137f798] 
OS Thread Id: 0x11c8
        Child SP               IP Call Site
0000005A314FAEF8 00007FFF5FA86F94 ntdll!NtWaitForMultipleObjects + 20
0000005A314FAF00 00007FFF5CA34DDF KERNELBASE!WaitForMultipleObjectsEx + 239
0000005A314FB200 00007FFF5CA34CDE KERNELBASE!WaitForMultipleObjects + 14
0000005A314FB240 00007FFF5D2E08BC kernel32!BasepReportFault + 1420
0000005A314FB7F0 00007FFF5D2E03D3 kernel32!BasepReportFault + 163
0000005A314FB830 00007FFF5CA4BE6B KERNELBASE!UnhandledExceptionFilter + 571
0000005A314FB930 00007FFF5FA8E783 ntdll!memset + 6851
0000005A314FB960 00007FFF5FA76F46 ntdll!_C_specific_handler + 150
0000005A314FB9D0 00007FFF5FA8AEDD ntdll!_chkstk + 285
0000005A314FBA00 00007FFF5FA14D33 ntdll!RtlImageNtHeaderEx + 1155
0000005A314FC100 00007FFF5FA16A49 ntdll!RtlRaiseException + 729
0000005A314FCF20 00007FFF5CA16EA8 KERNELBASE!RaiseException + 104
0000005A314FD000 00007FFF3B61ED9B coreclr!SfiNext + 875
0000005A314FD1E0 00007FFF39E675F0 System_Private_CoreLib!System.Runtime.EH::DispatchEx(System.Runtime.StackFrameIterator&, System.Runtime.EH+ExInfo&)$##6004A75 + 1520
0000005A314FD240                  [InlinedCallFrame: 0000005a314fd240] 
0000005A314FD240                  [InlinedCallFrame: 0000005a314fd240] 
0000005A314FD1E0 00007FFF39E675CB System.Private.CoreLib.dll!System.Runtime.EH.DispatchEx(System.Runtime.StackFrameIterator ByRef, ExInfo ByRef) + 1483
0000005A314FD340 00007FFF39E66C3D System.Private.CoreLib.dll!System.Runtime.EH.RhThrowEx(System.Object, ExInfo ByRef) + 45
0000005A314FD370 00007FFF3B6C9413 coreclr!CallDescrWorkerInternal + 131
0000005A314FD3B0 00007FFF3B299FB7 coreclr!DispatchCallSimple + 391
0000005A314FD4E0 00007FFF3B60D85A coreclr!DispatchManagedException + 1082
0000005A314FEC90 00007FFF3B60D411 coreclr!DispatchManagedException + 49
0000005A314FF1A0 00007FFF3B3B0AF4 coreclr!ThrowNew + 244
0000005A314FF1F0 00007FFF3B3993B5 coreclr!IL_Throw + 533
0000005A314FF2D8                  [HelperMethodFrame: 0000005a314ff2d8] 
0000005A314FF3E0 00007FFEDBE92C64 ComWrappersTests.dll!ComWrappersTests.Program+<>c__DisplayClass28_0.<CrossApartmentQueryInterface_NoDeadlock>b__1() + 260
0000005A314FF3E8 000000008000000E 
0000005A314FF3F0 0000017F89000040 
0000005A314FF3F8 0000005A314FF720 
0000005A314FF400 000001C0176AF510 
0000005A314FF408 0000005A00000000 
0000005A314FF410 0000005A314FF3E0 
0000005A314FFA98                  [DebuggerU2MCatchHandlerFrame: 0000005a314ffa98] 
0:008> q
quit:
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\atlmfc.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\concurrency.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\cpp_rest.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\stl.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\Windows.Data.Json.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\Windows.Devices.Geolocation.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\Windows.Devices.Sensors.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\Windows.Media.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\windows.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\winrt.natvis'

Test Harness Exitcode is : 1
To run the test:
Set up CORE_ROOT and run.

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1460993
Error message validated: [Unhandled exception. System.Runtime.InteropServices.COMException (0x8000000E): A method was called at an unexpected time. CrossApartmentQueryInterface_NoDeadlock]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/15/2026 12:09:57 PM UTC

Report

Build Repository Test Pull Request
1460993 dotnet/runtime Interop/COM/ComWrappers/API/ComWrappersTests/ComWrappersTests.cmd

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 1 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Known Build ErrorUse this to report build issues in the .NET Helix tabarea-Interop-coreclrblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions