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

System.Management.Tests fails with "CONTRACT VIOLATION by LoaderAllocator::SetHandleValue" #102719

Closed
jakobbotsch opened this issue May 27, 2024 · 4 comments · Fixed by #102729
Closed
Labels
area-VM-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

Comments

@jakobbotsch
Copy link
Member

jakobbotsch commented May 27, 2024

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=688333
Build error leg or test failing: System.Management.Tests.WorkItemExecution
Pull request: #102074
Console log: https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-102074-merge-ed0aa3fb9d2f423082/System.Management.Tests/1/console.40b94cf1.log?helixlogtype=result

C:\h\w\BBF60A2D\w\B9A90A05\e>"C:\h\w\BBF60A2D\p\dotnet.exe" exec --runtimeconfig System.Management.Tests.runtimeconfig.json --depsfile System.Management.Tests.deps.json xunit.console.dll System.Management.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing  
  Discovering: System.Management.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Management.Tests (found 18 of 28 test cases)
  Starting:    System.Management.Tests (parallel test collections = on [4 threads], stop on fail = off)
    System.Management.Tests.ManagementObjectTests.PlatformNotSupportedException_On_Nano [SKIP]
      Condition(s) not met: "IsWindowsNanoServer"

Assert failure(PID 920 [0x00000398], Thread: 6064 [0x17b0]): CONTRACT VIOLATION by LoaderAllocator::SetHandleValue at "D:\a\_work\1\s\src\coreclr\vm\loaderallocator.cpp":970

MODE_COOPERATIVE encountered while thread is in preemptive state.

                        CONTRACT in LoaderAllocator::SetHandleValue at "D:\a\_work\1\s\src\coreclr\vm\loaderallocator.cpp":970
                        CONTRACT in LoaderAllocator::FreeHandle at "D:\a\_work\1\s\src\coreclr\vm\loaderallocator.cpp":880
                        CONTRACT in EEMarshalingData::GetCustomMarshalerHelper at "D:\a\_work\1\s\src\coreclr\vm\mlinfo.cpp":909
VIOLATED-->  CONTRACT in SetupCustomMarshalerHelper at "D:\a\_work\1\s\src\coreclr\vm\mlinfo.cpp":398
                        CONTRACT in StubHelpers_CreateCustomMarshalerHelper at "D:\a\_work\1\s\src\coreclr\vm\mlinfo.cpp":4084
                        CONTRACT in DispatchCallSimple at "D:\a\_work\1\s\src\coreclr\vm\callhelpers.cpp":178
                        CONTRACT in ThreadNative::KickOffThread_Worker at "D:\a\_work\1\s\src\coreclr\vm\comsynchronizable.cpp":148
                        CONTRACT in ManagedThreadBase_DispatchInner at "D:\a\_work\1\s\src\coreclr\vm\threads.cpp":7168
                        CONTRACT in ManagedThreadBase_FullTransition at "D:\a\_work\1\s\src\coreclr\vm\threads.cpp":7416
                        CONTRACT in ThreadNative::KickOffThread at "D:\a\_work\1\s\src\coreclr\vm\comsynchronizable.cpp":196



CORECLR! CONTRACT_ASSERT + 0x2E4 (0x710d1909)
CORECLR! EEContract::DoChecks + 0x159 (0x7135d07a)
CORECLR! LoaderAllocator::SetHandleValue + 0x168 (0x7122c9b1)
CORECLR! LoaderAllocator::FreeHandle + 0x150 (0x712244d8)
CORECLR! CustomMarshalerInfo::~CustomMarshalerInfo + 0x43 (0x7133bc90)
CORECLR! EEMarshalingData::GetCustomMarshalerHelper + 0x57C (0x71417745)
CORECLR! SetupCustomMarshalerHelper + 0x28D (0x7141e661)
CORECLR! StubHelpers_CreateCustomMarshalerHelper + 0x252 (0x7141ecb2)
<no module>! <no symbol> + 0x0 (0x0da52ebe)
<no module>! <no symbol> + 0x0 (0x0da52b8b)
    File: D:\a\_work\1\s\src\coreclr\vm\loaderallocator.cpp:970
    Image: C:\h\w\BBF60A2D\p\dotnet.exe

Error Message

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

{
  "ErrorMessage": "CONTRACT VIOLATION by LoaderAllocator::SetHandleValue",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=688333
Error message validated: [CONTRACT VIOLATION by LoaderAllocator::SetHandleValue]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 5/27/2024 11:46:44 AM UTC

Report

Build Definition Test Pull Request
688622 dotnet/runtime System.Management.Tests.WorkItemExecution #102580
688547 dotnet/runtime System.Management.Tests.WorkItemExecution #102705
688354 dotnet/runtime System.Management.Tests.WorkItemExecution #102713
688333 dotnet/runtime System.Management.Tests.WorkItemExecution #102074
688323 dotnet/runtime System.Management.Tests.WorkItemExecution #102711
687961 dotnet/runtime System.Management.Tests.WorkItemExecution #102688
688285 dotnet/runtime System.Management.Tests.WorkItemExecution
688243 dotnet/runtime System.Management.Tests.WorkItemExecution #102645
688076 dotnet/runtime System.Management.Tests.WorkItemExecution

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
9 9 9
@jakobbotsch jakobbotsch 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 May 27, 2024
@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 May 27, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 27, 2024
@jakobbotsch jakobbotsch added area-VM-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 May 27, 2024
@jakobbotsch
Copy link
Member Author

@jakobbotsch jakobbotsch changed the title System.Management.Tests fails on win-x86 with "CONTRACT VIOLATION by LoaderAllocator::SetHandleValue" System.Management.Tests fails with "CONTRACT VIOLATION by LoaderAllocator::SetHandleValue" May 27, 2024
Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@EgorBo
Copy link
Member

EgorBo commented May 27, 2024

Looks like it started to fail after #102605 ?

@jkotas
Copy link
Member

jkotas commented May 27, 2024

This was introduced by #99998 . It changed the contract on LoaderAllocator::SetHandleValue method that's failing here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-VM-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