Skip to content

Conversation

@mgravell
Copy link
Collaborator

@mgravell mgravell commented Feb 20, 2023

Deadlock scenario reported with one path (RecordConnectionFailed) taking queue then message locks, and another path (ExecuteSyncImpl) taking message then queue locks; change both paths to only take one lock at a time - never nested.

  1. in RecordConnectionFailed don't hold the queue lock when we abort things - only hold it when fetching next
  2. in ExecuteSyncImpl, don't hold the message lock when throwing for timeout
  3. to avoid similar not yet seen: in GetHeadMessages, don't blindly wait forever on the message lock

also standardise on TryPeek/TryDequeue

1. to fix the immediate scenario: don't hold the queue lock when we abort things - only hold it when fetching next
2. to avoid similar not yet seen: in GetHeadMessages, don't blindly wait forever

also standardise on TryPeek/TryDequeue
Copy link
Collaborator

@NickCraver NickCraver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants