Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 325
    • Issues 325
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 30
    • Merge requests 30
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #40490
Closed
Open
Issue created Oct 18, 2021 by David Goulet@dgoulet🐼Owner

metrics: any DNS error fails to report correctly

Thanks to https://lists.torproject.org/pipermail/tor-relays/2021-October/019917.html

I can confirm this report as well. Basically, libevent doesn't report the type (A, AAAA, PTR) when a DNS error occurs. In libevent, the function reply_run_callback() calls back like so:

cb->user_callback(cb->err, 0, 0, cb->ttl, NULL, user_pointer);

... where type is the second parameter which is always 0. I have no idea why it is done this way but that is what we need to work with.

Which means that rep_hist_note_dns_error(type, result) always use 0 as the type and that doesn't exists when get_dns_stats_by_type(0) is called leading to never recording DNS errors.

I think we should lobby libevent to fix that because I really don't see why it doesn't report the request type. But we'll have to fix that in our code to record all DNS errors without the type and so the reporting will be a blanket "DNS error" instead of being per-type on the metrics port.

This only affects the reporting on the MetricsPort and not the overload state fortunately.

Edited Oct 20, 2021 by David Goulet
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking