runtime: LockFreeReaderHashtable growing algorithm results in an arithmetic overflow

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.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 1
  • Comments: 37 (37 by maintainers)

Most upvoted comments

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.

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.

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.

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?

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 latest release should have all the no-linq changes if you wana give it a try

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.

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

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.

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…