Skip to content

[Bug] System.ObjectDisposedException at AzureMaintenanceEvent.cs #3007

@pmg007

Description

@pmg007

Hi,

The library seems to have an issue at https://github.com/StackExchange/StackExchange.Redis/blob/main/src/StackExchange.Redis/Maintenance/AzureMaintenanceEvent.cs

This causes service to crash and dump creations. This exception arises within the library, and not our application code.

System.ObjectDisposedException: Cannot access a disposed object.
Object name: '<removed>(SE.Redis-v2.7.10.12442)'.
   at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor`1 processor, ServerEndPoint server, T defaultValue) in /_/src/StackExchange.Redis/ConnectionMultiplexer.cs:line 2099
   at StackExchange.Redis.ConnectionMultiplexer.EnsureSubscriptions(CommandFlags flags) in /_/src/StackExchange.Redis/RedisSubscriber.cs:line 137
   at StackExchange.Redis.ConnectionMultiplexer.<ReconfigureAsync>d__139.MoveNext() in /_/src/StackExchange.Redis/ConnectionMultiplexer.cs:line 1725
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at StackExchange.Redis.Maintenance.AzureMaintenanceEvent.<>c__DisplayClass2_0.<<AddListenerAsync>b__0>d.MoveNext() in /_/src/StackExchange.Redis/Maintenance/AzureMaintenanceEvent.cs:line 143
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()(wrapped: ObjectDisposedException/Cannot access a disposed object.
Object name: '<removed>(SE.Redis-v2.7.10.12442)'.)

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