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

dnsdist: Fix some issues reported by Thread Sanitizer #10274

Merged
merged 8 commits into from Apr 16, 2021

Conversation

rgacogne
Copy link
Member

@rgacogne rgacogne commented Apr 7, 2021

Short description

None are important issues but should be fixed anyway:

  • a possible race when reloading a DoH or DoT certificate, very unlikely on x86_64 but could be an issue on other platforms under huge load ;
  • a race in QPSAction and QPSPoolAction could lead to the QPS rate being under-evaluated ;
  • a race in TeeAction could lead to under-evaluated metrics.

It would be nice to add a TSAN-enabled build to our CI, using the included suppressions list and passing something like: TSAN_OPTIONS=halt_on_error=1:suppressions=/path/to/dnsdist-tsan.supp

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)

@Habbie
Copy link
Member

Habbie commented Apr 7, 2021

It would be nice to add a TSAN-enabled build to our CI, using the included suppressions list and passing something like: TSAN_OPTIONS=halt_on_error=1:suppressions=/path/to/dnsdist-tsan.supp

I have not had a look at all - can we combine this with ASAN/UBSAN or would it need to be separate?

@rgacogne
Copy link
Member Author

rgacogne commented Apr 7, 2021

I have not had a look at all - can we combine this with ASAN/UBSAN or would it need to be separate?

Unfortunately TSAN can't be enabled along with ASAN or UBSAN. I pushed a first attempt at doing a TSAN-enabled dnsdist build and regression tests in CircleCI, but advices are welcome :)

@Habbie Habbie self-requested a review April 7, 2021 12:21
Copy link
Member

@Habbie Habbie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two diffs suggested - unless I'm totally misunderstanding something!

.circleci/config.yml Outdated Show resolved Hide resolved
.circleci/config.yml Outdated Show resolved Hide resolved
.circleci/config.yml Outdated Show resolved Hide resolved
@rgacogne rgacogne marked this pull request as ready for review April 7, 2021 14:03
@Habbie Habbie self-requested a review April 14, 2021 08:08
Copy link
Member

@Habbie Habbie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

circleci changes look good now!

@rgacogne
Copy link
Member Author

I squashed some commits to clean up the history, will merge as soon as the tests are green again.

@rgacogne rgacogne merged commit 2b5bfe6 into PowerDNS:master Apr 16, 2021
@rgacogne rgacogne deleted the ddist-tsan-fixes branch April 16, 2021 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants