System.Reflection.Metadata.ApplyUpdateTest.TestAddInstanceField fails after roslyn update in hotreload-utils
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- compilers, testing-qa
Research direction
Start with the failing TestAddInstanceField case in src/libraries/System.Runtime.Loader/tests/ApplyUpdateTest.cs at line 389 and the AddInstanceField constructor in AddInstanceField.cs at line 42. Compare the Roslyn update from PR 115709 with the Mono interpreter path in RuntimeHelpers.Mono.cs at line 19, then run the test in the affected Mono cases. Done means the test passes and no longer needs to remain disabled for dependency flow.
Written by the indexing model from the issue text.
Description
https://github.com/dotnet/runtime/pull/115709 updated roslyn in hotreload-utils and we started seeing this test failure in Mono interpreter cases:
Applying metadata update for /datadisks/disk1/work/C07B0A04/w/A82E08EE/e/System.Reflection.Metadata.ApplyUpdate.Test.AddInstanceField.dll, revision 1
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: Field not large enough to fill array (Parameter 'field_handle')
at System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(Array array, RuntimeFieldHandle fldHandle) in /_/src/mono/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.Mono.cs:line 19
at System.Reflection.Metadata.ApplyUpdate.Test.AddInstanceField..ctor() in /__w/1/s/src/libraries/System.Runtime.Loader/tests/ApplyUpdate/System.Reflection.Metadata.ApplyUpdate.Test.AddInstanceField/AddInstanceField.cs:line 42
at System.Reflection.Metadata.ApplyUpdateTest.<>c.<TestAddInstanceField>b__11_0() in /_/src/libraries/System.Runtime.Loader/tests/ApplyUpdateTest.cs:line 389
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in /_/src/mono/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.Mono.cs:line 22
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57
--- End of stack trace from previous location ---
at Microsoft.DotNet.RemoteExecutor.Program.Main(String[] args) in /_/src/arcade/src/Microsoft.DotNet.RemoteExecutor/src/Program.cs:line 97
Running test using RemoteExecutor
System.Reflection.Metadata.ApplyUpdateTest.TestAddInstanceField [FAIL]
Microsoft.DotNet.RemoteExecutor.RemoteExecutionException : Remote process failed with an unhandled exception.
Stack Trace:
Child exception:
System.ArgumentException: Field not large enough to fill array (Parameter 'field_handle')
/_/src/mono/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.Mono.cs(19,0): at System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(Array array, RuntimeFieldHandle fldHandle)
/__w/1/s/src/libraries/System.Runtime.Loader/tests/ApplyUpdate/System.Reflection.Metadata.ApplyUpdate.Test.AddInstanceField/AddInstanceField.cs(42,0): at System.Reflection.Metadata.ApplyUpdate.Test.AddInstanceField..ctor()
/_/src/libraries/System.Runtime.Loader/tests/ApplyUpdateTest.cs(389,0): at System.Reflection.Metadata.ApplyUpdateTest.<>c.<TestAddInstanceField>b__11_0()
/_/src/mono/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.Mono.cs(22,0): at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
/_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs(57,0): at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Child process:
System.Runtime.Loader.Tests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 System.Reflection.Metadata.ApplyUpdateTest+<>c Void <TestAddInstanceField>b__11_0()
Disabled the test for now to unblock the dependency flow.
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/runtime
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
area-System.Reflection blocking-clean-ci-optional Known Build Error os-mac-os-x untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area-CodeGen-coreclr untriaged
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
agentic-workflows untriaged
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
area-VM-meta-mono untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
Create parent directories only after the containment check in InstallHelper.TryExtractToDirectory Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSResourceGet#2056 ·