Skip to content

Nullref in FindImplSlotForCurrentType #105304

Closed

Description

@MichalStrehovsky
[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

Activity

  1. added this to the 9.0.0 milestone on Jul 23, 2024
  2. dotnet-policy-service commented on Jul 23, 2024

    @dotnet-policy-service
    Contributor

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

  3. MichalStrehovsky commented on Aug 2, 2024

    @MichalStrehovsky
    MemberAuthor

    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.

  4. MichalStrehovsky commented on Aug 2, 2024

    @MichalStrehovsky
    MemberAuthor

    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 🤞

  5. MichalStrehovsky commented on Aug 8, 2024

    @MichalStrehovsky
    MemberAuthor

    One more week and we can close as no repro 🤞

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

  6. modified the milestones: 9.0.0, 10.0.0 on Aug 15, 2024
  7. MichalStrehovsky commented on Sep 11, 2024

    @MichalStrehovsky
    MemberAuthor

    No repro in 3 weeks, closing.

  8. locked and limited conversation to collaborators on Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions