mirror of
https://github.com/mageddo/dns-proxy-server.git
synced 2026-04-25 09:25:56 +03:00
[GH-ISSUE #522] Cache causing deadlock #178
Labels
No labels
bug
confirmed
discussion
duplicate
enhancement
feature
feature-request
not-planned
pull-request
secondary-feature
stale
triage
waiting-feedback
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/dns-proxy-server-mageddo#178
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mageddo on GitHub (Jul 31, 2024).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/522
What is Happening
A dead lock is occurring at the cache
thread-dump-lock.txt
Changes
Specs
docker versionRelates to #511
@mageddo commented on GitHub (Aug 1, 2024):
Issue wasn't fixed yet, the previous cache isn't the issue, the issue is the mixing of .compute and .clear methods.
All the DPS solving steps ran inside a '.compute' block which is a lock by key, eventually the block will also call '.clear' method
What is Happening
I was capable to cause deadlock using
.clear()inside.computeusing at least two threads, see a MRE.Explanation
key 1by usingcomputemethodkey 2by usingcomputemethodclearmethod to clear the cache, now waiting for thread 2 to exitcomputemethodclearmethod, now waiting on thread 1 to exitcomputeandclearmethodsref
Changes
.clearmethod can be called by only one thread