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

dnsdist: Fix an outstanding counter race when reusing states #6773

Merged
merged 1 commit into from Jul 9, 2018

Conversation

Projects
None yet
1 participant
@rgacogne
Member

rgacogne commented Jul 5, 2018

Short description

I finally managed to reliably reproduce the "negative outstanding counter" issue by setting setMaxUDPOutstanding() to a very low value and overloading the backend, causing dnsdist to do a lot of "active state reuses".
This PR tries harder to detect whether another thread has been reusing the state, making sure that we don't decrement the outstanding counter twice.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

@rgacogne rgacogne modified the milestones: dnsdist-1.3.x, dnsdist-1.3.1 Jul 5, 2018

@rgacogne rgacogne merged commit e01dbbc into PowerDNS:master Jul 9, 2018

4 checks passed

LGTM analysis: C/C++ No alert changes
Details
LGTM analysis: JavaScript No alert changes
Details
LGTM analysis: Python No alert changes
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@rgacogne rgacogne deleted the rgacogne:dnsdist-reuse-race branch Jul 9, 2018

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