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

Nullref in FindImplSlotForCurrentType #105304

Closed
MichalStrehovsky opened this issue Jul 23, 2024 · 5 comments
Closed

Nullref in FindImplSlotForCurrentType #105304

MichalStrehovsky opened this issue Jul 23, 2024 · 5 comments
Labels
arch-arm64 area-NativeAOT-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 os-mac-os-x macOS aka OSX
Milestone

Comments

@MichalStrehovsky
Copy link
Member

MichalStrehovsky commented Jul 23, 2024

[FAIL] System.Collections.ObjectModel.Tests.CollectionTests.Insert_ZeroIndex
System.NullReferenceException : Object reference not set to an instance of an object.
   at System.Runtime.DispatchResolve.FindImplSlotForCurrentType(MethodTable*, MethodTable*, UInt16, Boolean, UInt16*, MethodTable**) + 0x44
   at System.Runtime.DispatchResolve.FindInterfaceMethodImplementationTarget(MethodTable*, MethodTable*, UInt16, MethodTable**) + 0x64
   at System.Runtime.CachedInterfaceDispatch.RhResolveDispatchWorker(Object, Void*, DispatchCellInfo&) + 0x70
   at System.Runtime.CachedInterfaceDispatch.RhpCidResolve_Worker(Object, IntPtr) + 0x30
   at System.Collections.ObjectModel.Tests.CollectionTests.Insert_ZeroIndex() + 0x5c

Build Information

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

Error Message

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

{
  "ErrorMessage": "System.Runtime.DispatchResolve.FindImplSlotForCurrentType",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=748325
Error message validated: [System.Runtime.DispatchResolve.FindImplSlotForCurrentType]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 7/23/2024 9:51:38 AM UTC

Report

Build Definition Test Pull Request
784563 dotnet/runtime System.Collections.ObjectModel.Tests.CollectionTests.Insert_ZeroIndex #106752
782219 dotnet/runtime System.Collections.ObjectModel.Tests.CollectionTests.Insert_ZeroIndex #106564
781179 dotnet/runtime System.Collections.ObjectModel.Tests.CollectionTests.Insert_ZeroIndex #106673
780541 dotnet/runtime System.Collections.ObjectModel.Tests.CollectionTests.Insert_ZeroIndex #106592

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 4
@MichalStrehovsky MichalStrehovsky added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' area-NativeAOT-coreclr Known Build Error Use this to report build issues in the .NET Helix tab labels Jul 23, 2024
@MichalStrehovsky MichalStrehovsky added this to the 9.0.0 milestone Jul 23, 2024
Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

@MichalStrehovsky
Copy link
Member Author

We got a repro with a dump at https://dev.azure.com/dnceng-public/public/_build/results?buildId=763400&view=ms.vss-test-web.build-test-results-tab&runId=19408156&resultId=100001.

Can be pulled with runfo get-helix-payload -j cbe1b7bb-c21c-4b8f-a98a-94a24a648442 -w System.Collections.Tests -o c:\helix_payload\System.Collections.Tests

In the dump, zooming into RhResolveDispatchWorker, we have a valid pObject that is of type 0x00007ff60260de60 (MethodTable for SortedSet<Int32>.Node). However, pInstanceType is 0x0043007400730065 and that's a bogus number. It should instead hold the MethodTable of the SortedSet in pObject. We then propagate this bugs number through a couple more frames and eventually AV.

@VSadov could this be GCInfo related? I don't see many ways how a value held entirely on stack/registers (in the short time that it takes to call the next method where the value is passed by value) could be corrupted.

@MichalStrehovsky
Copy link
Member Author

Hmm, but the latest hit is from a RyuJIT PR that is messing with GC liveness so it might be related to that.

So that dump might not be related to the mac arm64 issue that we otherwise have no dumps for. But that would also mean we haven't seen that one for more than a week. One more week and we can close as no repro 🤞

@MichalStrehovsky
Copy link
Member Author

One more week and we can close as no repro 🤞

Oh joy, it reproed. And still arm64 macOS only.

@agocke agocke modified the milestones: 9.0.0, 10.0.0 Aug 15, 2024
@MichalStrehovsky
Copy link
Member Author

No repro in 3 weeks, closing.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 area-NativeAOT-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 os-mac-os-x macOS aka OSX
Projects
Archived in project
Development

No branches or pull requests

2 participants