dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.37k stars 4.75k forks source link

ILC compiler failure with SynchronizationLockException in CI #108590

Closed vitek-karas closed 1 month ago

vitek-karas commented 1 month ago

Occurred in https://dev.azure.com/dnceng-public/public/_build/results?buildId=827048&view=results.

    Unhandled exception: System.AggregateException: One or more errors occurred. (Object synchronization method was called from an unsynchronized block of code.)
     ---> System.Threading.SynchronizationLockException: Object synchronization method was called from an unsynchronized block of code.
       at System.Threading.ObjectHeader.Release(Object) + 0x14a
       at System.Threading.Monitor.Exit(Object) + 0x17
       at System.Resources.ResourceReader.AllocateStringForNameIndex(Int32, Int32&) + 0x6a1
       at System.Resources.ResourceReader.ResourceEnumerator.get_Key() + 0xeb
       at ILCompiler.SubstitutionProvider.AssemblyFeatureInfo..ctor(EcmaModule, Logger, IReadOnlyDictionary`2, BodyAndFieldSubstitutions) + 0x5af
       at ILCompiler.SubstitutionProvider.FeatureSwitchHashtable.CreateValueFromKey(EcmaModule) + 0x5a
       at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x3b
       at Internal.TypeSystem.LockFreeReaderHashtable`2.GetOrCreateValue(TKey) + 0x62
jkotas commented 1 month ago

Duplicate of https://github.com/dotnet/runtime/issues/104340

We need to update SDK to .NET 9 RC2 to pick up the fix.