Skip to content

Detect blocks/deadlocks in .NET client receive queue and log an error when it occurs #3167

@DamianEdwards

Description

@DamianEdwards

Currently in the .NET client we serialize invoking user callbacks upon receiving messages from the server using a TaskQueue. This includes callbacks registered using HubProxy.On or continuations after HubProxy.Invoke.

If these callbacks block, especially blocking waiting on result from another callback, the receive dispatch queue will simply stop (deadlock).

We should detect this condition and trace an error when it occurs (Connection.OnError).

We could do this in the TaskQueue itself (with an optional flag that enables it of course) that makes it essentially monitor itself, using an async loop started on the first enqueue that checks if the task currently running is the same as what was running on the last interval. If so, log the error.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions