Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PInvokeTests.IEnumeratorTests.TestManagedToNative crash #96154

Closed
jkotas opened this issue Dec 18, 2023 · 4 comments · Fixed by #97349
Closed

PInvokeTests.IEnumeratorTests.TestManagedToNative crash #96154

jkotas opened this issue Dec 18, 2023 · 4 comments · Fixed by #97349
Labels
arch-arm64 area-Interop-coreclr blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab
Milestone

Comments

@jkotas
Copy link
Member

jkotas commented Dec 18, 2023

20:52:01.220 Passed test: global::PInvokeTests.IEnumeratorTests.TestNativeToManaged()
20:52:01.224 Running test: global::PInvokeTests.IEnumeratorTests.TestManagedToNative()

Assert failure(PID 6320 [0x000018b0], Thread: 4908 [0x132c]): The 'LastThrownObject' should not be, but is, NULL.
The runtime may have lost track of the type of an exception in flight.
Please get a good stack trace, find the caller of Validate, and file a bug against the owner.

To suppress this assert 'set DOTNET_SuppressLostExceptionTypeAssert=1'

CORECLR! CLRLastThrownObjectException::Validate + 0x200 (0x00007ffe`d1fa1788)
CORECLR! `InternalDispatchImpl_Invoke'::`1'::catch$12 + 0x98 (0x00007ffe`d2442958)
CORECLR! CallSettingFrame + 0x68 (0x00007ffe`d1e225f0)
CORECLR! _FrameHandler3::CxxCallCatchBlock + 0x1C0 (0x00007ffe`d233a140)
NTDLL! RtlCaptureContext + 0x1B8 (0x00007fff`29532248)
CORECLR! InternalDispatchImpl_Invoke + 0x22C (0x00007ffe`d2123064)
CORECLR! Dispatch_Invoke + 0x108 (0x00007ffe`d2121220)
CORECLR! Dispatch_Invoke_Wrapper + 0xB4 (0x00007ffe`d21250c4)
IENUMERATORNATIVE! VerifyIntegerEnumeration + 0x68 (0x00007ffe`fe8d2168)
<no module>! <no symbol> + 0x0 (0x00007ffe`73a1e4d4)
    File: D:\a\_work\1\s\src\coreclr\vm\clrex.cpp Line: 2155
    Image: C:\h\w\A0D20890\p\corerun.exe

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=503459
Build error leg or test failing: Interop.WorkItemExecution
Pull request: #96144

Error Message

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

{
  "ErrorMessage": "The 'LastThrownObject' should not be, but is, NULL.",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=503459
Error message validated: The 'LastThrownObject' should not be, but is, NULL.
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 12/18/2023 10:54:52 PM UTC

Report

Build Definition Test Pull Request
535332 dotnet/runtime Interop.WorkItemExecution #97184
534995 dotnet/runtime Interop.WorkItemExecution
534347 dotnet/runtime Interop.WorkItemExecution
533146 dotnet/runtime Interop.WorkItemExecution #97205
526620 dotnet/runtime Interop.WorkItemExecution
526480 dotnet/runtime Interop.WorkItemExecution
526431 dotnet/runtime Interop.WorkItemExecution
523323 dotnet/runtime Interop.WorkItemExecution
519853 dotnet/runtime Interop.WorkItemExecution #96647
517508 dotnet/runtime Interop.WorkItemExecution
515207 dotnet/runtime Interop.WorkItemExecution
513412 dotnet/runtime Interop.WorkItemExecution #96446
511249 dotnet/runtime Interop.WorkItemExecution
510949 dotnet/runtime Interop.WorkItemExecution

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
1 4 14
@jkotas jkotas added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab labels Dec 18, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Dec 18, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Dec 18, 2023
@jkotas jkotas added area-Interop-coreclr and removed untriaged New issue has not been triaged by the area owner needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Dec 18, 2023
@jkotas
Copy link
Member Author

jkotas commented Dec 18, 2023

It is crashing during an attempt to free VT_RECORD:

  *** Stack trace for last set context - .thread/.cxr resets it
 # Child-SP          RetAddr               Call Site
00 (Inline Function) --------`--------     oleaut32!VariantClearWorker+0x480 [mincore\com\oleaut32\dispatch\variant.cpp @ 155] 
01 00000024`0f9ee220 00007ffe`d2076210     oleaut32!VariantClear+0x4a4 [mincore\com\oleaut32\dispatch\variant.cpp @ 202] 
02 00000024`0f9ee260 00007ffe`d210b204     coreclr!SafeVariantClear+0x38 [D:\a\_work\1\s\src\coreclr\vm\olevariant.cpp @ 1174] 
03 00000024`0f9ee2a0 00007ffe`d2123064     coreclr!DispatchInfo::InvokeMember+0x144 [D:\a\_work\1\s\src\coreclr\vm\dispatchinfo.cpp @ 1992] 
04 00000024`0f9ee640 00007ffe`d2121220     coreclr!InternalDispatchImpl_Invoke+0x22c [D:\a\_work\1\s\src\coreclr\vm\stdinterfaces.cpp @ 1334] 
05 00000024`0f9ee740 00007ffe`d21250c4     coreclr!Dispatch_Invoke+0x108 [D:\a\_work\1\s\src\coreclr\vm\stdinterfaces.cpp @ 1209] 
06 00000024`0f9ee7b0 00007ffe`fe8d2168     coreclr!Dispatch_Invoke_Wrapper+0xb4 [D:\a\_work\1\s\src\coreclr\vm\stdinterfaces_wrapper.cpp @ 366] 
07 00000024`0f9ee810 00007ffe`73a1e4d4     IEnumeratorNative!VerifyIntegerEnumeration+0x68

image

Is VT_RECORD expect here? Maybe the tests calls VariantClear on uninitialized memory?

@jeffschwMSFT
Copy link
Member

cc @agocke

@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 9.0.0 milestone Jan 8, 2024
@AaronRobinsonMSFT
Copy link
Member

I will take a look at this.

@AaronRobinsonMSFT
Copy link
Member

This appears to only be happening on arm64.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jan 23, 2024
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jan 23, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 area-Interop-coreclr blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants