Opened 7 years ago

Closed 5 years ago

#2410 closed defect (fixed)

Long Runtime for 'GETINFO address' queries

Reported by: atagar Owned by:
Priority: Medium Milestone: Tor: 0.2.4.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Hi. Most attributes, the address included, are quick to query (averaging 0.0004 seconds on my system). However, if the user sets an address attribute, ex:

Address tor.spider007.net

the address query takes *far* longer (between 0.15 - 5 seconds). Having getinfo queries block for several seconds is a substantial problem for controllers, in arms case causing a very long startup time and intermittently freezing the interface (though I'm still not sure of the root cause behind this later symptom... probably something tangential to setting the address since I cache that particular value).

This is courtesy of Sjon who helped discovered this issue. Cheers! -Damian

Child Tickets

Change History (7)

comment:1 Changed 7 years ago by Sebastian

First guess is that a dns query might be involved. I'll check if that's true later

comment:2 in reply to:  1 Changed 7 years ago by rransom

Replying to Sebastian:

First guess is that a dns query might be involved. I'll check if that's true later

Yes -- Tor resolves its address synchronously using tor_addr_lookup (see `resolve_my_address` in src/or/config.c). See also #2267, which is also caused by a DNS lookup in resolve_my_address (but earlier in the function).

comment:3 Changed 7 years ago by nickm

Milestone: Tor: unspecified

I'd be glad to take a patch for this.

comment:4 Changed 5 years ago by nickm

Keywords: tor-relay added

comment:5 Changed 5 years ago by nickm

Component: Tor RelayTor

comment:6 Changed 5 years ago by arma

Status: newneeds_review

I have a proposed fix at #1992.

comment:7 Changed 5 years ago by nickm

Milestone: Tor: unspecifiedTor: 0.2.4.x-final
Resolution: fixed
Status: needs_reviewclosed

Merged that; thanks!

Note: See TracTickets for help on using tickets.