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

logger: Use thread_local instead of pthread_getspecific() #6625

Merged
merged 1 commit into from
Jan 10, 2019

Conversation

rgacogne
Copy link
Member

Short description

It might help with #6624, but feels cleaner to me anyhow.

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 changed the title logger: User thread_local instead of pthread_getspecific() logger: Use thread_local instead of pthread_getspecific() May 18, 2018
@tih
Copy link
Contributor

tih commented May 20, 2018

So I tried this patch, and it did, indeed, fix the crash I described in #6624. It also points out another quirk: once the pdns_server runs without crashing, it's interesting how the very first thing it tries to log is the initialization of each module, even before it announces its general presence at all. This is unfortunate, as the modules try to log their initialization before the desired log level has been set, and so, the log announcements of their starting is lost.

@Habbie
Copy link
Member

Habbie commented May 20, 2018

While losing the log messages is a pity, they mostly exist so we can spot mismatched pdns_server vs. dynamic backend module versions in bug report logs, so it's not a big problem.

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.

4 participants