Skip to content

PlacementService disposal? #9827

@alexander-jesner-AP

Description

@alexander-jesner-AP

During shutdown of my application I get log output regarding an ObjectDisposedException:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetRequiredKeyedService(Type serviceType, Object serviceKey)
   at Orleans.Runtime.Placement.PlacementService.PlacementWorker.GetOrPlaceActivationAsync(Message firstMessage) in /_/src/Orleans.Runtime/Placement/PlacementService.cs:line 380
   at Orleans.Runtime.Placement.PlacementService.PlacementWorker.AddressWaitingMessages(GrainPlacementWorkItem completedWorkItem) in /_/src/Orleans.Runtime/Placement/PlacementService.cs:line 339

The exception is not bubbling out, it is caught in the PlacementService and logged.

I was asking myself if the PlacementService should actually be disposable and the while(true) in

should in fact be a while(undisposed).

Using Orleans 9.2.1.

Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions