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

auth: Handle a signing pipe worker dying with work still pending #5777

Merged
merged 2 commits into from Oct 23, 2017

Conversation

Projects
None yet
3 participants
@rgacogne
Member

rgacogne commented Oct 6, 2017

Short description

The current code detects that the corresponding pipe has been closed, but has no way to know if we were still expecting something from this worker or if this is a "normal" exit. This leads to d_outstanding not being decreased if we expected an answer from the dying worker, meaning we will wait forever for the result.
This patch keeps track of the number of answers we are expecting from each worker, treating a worker exiting while we still expect some answer from its end as an error.
It also move to the use of std::thread to get rid of the temporary allocated struct used to pass parameters to the new thread.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled and 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 added some commits Oct 5, 2017

@rgacogne rgacogne added this to the auth-4.1.0 milestone Oct 6, 2017

@aerique aerique requested review from Habbie and ahupowerdns Oct 13, 2017

@ahupowerdns

Looks good

@aerique aerique merged commit f93a3d1 into PowerDNS:master Oct 23, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@rgacogne rgacogne deleted the rgacogne:auth-signing-pipe-std-thread branch Oct 23, 2017

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