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

Already on GitHub? Sign in to your account

Race condition inside of the cache #8

mailgun opened this Issue Apr 10, 2012 · 1 comment


None yet
2 participants

ghost commented Apr 10, 2012

See the bottom of the stack trace below. This happens under load, when multiple threads are invoking query()

return dns_resolver.query(hostname, record_type)
File "build/bdist.linux-x86_64/egg/dns/resolver.py", line 591, in query
answer = self.cache.get((qname, rdtype, rdclass))
File "build/bdist.linux-x86_64/egg/dns/resolver.py", line 208, in get
File "build/bdist.linux-x86_64/egg/dns/resolver.py", line 195, in maybe_clean
del self.data[k]
KeyError: (, 15, 1)


rthalley commented Mar 31, 2013

The caches are now locked.

@rthalley rthalley closed this Mar 31, 2013

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