Opened 4 years ago

Closed 11 months ago

#17623 closed defect (fixed)

Improve not-a-server behavior of server-only timer callbacks

Reported by: nickm Owned by:
Priority: Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Minor Keywords: tor-relay mainloop refactor
Cc: teor Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

On #3199, special says:

It makes me a little sad that events like rotate_onion_key, check_ed_keys, record_bridge_stats will be called once per second on clients to handle the unlikely case where the configuration changes and they're now relevant. That is consistent with previous behavior, though. They have a little more overhead than they used to - at least one time() and event_add() each.

We should clean these up now that timers are refactored.

Child Tickets

Change History (8)

comment:1 Changed 4 years ago by teor

Cc: teor added

comment:2 Changed 4 years ago by nickm

Milestone: Tor: 0.2.8.x-finalTor: 0.2.???

Move a bunch of (but not all) low-priority items to 0.2.???. If you write a patch, it can still get into 0.2.8

comment:3 Changed 4 years ago by teor

We could be clever about this and activate callbacks only on the kinds of servers which use them:

  • Relays, including Bridge Relays: server_mode()
    • check_descriptor
    • check_for_reachability_bw
  • Relays, including Bridge Relays, and Single Onion Servers (prop 252): server_mode() || ???
    • rotate_onion_key
    • check_ed_keys
    • expire_old_ciruits_serverside
  • Exits: server_mode() && !router_my_exit_policy_is_reject_star()
    • retry_dns_callback
    • check_dns_honesty
  • Bridge Relays: get_options()->BridgeRelay
    • record_bridge_stats
  • Authorities: authdir_mode_any_nonhidserv()
    • launch_reachability_tests
  • V3 Authorities: authdir_mode_v3(get_options())
    • check_authority_cert
  • Bridge Authorities: get_options()->BridgeAuthoritativeDir
    • write_bridge_ns

Every time the config changes, we may have to deactivate/reactivate some of these callbacks.

comment:4 Changed 3 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:5 Changed 3 years ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:6 Changed 2 years ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:7 Changed 2 years ago by nickm

Keywords: tor-relay mainloop refactor added

comment:8 Changed 11 months ago by teor

Resolution: fixed
Status: newclosed

This was fixed by #25762.

Note: See TracTickets for help on using tickets.