Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deadlock in Consul RTT. #2130

Merged
merged 1 commit into from
Jun 21, 2016
Merged

Fix deadlock in Consul RTT. #2130

merged 1 commit into from
Jun 21, 2016

Conversation

sean-
Copy link
Contributor

@sean- sean- commented Jun 20, 2016

  1. consul/rtt.go:388: getDatacentersByDistance() == remoteLock.RLock()
  2. consul/rtt.go:341: sortDatacentersByDistance() == RLock() still held
  3. consul/rtt.go:282: getDatacenterDistance() == RLock() still held.
  4. consul/rtt.go:268: getNodesForDatacenter() == Attempt to reacquire remoteLock.RLock(), task hangs indefinitely blocking all future readers and writers accessing remoteConsuls.

- consul/rtt.go:388: s.getDatacentersByDistance().  Acquires RLock()
- consul/rtt.go:341: sortDatacentersByDistance() RLock still held.
- consul/rtt.go:282: getDatacenterDistance() RLock still held.
- consul/rtt.go:268: getNodesForDatacenter(). Attempts to reacquire RLock(), hangs indefinitely.
@slackpad
Copy link
Contributor

LGTM

@slackpad slackpad merged commit a173349 into master Jun 21, 2016
@slackpad slackpad deleted the b-fix-rtt-deadlock branch June 21, 2016 16:55
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.

2 participants