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 when entry is removed while receiver holds lock in lookup. #654

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

fancycode
Copy link
Member

@fancycode fancycode commented Feb 7, 2024

Problem happened in CI tests of GrpcClients which tried to remove the entry concurrently with onLookup.

When trying to remove the entry here:

c.dnsMonitor.Remove(entry.entry)

The lock was acquired here:

Concurrently, the DNS monitor was notifying about the lookup here:

And previously acquired its lock here:

Found here:
https://github.com/strukturag/nextcloud-spreed-signaling/actions/runs/7813581057/job/21313022175?pr=653

With this change, removing entries is possible while the lookup results are currently processed.

@fancycode fancycode force-pushed the dnsmonitor-deadlock branch from 4a24a63 to cf5ee8e Compare February 7, 2024 12:03
@coveralls
Copy link

coveralls commented Feb 7, 2024

Pull Request Test Coverage Report for Build 7814441439

  • 0 of 34 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on dnsmonitor-deadlock at 53.531%

Totals Coverage Status
Change from base Build 7812492684: 53.5%
Covered Lines: 7702
Relevant Lines: 14388

💛 - Coveralls

@fancycode fancycode merged commit 5f71a9a into master Feb 7, 2024
19 checks passed
@fancycode fancycode deleted the dnsmonitor-deadlock branch February 7, 2024 12:08
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