dotnet / runtime

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

LockFreeReaderHashtable growing algorithm results in an arithmetic overflow #102131

Open filipnavara opened 6 months ago

filipnavara commented 6 months ago

I tried to compile quite a big project with ILC and it always fails like ~20 minutes later with this error:

Assembly = Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Parameters
CommandLineArguments = "D:\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\9.0.0-preview.5.24256.1\tools\\ilc" @"obj\Release\net9.0-windows10.0.19041.0\win-x86\native\MailClient.ilc.rsp"
Errors
System.AggregateException: One or more errors occurred. (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<Microsoft.Graph.Models.ActivityType,System.__Canon>.Select<Nullable`1<AuthenticationMethodKeyStrength>>(Func`2<__Canon,Nullable`1<AuthenticationMethodKeyStrength>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.DayOfWeek,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSelectIterator`2<char,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.WindowsMalwareThreatState>,System.__Canon>.Select<Nullable`1<CloudPcDeviceImageStatus>>(Func`2<__Canon,Nullable`1<CloudPcDeviceImageStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<Microsoft.Graph.Models.TokenIssuerType,System.__Canon>.Select<Nullable`1<WebsiteType>>(Func`2<__Canon,Nullable`1<WebsiteType>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Collections.Generic.KeyValuePair`2<MailClient.Storage.SortKey,System.__Canon>,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.PlannerPreviewType>,System.__Canon>.Select<Nullable`1<EducationAssignmentStatus>>(Func`2<__Canon,Nullable`1<EducationAssignmentStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<XstReader.TCROWIDANSI,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<Microsoft.Graph.Models.WindowsHelloForBusinessPinUsage,System.__Canon>.Select<Nullable`1<SourceType>>(Func`2<__Canon,Nullable`1<SourceType>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<AutoMapper.Internal.ConstructorParameters,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.ValueTuple`2<int32,int32>,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IteratorSelectIterator`2<Xilium.CefGlue.CefRange,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<MailClient.Settings.SendLaterOption,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSelectIterator`2<XstReader.NID,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IteratorSelectIterator`2<Microsoft.Graph.Models.ThreatAssessmentRequestSource,System.__Canon>.Select<Nullable`1<OutlierMemberType>>(Func`2<__Canon,Nullable`1<OutlierMemberType>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<MailClient.Protocols.TurkCell.Calendar.Objects.RecurrencneDay,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<System.Collections.Generic.KeyValuePair`2<uint32,MailClient.Storage.Mail.MailFlags>,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListWhereSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.OnlineMeetingProviderType>,System.__Canon>.Select<Nullable`1<AlertDetermination>>(Func`2<__Canon,Nullable`1<AlertDetermination>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IteratorSelectIterator`2<System.ValueTuple`2<int32,int32>,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<MailClient.Reminders.Common+MailNotificationNotifyWhenNotRepliedOptions,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IteratorSelectIterator`2<MailClient.Protocols.OnlineMeeting.MicrosoftTeams.Objects.DayOfWeek,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<Microsoft.Graph.Models.Security.IncidentStatus,System.__Canon>.Select<Nullable`1<SafeSearchFilterType>>(Func`2<__Canon,Nullable`1<SafeSearchFilterType>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<AutoMapper.QueryableExtensions.Impl.ProjectionBuilder+FirstPassLetPropertyMaps+SubQueryPath,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.UserFlowType,System.__Canon>.Select<ValueTuple`2<int32,__Canon>>(Func`2<__Canon,ValueTuple`2<int32,__Canon>>)')
 ---> ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<Microsoft.Graph.Models.ActivityType,System.__Canon>.Select<Nullable`1<AuthenticationMethodKeyStrength>>(Func`2<__Canon,Nullable`1<AuthenticationMethodKeyStrength>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x2db
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.TaskReplicator.Run[TState](TaskReplicator.ReplicatableUserAction`1, ParallelOptions, Boolean) + 0x288
   at System.Threading.Tasks.Parallel.ForWorker[TLocal,TInt](TInt, TInt, ParallelOptions, Action`1, Action`2, Func`4, Func`1, Action`1) + 0x1f4
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection, CancellationToken, Exception) + 0x30
   at System.Threading.Tasks.Parallel.ForWorker[TLocal,TInt](TInt, TInt, ParallelOptions, Action`1, Action`2, Func`4, Func`1, Action`1) + 0x43f
   at ILCompiler.ILScanner.CompileMultiThreaded(List`1) + 0x1d6
   at ILCompiler.ILScanner.ComputeDependencyNodeDependencies(List`1 obj) + 0x168
   at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes() + 0xb3
   at ILCompiler.ILScanner.ILCompiler.IILScanner.Scan() + 0x1b
   at ILCompiler.Program.<Run>g__RunScanner|4_0(Program.<>c__DisplayClass4_0&) + 0x1e5
   at ILCompiler.Program.Run() + 0x287f
   at ILCompiler.ILCompilerRootCommand.<>c__DisplayClass240_0.<.ctor>b__0(ParseResult result) + 0x33c
 ---> (Inner Exception #1) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.DayOfWeek,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x2db
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #2) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSelectIterator`2<char,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x2db
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #3) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.WindowsMalwareThreatState>,System.__Canon>.Select<Nullable`1<CloudPcDeviceImageStatus>>(Func`2<__Canon,Nullable`1<CloudPcDeviceImageStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x2db
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #4) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<Microsoft.Graph.Models.TokenIssuerType,System.__Canon>.Select<Nullable`1<WebsiteType>>(Func`2<__Canon,Nullable`1<WebsiteType>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x2db
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #5) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Collections.Generic.KeyValuePair`2<MailClient.Storage.SortKey,System.__Canon>,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #6) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.PlannerPreviewType>,System.__Canon>.Select<Nullable`1<EducationAssignmentStatus>>(Func`2<__Canon,Nullable`1<EducationAssignmentStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #7) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<XstReader.TCROWIDANSI,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #8) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<Microsoft.Graph.Models.WindowsHelloForBusinessPinUsage,System.__Canon>.Select<Nullable`1<SourceType>>(Func`2<__Canon,Nullable`1<SourceType>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #9) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<AutoMapper.Internal.ConstructorParameters,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #10) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.ValueTuple`2<int32,int32>,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #11) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IteratorSelectIterator`2<Xilium.CefGlue.CefRange,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #12) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<MailClient.Settings.SendLaterOption,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #13) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSelectIterator`2<XstReader.NID,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #14) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IteratorSelectIterator`2<Microsoft.Graph.Models.ThreatAssessmentRequestSource,System.__Canon>.Select<Nullable`1<OutlierMemberType>>(Func`2<__Canon,Nullable`1<OutlierMemberType>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #15) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<MailClient.Protocols.TurkCell.Calendar.Objects.RecurrencneDay,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #16) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<System.Collections.Generic.KeyValuePair`2<uint32,MailClient.Storage.Mail.MailFlags>,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #17) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListWhereSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.OnlineMeetingProviderType>,System.__Canon>.Select<Nullable`1<AlertDetermination>>(Func`2<__Canon,Nullable`1<AlertDetermination>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #18) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IteratorSelectIterator`2<System.ValueTuple`2<int32,int32>,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #19) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<MailClient.Reminders.Common+MailNotificationNotifyWhenNotRepliedOptions,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #20) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IteratorSelectIterator`2<MailClient.Protocols.OnlineMeeting.MicrosoftTeams.Objects.DayOfWeek,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #21) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<Microsoft.Graph.Models.Security.IncidentStatus,System.__Canon>.Select<Nullable`1<SafeSearchFilterType>>(Func`2<__Canon,Nullable`1<SafeSearchFilterType>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #22) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<AutoMapper.QueryableExtensions.Impl.ProjectionBuilder+FirstPassLetPropertyMaps+SubQueryPath,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
 ---> (Inner Exception #23) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.UserFlowType,System.__Canon>.Select<ValueTuple`2<int32,__Canon>>(Func`2<__Canon,ValueTuple`2<int32,__Canon>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

Notably, I tried the same experiment on the same project couple of months ago. Obviously both the project and ILC evolved, but it seems to have arbitrarily trip a threshold in few places where the hash table expansion goes too big.

dotnet-policy-service[bot] commented 6 months ago

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

filipnavara commented 6 months ago

I am not sure if I can make an abridged repro, so here's the full ILC repro for a start: https://1drv.ms/u/s!AgaMhbe7wFq8m8pg-U17VEoTsQ6rGg?e=iAcv7t

MichalStrehovsky commented 6 months ago

fails like ~20 minutes later with this error:

If it's compiling for 20 minutes, it's 99% sure you hit a "wide" generic recursion and you'll either hit this failure mode, or OOM (we do detect a "deep" recursion, but "wide" is a problem).

Try the switch from https://github.com/dotnet/runtime/issues/97235#issuecomment-1991176284 to see the warnings that should point you where the recursion is.

filipnavara commented 6 months ago

If it's compiling for 20 minutes

The project is huge. I use it for NativeAOT testing because it tends to hit all sorts of limits. 20 minutes is actually not a bad time given my past attempts :-)

Try the switch from https://github.com/dotnet/runtime/issues/97235#issuecomment-1991176284 to see the warnings that should point you where the recursion is.

Sure, will give it a try.

filipnavara commented 6 months ago

I don't think --maxgenericcycle:1 made any difference:

Error: One or more errors occurred. (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSelectIterator`2<Microsoft.Graph.Models.AccountTargetContentType,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.EducationGender,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<Microsoft.Graph.Models.MultiFactorAuthConfiguration,System.__Canon>.Select<Nullable`1<OutlierMemberType>>(Func`2<__Canon,Nullable`1<OutlierMemberType>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.InitiatorType,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<Microsoft.Graph.Models.IdentityGovernance.ValueTypeObject,System.__Canon>.Select<Nullable`1<WebBrowserCookieSettings>>(Func`2<__Canon,Nullable`1<WebBrowserCookieSettings>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ResponseType>,System.__Canon>.Select<Nullable`1<CloudPcDeviceImageStatus>>(Func`2<__Canon,Nullable`1<CloudPcDeviceImageStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IteratorSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ManagedAppDataStorageLocation>,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.ExternalConnectors.PropertyType,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.Security.EventPropagationStatus,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.UserExperienceAnalyticsInsightSeverity,System.__Canon>.Select<Nullable`1<TimeOffReasonIconType>>(Func`2<__Canon,Nullable`1<TimeOffReasonIconType>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.AppListType,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSelectIterator`2<Microsoft.Graph.Models.IdentityGovernance.ValueTypeObject,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<Microsoft.Graph.Models.Win32LobAppRestartBehavior,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ConditionalAccessClientApp>,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.PrintColorMode,System.__Canon>.Select<Nullable`1<SourceType>>(Func`2<__Canon,Nullable`1<SourceType>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<Microsoft.Graph.Models.AccessPackageRequestState,System.__Canon>.Select<ValueTuple`2<int32,__Canon>>(Func`2<__Canon,ValueTuple`2<int32,__Canon>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.FollowupFlagStatus>,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.DelegatedAdminRelationshipStatus,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.RoutingType,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<Microsoft.Graph.Models.MultiFactorAuthConfiguration,System.__Canon>.Select<Nullable`1<SafeSearchFilterType>>(Func`2<__Canon,Nullable`1<SafeSearchFilterType>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.B2bIdentityProvidersType>,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.WeakAlgorithms,System.__Canon>.Select<Nullable`1<AlertSeverity>>(Func`2<__Canon,Nullable`1<AlertSeverity>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.InstallIntent,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<Microsoft.Graph.Models.Security.ContentFormat,System.__Canon>.Select<Nullable`1<BroadcastMeetingAudience>>(Func`2<__Canon,Nullable`1<BroadcastMeetingAudience>>)')
System.AggregateException: One or more errors occurred. (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSelectIterator`2<Microsoft.Graph.Models.AccountTargetContentType,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.EducationGender,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<Microsoft.Graph.Models.MultiFactorAuthConfiguration,System.__Canon>.Select<Nullable`1<OutlierMemberType>>(Func`2<__Canon,Nullable`1<OutlierMemberType>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.InitiatorType,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<Microsoft.Graph.Models.IdentityGovernance.ValueTypeObject,System.__Canon>.Select<Nullable`1<WebBrowserCookieSettings>>(Func`2<__Canon,Nullable`1<WebBrowserCookieSettings>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ResponseType>,System.__Canon>.Select<Nullable`1<CloudPcDeviceImageStatus>>(Func`2<__Canon,Nullable`1<CloudPcDeviceImageStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IteratorSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ManagedAppDataStorageLocation>,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.ExternalConnectors.PropertyType,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.Security.EventPropagationStatus,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.UserExperienceAnalyticsInsightSeverity,System.__Canon>.Select<Nullable`1<TimeOffReasonIconType>>(Func`2<__Canon,Nullable`1<TimeOffReasonIconType>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.AppListType,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSelectIterator`2<Microsoft.Graph.Models.IdentityGovernance.ValueTypeObject,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<Microsoft.Graph.Models.Win32LobAppRestartBehavior,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ConditionalAccessClientApp>,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.PrintColorMode,System.__Canon>.Select<Nullable`1<SourceType>>(Func`2<__Canon,Nullable`1<SourceType>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<Microsoft.Graph.Models.AccessPackageRequestState,System.__Canon>.Select<ValueTuple`2<int32,__Canon>>(Func`2<__Canon,ValueTuple`2<int32,__Canon>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.FollowupFlagStatus>,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.DelegatedAdminRelationshipStatus,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.RoutingType,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<Microsoft.Graph.Models.MultiFactorAuthConfiguration,System.__Canon>.Select<Nullable`1<SafeSearchFilterType>>(Func`2<__Canon,Nullable`1<SafeSearchFilterType>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.B2bIdentityProvidersType>,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.WeakAlgorithms,System.__Canon>.Select<Nullable`1<AlertSeverity>>(Func`2<__Canon,Nullable`1<AlertSeverity>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.InstallIntent,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)') (Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<Microsoft.Graph.Models.Security.ContentFormat,System.__Canon>.Select<Nullable`1<BroadcastMeetingAudience>>(Func`2<__Canon,Nullable`1<BroadcastMeetingAudience>>)')
 ---> ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSelectIterator`2<Microsoft.Graph.Models.AccountTargetContentType,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x2db
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.TaskReplicator.Run[TState](TaskReplicator.ReplicatableUserAction`1, ParallelOptions, Boolean) + 0x288
   at System.Threading.Tasks.Parallel.ForWorker[TLocal,TInt](TInt, TInt, ParallelOptions, Action`1, Action`2, Func`4, Func`1, Action`1) + 0x1f4
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection, CancellationToken, Exception) + 0x30
   at System.Threading.Tasks.Parallel.ForWorker[TLocal,TInt](TInt, TInt, ParallelOptions, Action`1, Action`2, Func`4, Func`1, Action`1) + 0x43f
   at ILCompiler.ILScanner.CompileMultiThreaded(List`1) + 0x1d6
   at ILCompiler.ILScanner.ComputeDependencyNodeDependencies(List`1 obj) + 0x168
   at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes() + 0xb3
   at ILCompiler.ILScanner.ILCompiler.IILScanner.Scan() + 0x1b
   at ILCompiler.Program.<Run>g__RunScanner|4_0(Program.<>c__DisplayClass4_0&) + 0x1e5
   at ILCompiler.Program.Run() + 0x287f
   at ILCompiler.ILCompilerRootCommand.<>c__DisplayClass240_0.<.ctor>b__0(ParseResult result) + 0x33c
 ---> (Inner Exception #1) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.EducationGender,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x2db
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #2) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<Microsoft.Graph.Models.MultiFactorAuthConfiguration,System.__Canon>.Select<Nullable`1<OutlierMemberType>>(Func`2<__Canon,Nullable`1<OutlierMemberType>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x2db
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #3) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.InitiatorType,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x2db
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #4) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<Microsoft.Graph.Models.IdentityGovernance.ValueTypeObject,System.__Canon>.Select<Nullable`1<WebBrowserCookieSettings>>(Func`2<__Canon,Nullable`1<WebBrowserCookieSettings>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #5) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ResponseType>,System.__Canon>.Select<Nullable`1<CloudPcDeviceImageStatus>>(Func`2<__Canon,Nullable`1<CloudPcDeviceImageStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #6) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IteratorSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ManagedAppDataStorageLocation>,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #7) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.ExternalConnectors.PropertyType,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #8) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.Security.EventPropagationStatus,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #9) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.UserExperienceAnalyticsInsightSeverity,System.__Canon>.Select<Nullable`1<TimeOffReasonIconType>>(Func`2<__Canon,Nullable`1<TimeOffReasonIconType>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #10) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.AppListType,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #11) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSelectIterator`2<Microsoft.Graph.Models.IdentityGovernance.ValueTypeObject,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #12) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<Microsoft.Graph.Models.Win32LobAppRestartBehavior,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #13) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ConditionalAccessClientApp>,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #14) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.PrintColorMode,System.__Canon>.Select<Nullable`1<SourceType>>(Func`2<__Canon,Nullable`1<SourceType>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #15) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<Microsoft.Graph.Models.AccessPackageRequestState,System.__Canon>.Select<ValueTuple`2<int32,__Canon>>(Func`2<__Canon,ValueTuple`2<int32,__Canon>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #16) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArrayWhereSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.FollowupFlagStatus>,System.__Canon>.Select<Nullable`1<PromptLoginBehavior>>(Func`2<__Canon,Nullable`1<PromptLoginBehavior>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #17) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.DelegatedAdminRelationshipStatus,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #18) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.RoutingType,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #19) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<Microsoft.Graph.Models.MultiFactorAuthConfiguration,System.__Canon>.Select<Nullable`1<SafeSearchFilterType>>(Func`2<__Canon,Nullable`1<SafeSearchFilterType>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #20) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.B2bIdentityProvidersType>,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #21) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ListSelectIterator`2<Microsoft.Graph.Models.WeakAlgorithms,System.__Canon>.Select<Nullable`1<AlertSeverity>>(Func`2<__Canon,Nullable`1<AlertSeverity>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #22) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+IListSkipTakeSelectIterator`2<Microsoft.Graph.Models.InstallIntent,System.__Canon>.Select<Nullable`1<EducationModuleStatus>>(Func`2<__Canon,Nullable`1<EducationModuleStatus>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.InstantiatedType.<GetVirtualMethods>d__23.MoveNext() + 0x196
   at ILCompiler.DependencyAnalysis.EETypeNode.AnalyzeVirtualMethods(TypeDesc) + 0x26f
   at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory, TypeDesc) + 0x14e
   at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc) + 0x8f
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x18
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x311
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---

 ---> (Inner Exception #23) ILCompiler.CodeGenerationFailedException: Code generation failed for method '[System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<Microsoft.Graph.Models.Security.ContentFormat,System.__Canon>.Select<Nullable`1<BroadcastMeetingAudience>>(Func`2<__Canon,Nullable`1<BroadcastMeetingAudience>>)'
 ---> System.OverflowException: Arithmetic operation resulted in an overflow.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowOverflowException() + 0x24
   at Internal.TypeSystem.LockFreeReaderHashtable`2.Expand(TValue[]) + 0x1d5
   at Internal.TypeSystem.LockFreeReaderHashtable`2.AddOrGetExistingInner(TValue, Boolean&) + 0x57
   at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey) + 0x2d
   at Internal.TypeSystem.MethodDesc.InstantiateSignature(Instantiation, Instantiation) + 0x259
   at Internal.IL.InstantiatedMethodIL.GetObject(Int32, NotFoundBehavior) + 0x68
   at Internal.IL.ILImporter.ImportCall(ILOpcode, Int32) + 0x74
   at Internal.IL.ILImporter.ImportBasicBlock(ILImporter.BasicBlock) + 0x541
   at Internal.IL.ILImporter.ImportBasicBlocks() + 0x55
   at Internal.IL.ILImporter.Import() + 0x8fa
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x5c
   --- End of inner exception stack trace ---
   at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode) + 0x226
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x2c5
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) + 0x511
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() + 0x15a<---
MichalStrehovsky commented 6 months ago

Yep, looks like there's no generic recursion, just a ton of stuff.

If you re-run the failing ilc execution by adding --verbose --parallelism:1 you'll see how the compiler is slowly drowning compiling hundreds of thousands of LINQ for Microsoft.Graph.

ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.DeviceRegistrationState>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.DeviceManagementExchangeAccessState>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.DeviceManagementExchangeAccessState>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.DeviceManagementExchangeAccessState>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.DeviceManagementExchangeAccessState>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.DeviceManagementExchangeAccessStateReason>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.DeviceManagementExchangeAccessStateReason>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.DeviceManagementExchangeAccessStateReason>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.DeviceManagementExchangeAccessStateReason>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ManagedDeviceOwnerType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ManagedDeviceOwnerType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ManagedDeviceOwnerType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ManagedDeviceOwnerType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ManagementAgentType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ManagementAgentType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ManagementAgentType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ManagementAgentType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ManagedDevicePartnerReportedHealthState>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ManagedDevicePartnerReportedHealthState>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ManagedDevicePartnerReportedHealthState>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ManagedDevicePartnerReportedHealthState>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.Importance>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.Importance>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.Importance>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.Importance>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.InferenceClassificationType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.InferenceClassificationType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.InferenceClassificationType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.InferenceClassificationType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.MeetingChatMode>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.MeetingChatMode>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.MeetingChatMode>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.MeetingChatMode>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.OnlineMeetingPresenters>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.OnlineMeetingPresenters>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.OnlineMeetingPresenters>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.OnlineMeetingPresenters>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.MeetingChatHistoryDefaultMode>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.MeetingChatHistoryDefaultMode>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.MeetingChatHistoryDefaultMode>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.MeetingChatHistoryDefaultMode>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChannelMembershipType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChannelMembershipType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChannelMembershipType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChannelMembershipType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.TeamSpecialization>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.TeamSpecialization>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.TeamSpecialization>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.TeamSpecialization>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.TeamVisibilityType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.TeamVisibilityType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.TeamVisibilityType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.TeamVisibilityType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChatMessageImportance>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChatMessageImportance>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChatMessageImportance>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChatMessageImportance>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChatMessageType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChatMessageType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChatMessageType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChatMessageType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChatType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChatType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChatType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.ChatType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.MdmAuthority>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.MdmAuthority>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.MdmAuthority>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.MdmAuthority>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.PartnerTenantType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.PartnerTenantType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.PartnerTenantType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.PartnerTenantType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ArraySelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.BodyType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+ListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.BodyType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IListSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.BodyType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...
ILC: Scanning [System.Linq]System.Linq.Enumerable+IEnumerableSelectIterator`2<System.Nullable`1<Microsoft.Graph.Models.BodyType>,System.__Canon>.Select<__Canon>(Func`2<__Canon,__Canon>)...

There's no clear sign this is a recursion, just tons of types and variations.

I don't know if there's anything to do.

Even if this succeeded, we're likely to run into PE file format limits.

Cc @eerhardt if he heard about Microsoft.Graph and why is it 35 MB in IL. Basically this is already bigger than all of BCL combined and apparently doesn't trim very well, and add generic specialization and it becomes incompilable.

filipnavara commented 6 months ago

Thanks for checking it. The annoying thing is that we use very small subset of the Microsoft.Graph assembly and I expected to get most of it trimmed.

am11 commented 6 months ago

why is it 35 MB in IL

Looks like the reported issue got closed due to inactivity https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1702.

filipnavara commented 6 months ago

The quoted issue in particular states:

We've worked with the dotnet team to enable proper AOT support. If you haven't explored that aspect, and you don't want to switch to a self-served client, you should try AOT, which among other things tree-shakes the assemblies. In a containerized scenario the dotnet team went from ~350+MB down to ~30MB (trimming + changing base image).

That's certainly not working as advertised. Neither is the approach of generating your own SDK subset using Microsoft Kiota because it generates the exact same Model bloat full of classes that are never even referenced.

am11 commented 6 months ago

@filipnavara, is it reproduced with isolated repro; like a dummy project with calls to bunch of Graph endpoints? I tried a sample app: https://github.com/microsoftgraph/msgraph-sample-github-connector-dotnet/tree/main (changed net8 -> net9 and published with PublishAot on osx-arm64 with daily build), it seemed to have published in a few seconds.

filipnavara commented 6 months ago

I suppose I can try to reduce the repro. The whole app was always on the verge of hitting some limits, so it's very well possible that this was just the last thing that pushed it over, but the number of classes from the Graph assembly is certainly too high to ignore...

filipnavara commented 6 months ago

Also, I suppose the LINQ optimizations in .NET 9 may also play a role. There's a LOT of LINQ specializations and apparently each added interface basically multiplies those, resulting in each specialized iterator taking 4 slots in this hash table which certainly doesn't help things.

am11 commented 6 months ago

Yup, and this https://github.com/dotnet/runtime/pull/101969 😉 Also found this awesome lib https://github.com/cathei/LinqGen (from the list https://github.com/amis92/csharp-source-generators/blob/main/README.md) which may help Graph.dll. We can sprinkle around .Gen() in their code and check if it makes a difference (hopefully it does).

MichalStrehovsky commented 6 months ago

Also, I suppose the LINQ optimizations in .NET 9 may also play a role. There's a LOT of LINQ specializations and apparently each added interface basically multiplies those, resulting in each specialized iterator taking 4 slots in this hash table which certainly doesn't help things.

I already tried replacing LINQ with the one from 8.0 and also with the one used on WASM (that has less generic code). It didn't seem to help.

filipnavara commented 6 months ago

I am aware of LinqGen but it’s not trivial to just add it to project of this size :)

filipnavara commented 6 months ago

For what's it worth. I enabled the verbose logging, redirected it to file and let it run until the overflow happens.

navara@FilipNavaraR7K:/mnt/d/temp/repro$ cat log.txt | wc -l
8501369
navara@FilipNavaraR7K:/mnt/d/temp/repro$ cat log.txt | grep -a "Microsoft\.Graph" | wc -l
7569743
navara@FilipNavaraR7K:/mnt/d/temp/repro$ cat log.txt | grep -a "\[System\.Linq\]" | wc -l
7701163
filipnavara commented 6 months ago

Seems like the minimal repro is

using Microsoft.Graph;

var httpClient = new HttpClient();
var graphClient = new GraphServiceClient(httpClient);
var me = await graphClient.Me.GetAsync();
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net9.0</TargetFramework>
    <RootNamespace>msgraph_repro</RootNamespace>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <PublishAot>true</PublishAot>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Graph" Version="5.48.0" />
  </ItemGroup>

</Project>

FWIW this is supposed to do a simple HTTP request:

image
am11 commented 6 months ago

Nice repro! IlcCompile (3452,2s) on M1 still ongoing. 😅

The other GitHub sample wasn't using .me.GetAsync(), but instead .External.Connections.GetAsync();. With that, it compiles in ~10 secs.

filipnavara commented 6 months ago

The other GitHub sample wasn't using .me.GetAsync(), but instead .External.Connections.GetAsync();. With that, it compiles in ~10 secs.

There are some endpoints that trigger it and others that don't. We hit it with more than one, but this was the first one I found to reproduce it. The compilation on my machine (Ryzen 7950 on Windows) fails after 30 minutes.

MichalStrehovsky commented 6 months ago

Okay, this took a while to untangle because all the tools we have are crashing on this. I'm going to channel some frustration into this response. I see the problem, it's unclear how hard it will be to fix. It needs to be fixed in Kiota.

First some intro. LINQ is implemented on top of a ton of generic virtual methods. Generic virtual methods tend to have combinatorial explosions. Think:

interface I
{
    void Do<T>();
}

class A : I
{
    public void Do<T>();
}

class B : I
{
    public void Do<T>();
}

Then somewhere we do I o = new A(); o.Do<int>();. Somewhere else we do I o = new B(); o.Do<float>();. When compiling this ahead of time, A and B end up each getting a Do<int> and Do<float> method. Now imagine A and B were also generic themselves. You get the gist.

Looking at how this works with LINQ:

using System.Diagnostics.CodeAnalysis;
using System.Reflection;

GetEnumValue<MyEnum>();
GetEnumValue<YourEnum>();

static T? GetEnumValue<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)] T>() where T : struct, Enum
{
    var rawValue = "foo,bar";
    if (string.IsNullOrEmpty(rawValue)) return null;

    var type = typeof(T);
    if (type.GetCustomAttributes<FlagsAttribute>().Any())
    {
        return (T)(object)rawValue!
            .Split(',')
            .Select(x => Enum.TryParse<T>(x, true, out var result) ? result : (T?)null)
            .Where(x => !x.Equals(null))
            .Select(x => (int)(object)x!)
            .Sum();
    }
    else
        return Enum.TryParse<T>(rawValue, true, out var result) ? result : null;
}

enum MyEnum { }
enum YourEnum { }

Notice that I'm doing a bunch of select/where with MyEnum and YourEnum, separately. But compile this with AOT and look at what was generated with sizoscope:

image

Notice IteratorSelectIterator over YourEnum getting a Select method body for MyEnum. Notice IteratorSelectIterator types instantiated over both YourEnum and MyEnum, in all possible combinations.

You might think, Michal, what a crazy example of LINQ use, nobody writes code like that. Nobody writes type.GetCustomAttributes<FlagsAttribute>().Any(). It has bad startup and memory use characteristics, irrespective of AOT. Well, welcome to the Kiota codebase.

LINQ is everywhere, including all the generated code, even in places that look trivially avoidable.

The good news is that Copilot is pretty good at "can you rewrite this code without LINQ" and produces more readable and efficient code than the original.

MichalStrehovsky commented 6 months ago

(This also explains why Microsoft.Graph is 35 MB of IL. It's all the lambdas.)

filipnavara commented 6 months ago

I guess we should file an issue with Kiota, right? I can do that.

Stepping aside from the specific scenario, do you have any ideas on how to limit the generic expansion or report better errors? Not asking for a miracle, but I assume people may inadvertently run into this and diagnosing it is quite painful with the crashing tools. I was unable to produce DGML/MSTAT for any non-trivial code that would make it easier to find the root cause and create a repro.

MichalStrehovsky commented 6 months ago

There is no single reason. It's a death by a thousand papercuts. I honestly don't know what approach could be used here. It's a philosophical problem akin to sorites paradox.

The approach I ended up using was this tool: https://github.com/dotnet/runtime/tree/4246ba19bd196c5f374d94e5c1fc7b21d53bd9fc/src/coreclr/tools/aot/DependencyGraphViewer. Click the "Use ETW" button, it will listen to dependency graph event in any active ILC compilation. Then I ran ILC with --verbose --parallelism:1 until things started to look repetitive and then I stopped the compilation (DependencyGraphViewer will become very sluggish and eat gigabytes of memory very quickly if you don't stop it soon enough). Then I drilled down into the repetitive things in the viewer tool and root caused one of them to the Enum deserialization. I doubt that's the only problem.

MichalStrehovsky commented 6 months ago

I guess what we could do is to add a command line switch that will abort compilation after a user-specified number of methods and spits out whatever logs were requested and a broken object file. That might help.

filipnavara commented 6 months ago

Thanks for the analysis and documenting the DependencyGraphViewer approach. At least now we have a searchable issue with a hint of how to proceed in diagnosing it :-)

filipnavara commented 6 months ago

I guess what we could do is to add a command line switch that will abort compilation after a user-specified number of methods and spits out whatever logs were requested and a broken object file. That might help.

I guess I would be happy if the DGML file was written even on unsuccessful compilation (assuming compilation with IlcGenerateDgmlFile=true). That would likely be somewhat useful.

filipnavara commented 6 months ago

Btw, fixing up the Enum reading/writing in Microsoft.Kiota.Serialization.Form and Microsoft.Kiota.Serialization.Json is enough to stop the LINQ generic expansion and makes the compilation (of the repro) pass.

agocke commented 6 months ago

I guess what we could do is to add a command line switch that will abort compilation after a user-specified number of methods and spits out whatever logs were requested and a broken object file. That might help.

It's not unreasonable to do this by default. The C# compiler has a specific error message for this "This expression is too large or complex to compile." Basically used for when the program starts running up against physical limits.

filipnavara commented 6 months ago

The underlying issue in the Microsoft Graph SDK / Kiota is fixed and I can confirm that the build runs to the end now.

Should we close this issue? Should we keep it around to track improvements to the diagnostic options?

am11 commented 6 months ago

I think it may be better to define a hard limit (in byte or number of generic types we can handle), then issue an descriptive message if it exceeds the limit (and/or catch OverflowException and issue that message). Perhaps with a link to general guidance for optimizing applications for AOT. That kind of link may also be shown to stdout while ilc is working and taking a while (e.g. 10+ minutes).

filipnavara commented 6 months ago

Just a side-note, there are still places in the Microsoft.Graph SDK that emit expensive LINQ even with the serialization fix:

image

The app still has ~90Mb (30%) of the LINQ generic expansions where at least some of them are from parts of the Graph SDK that we don't use. On the upside I have MSTAT and DGML log files now.

UPD: Hopefully I found the culprit.

kasperk81 commented 4 months ago

https://github.com/microsoft/kiota/releases/tag/v1.16.0 removed linq from kiota generated code and kiota.* dependencies @filipnavara, could you measure the impact? I know @baywet was interested.

kasperk81 commented 4 months ago

msgraph waiting for update https://github.com/microsoftgraph/msgraph-sdk-dotnet/pull/2573

filipnavara commented 4 months ago

All the recent Kiota fixes made it viable to use in the NativeAOT scenarios and it no longer crashes the AOT compiler. I shared some numbers earlier on individual PRs/issues. Notably, the initial fixes went from Kiota choking the AOT compiler to successful build. Later fixes cut down 60 MB of the resulting app size (Microsoft Graph SDK and few other dependencies). We are now down to ~26 MB for all LINQ instances in the whole app according to Sizoscope and so Kiota is no longer the biggest contributor.

kasperk81 commented 4 months ago

should cut down more after https://github.com/microsoftgraph/msgraph-sdk-dotnet/pull/2573

filipnavara commented 4 months ago

should cut down more after microsoftgraph/msgraph-sdk-dotnet#2573

That requires rebuilding all the SDKs / models that we depend on. I can do most of that myself but I'd prefer to wait at least for the Graph SDK packages from upstream.

kasperk81 commented 2 months ago

@filipnavara latest release should have all the no-linq changes if you wana give it a try

filipnavara commented 2 months ago

@filipnavara latest release should have all the no-linq changes if you wana give it a try

Thanks for the heads up!