OrleansContrib / OrleansDashboard

:bar_chart: A developer dashboard for Microsoft Orleans
MIT License
706 stars 162 forks source link

GrainTimer dispose exception when using orleans dashboard #398

Open sc-starman opened 1 year ago

sc-starman commented 1 year ago

Using Orleans Dashboard 7.2.1, when I register Orleans dashboard on the host and on a graceful shutdown I got this exception repeatedly: [11:43:30 ERR] Caught and ignored exception thrown from timer callback for timer GrainTimer.sys.svc.user.95B6CAE6/127.0.0.1:11111@46080769Timer TimerCallbackHandler:[SystemTarget: S127.0.0.1:11111:46080769/sys.svc.user.95B6CAE6/127.0.0.1:11111@46080769@0d73e76f000000002b539dc300000000]->System.Threading.Tasks.Task <Start>b__11_0(System.Object) System.ObjectDisposedException: Cannot access a disposed object. Object name: 'IServiceProvider'. at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException() at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.GetServiceOrCreateInstance[T](IServiceProvider provider) at Orleans.Serialization.GeneratedCodeHelpers.OrleansGeneratedCodeHelper.GetService[TService](Object caller, ICodecProvider codecProvider) in /_/src/Orleans.Serialization/GeneratedCodeHelpers/OrleansGeneratedCodeHelper.cs:line 84 at OrleansCodeGen.Orleans.Runtime.Proxy_IManagementGrain..ctor(GrainReferenceShared arg0, IdSpan arg1) in /_/src/Orleans.Core/Orleans.CodeGenerator/Orleans.CodeGenerator.OrleansSerializationSourceGenerator/Orleans.Core.orleans.g.cs:line 1274 at Proxy_IManagementGrain(Object, GrainReferenceShared, IdSpan) at Orleans.GrainReferences.GrainReferenceActivatorProvider.GrainReferenceActivator.CreateReference(GrainId grainId) in /_/src/Orleans.Core/GrainReferences/GrainReferenceActivator.cs:line 380 at Orleans.GrainReferences.GrainReferenceActivator.CreateReference(GrainId grainId, GrainInterfaceType interfaceType) in /_/src/Orleans.Core/GrainReferences/GrainReferenceActivator.cs:line 57 at Orleans.GrainFactory.GetGrain[TGrainInterface](Int64 primaryKey, String grainClassNamePrefix) in /_/src/Orleans.Core/Core/GrainFactory.cs:line 52 at OrleansDashboard.SiloGrainService.CollectStatistics(Boolean canDeactivate) at Orleans.Runtime.GrainTimer.ForwardToAsyncCallback(Object state) in /_/src/Orleans.Runtime/Timers/GrainTimer.cs:line 139