Opened 2 years ago

Closed 2 years ago

#21598 closed enhancement (implemented)

Log a message when a hidden service has fewer introduction points than expected

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: 0.3.1.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-hs
Cc: Actual Points: 0.1
Parent ID: #21446 Points: 0.1
Reviewer: Sponsor:

Description (last modified by teor)

Diagnostic for bugs like #21446.

Child Tickets

Change History (5)

comment:1 Changed 2 years ago by teor

Description: modified (diff)
Status: newneeds_review

Please see my branch feature21598, which dumps the intro points when this happens.

comment:2 Changed 2 years ago by dgoulet

Status: needs_reviewneeds_revision

This lgtm except I would simply add the onion address of the faulting service with something like:

+    log_fn(severity, LD_REND, "Hidden service %s wanted %d intro points, but "
+           "descriptor was updated with %d instead.",
+           service->service_id,
+           service->n_intro_points_wanted, have_intro);

Note that it's not being used with safe_str_client() so an operator can at least identify which service is being affected without restarting with SafeLogging 0... Feel free to change that if you think it's a bad idea.

comment:3 in reply to:  2 Changed 2 years ago by teor

Status: needs_revisionneeds_information

Replying to dgoulet:

This lgtm except I would simply add the onion address of the faulting service with something like:

+    log_fn(severity, LD_REND, "Hidden service %s wanted %d intro points, but "
+           "descriptor was updated with %d instead.",
+           service->service_id,
+           service->n_intro_points_wanted, have_intro);

Note that it's not being used with safe_str_client() so an operator can at least identify which service is being affected without restarting with SafeLogging 0... Feel free to change that if you think it's a bad idea.

rend_service_dump_stats() prints the configured directory, so I'm not sure if we need the service name as well. What do you think?

Is the directory name safer than the service name?
If this bug happens, a user will paste the logs in a public ticket.

comment:4 Changed 2 years ago by teor

Status: needs_informationmerge_ready

Ok, I pushed a fixup including dgoulet's suggested changes to feature21598.

comment:5 Changed 2 years ago by nickm

Resolution: implemented
Status: merge_readyclosed

just a log message, so should be okay. merging!

Note: See TracTickets for help on using tickets.